]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afs.c
Let afs callbacks return an error code.
[paraslash.git] / afs.c
diff --git a/afs.c b/afs.c
index 0b2a4765b16f82fbde4674ac230bda4d2b5f9e18..24e737b67e3995c8723cd1d7ae7f72899554c322 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -578,7 +578,7 @@ void flush_and_free_pb(struct para_buffer *pb)
        free(pb->buf);
 }
 
-static void com_select_callback(int fd, const struct osl_object *query)
+static int com_select_callback(int fd, const struct osl_object *query)
 {
        struct para_buffer pb = {
                .max_size = shm_get_shmmax(),
@@ -617,6 +617,7 @@ static void com_select_callback(int fd, const struct osl_object *query)
                        num_admissible);
 out:
        flush_and_free_pb(&pb);
+       return 0;
 }
 
 int com_select(struct command_context *cc)
@@ -1005,7 +1006,7 @@ out:
        exit(EXIT_FAILURE);
 }
 
-static void create_tables_callback(int fd, const struct osl_object *query)
+static int create_tables_callback(int fd, const struct osl_object *query)
 {
        uint32_t table_mask = *(uint32_t *)query->data;
        int i, ret;
@@ -1035,6 +1036,7 @@ out:
        if (ret < 0)
                para_printf(&pb, "%s\n", para_strerror(-ret));
        flush_and_free_pb(&pb);
+       return 0;
 }
 
 int com_init(struct command_context *cc)