]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afs.c
com_init(): Return proper error code.
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index b4c85dcb82eb2061501c2567005f66015b30b6f0..10f9fa2155fdaee6e19873b814503f3b6169cf51 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -363,7 +363,10 @@ static int action_if_pattern_matches(struct osl_row *row, void *data)
                        continue;
                if (ret)
                        return -E_FNMATCH;
-               return pmd->action(pmd->table, row, name, pmd->data);
+               ret = pmd->action(pmd->table, row, name, pmd->data);
+               if (ret >= 0)
+                       pmd->num_matches++;
+               return ret;
        }
        return 1;
 }
@@ -1046,7 +1049,8 @@ int com_init(struct stream_cipher_context *scc, int argc, char * const * const a
        ret = send_callback_request(create_tables_callback, &query,
                sc_send_result, scc);
        if (ret < 0)
-               return sc_send_va_buffer(scc, "%s\n", para_strerror(-ret));
+               /* ignore return value */
+               sc_send_va_buffer(scc, "%s\n", para_strerror(-ret));
        return ret;
 }