return -E_BLOB_SYNTAX;
ret = send_option_arg_callback_request(&query, argc - i,
argv + i, f, &ls_output);
return -E_BLOB_SYNTAX;
ret = send_option_arg_callback_request(&query, argc - i,
argv + i, f, &ls_output);
memcpy(output->data, obj.data, obj.size);
return osl_close_disk_object(&obj);
}
memcpy(output->data, obj.data, obj.size);
return osl_close_disk_object(&obj);
}
static int com_catblob(callback_function *f, int fd, int argc,
char * const * const argv)
{
static int com_catblob(callback_function *f, int fd, int argc,
char * const * const argv)
{
if (!*argv[1]) /* empty name is reserved of the dummy row */
return -E_BLOB_SYNTAX;
ret = send_standard_callback_request(1, argv + 1, f, &cat_output);
if (!*argv[1]) /* empty name is reserved of the dummy row */
return -E_BLOB_SYNTAX;
ret = send_standard_callback_request(1, argv + 1, f, &cat_output);
- if (ret >= 0 && cat_output.data)
- ret = send_buffer(fd, (char *)cat_output.data);
+ if (ret > 0)
+ ret = send_bin_buffer(fd, (char *)cat_output.data, cat_output.size);
-static int com_addblob(callback_function *f, __a_unused int fd, int argc,
+static int com_addblob(callback_function *f, int fd, int argc,
PARA_NOTICE_LOG("argv[1]: %s\n", argv[1]);
arg_obj.size = strlen(argv[1]) + 1;
arg_obj.data = (char *)argv[1];
PARA_NOTICE_LOG("argv[1]: %s\n", argv[1]);
arg_obj.size = strlen(argv[1]) + 1;
arg_obj.data = (char *)argv[1];
- return stdin_command(&arg_obj, f, 10 * 1024 * 1024, NULL);
+ return stdin_command(fd, &arg_obj, f, 10 * 1024 * 1024, NULL);
- const struct osl_table_description *desc,
- struct table_info *ti)
+ struct osl_table_description *desc,
+ struct table_info *ti, const char *db)