Use sideband also for challenge response.
[paraslash.git] / blob.c
diff --git a/blob.c b/blob.c
index 409e348709de83de48090c0535f3aced79dda2c8..bc8986990a76793962c1759b7d882ac69ab1f5a3 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -18,6 +18,7 @@
 #include "afs.h"
 #include "ipc.h"
 #include "portable_io.h"
+#include "sideband.h"
 #include "command.h"
 
 /**
@@ -133,8 +134,10 @@ static void com_lsblob_callback(struct osl_table *table,
                .flags = *(uint32_t *)query->data,
                .pb = {
                        .max_size = shm_get_shmmax(),
-                       .private_data = &fd,
-                       .max_size_handler = pass_buffer_as_shm
+                       .private_data = &(struct afs_max_size_handler_data) {
+                               .fd = fd,
+                       },
+                       .max_size_handler = afs_max_size_handler,
                }
        };
        struct pattern_match_data pmd = {
@@ -195,7 +198,7 @@ static int com_lsblob(callback_function *f, struct command_context *cc)
 //     if (argc > i)
 //             return -E_BLOB_SYNTAX;
        return send_option_arg_callback_request(&options, cc->argc - i,
-               cc->argv + i, f, sc_send_result, cc);
+               cc->argv + i, f, afs_cb_result_handler, cc);
 }
 
 static int cat_blob(struct osl_table *table, struct osl_row *row,
@@ -237,7 +240,7 @@ static int com_catblob(callback_function *f, struct command_context *cc)
        if (cc->argc < 2)
                return -E_BLOB_SYNTAX;
        return send_standard_callback_request(cc->argc - 1, cc->argv + 1, f,
-               sc_send_result, cc);
+               afs_cb_result_handler, cc);
 }
 
 /** Used for removing rows from a blob table. */
@@ -265,8 +268,10 @@ static void com_rmblob_callback(struct osl_table *table, int fd,
        struct rmblob_data rmbd = {
                .pb = {
                        .max_size = shm_get_shmmax(),
-                       .private_data = &fd,
-                       .max_size_handler = pass_buffer_as_shm
+                       .private_data = &(struct afs_max_size_handler_data) {
+                               .fd = fd,
+                       },
+                       .max_size_handler = afs_max_size_handler,
                }
        };
        struct pattern_match_data pmd = {
@@ -301,7 +306,7 @@ static int com_rmblob(callback_function *f, struct command_context *cc)
        if (cc->argc < 2)
                return -E_MOOD_SYNTAX;
        return send_option_arg_callback_request(NULL, cc->argc - 1, cc->argv + 1, f,
-               sc_send_result, cc);
+               afs_cb_result_handler, cc);
 }
 
 static void com_addblob_callback(struct osl_table *table, __a_unused int fd,