X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=blob.c;h=eca3c5630ef8a24061f818fb1bf2c2852e405ba3;hp=b970ab6517742f1ea38bd13bd4dab29bac21f530;hb=8211954fc3390c0fa19cca788b03336a37aa9dc0;hpb=02691a995a6ee0fe4d9078f1d82465edd4814f74 diff --git a/blob.c b/blob.c index b970ab65..eca3c563 100644 --- a/blob.c +++ b/blob.c @@ -3,6 +3,7 @@ #include "afh.h" #include "afs.h" #include "string.h" +#include "net.h" /** \file blob.c Macros and functions for blob handling. */ @@ -105,7 +106,7 @@ int com_lsblob_callback(struct osl_table *table, return ret; } -static int com_lsblob(callback_function *f, __a_unused int fd, int argc, const char **argv) +static int com_lsblob(callback_function *f, int fd, int argc, const char **argv) { struct com_lsblob_options clbo = {.flags = 0}; struct osl_object query = {.data = &clbo, .size = sizeof(clbo)}, @@ -138,7 +139,7 @@ static int com_lsblob(callback_function *f, __a_unused int fd, int argc, const c ret = send_option_arg_callback_request(&query, argc - i, argv + i, f, &ls_output); if (ret >= 0 && ls_output.data) - printf("%s\n", (char *)ls_output.data); + send_buffer(fd, (char *)ls_output.data); free(ls_output.data); return ret; } @@ -161,7 +162,7 @@ static int com_catblob_callback(struct osl_table *table, memcpy(output->data, obj.data, obj.size); return osl_close_disk_object(&obj); } -static int com_catblob(callback_function *f, __a_unused int fd, int argc, +static int com_catblob(callback_function *f, int fd, int argc, const char **argv) { struct osl_object cat_output = {.data = NULL}; @@ -173,7 +174,7 @@ static int com_catblob(callback_function *f, __a_unused int fd, int argc, return -E_BLOB_SYNTAX; ret = send_standard_callback_request(1, argv + 1, f, &cat_output); if (ret >= 0 && cat_output.data) - printf("%s\n", (char *)cat_output.data); + ret = send_buffer(fd, (char *)cat_output.data); free(cat_output.data); return ret;