*
* \sa \ref callback_result_handler, \ref sc_send_bin_buffer().
*/
-int sc_send_result(struct osl_object *result, void *private)
+int afs_cb_result_handler(struct osl_object *result, void *private)
{
struct command_context *cc = private;
int ret;
query.data = cc->argv[1];
query.size = strlen(cc->argv[1]) + 1;
return send_callback_request(com_select_callback, &query,
- &sc_send_result, cc);
+ &afs_cb_result_handler, cc);
}
static void init_admissible_files(char *arg)
}
}
ret = send_callback_request(create_tables_callback, &query,
- sc_send_result, cc);
+ afs_cb_result_handler, cc);
if (ret < 0)
/* ignore return value */
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
flags = ~0U;
if (flags & CHECK_AFT) {
ret = send_callback_request(aft_check_callback, NULL,
- sc_send_result, cc);
+ afs_cb_result_handler, cc);
if (ret < 0)
return ret;
}
if (flags & CHECK_PLAYLISTS) {
ret = send_callback_request(playlist_check_callback,
- NULL, sc_send_result, cc);
+ NULL, afs_cb_result_handler, cc);
if (ret < 0)
return ret;
}
if (flags & CHECK_MOODS) {
ret = send_callback_request(mood_check_callback, NULL,
- sc_send_result, cc);
+ afs_cb_result_handler, cc);
if (ret < 0)
return ret;
}
* \sa \ref send_callback_request().
*/
typedef int callback_result_handler(struct osl_object *result, void *private);
-int sc_send_result(struct osl_object *result, void *private);
+int afs_cb_result_handler(struct osl_object *result, void *private);
int pass_buffer_as_shm(char *buf, size_t size, void *fd_ptr);
-
/** Structure passed to the AFS max_size handler. */
struct afs_max_size_handler_data {
/** Local socket connecting the command handler and the AFS process. */
opts.mode = mode;
opts.num_patterns = cc->argc - i;
ret = send_option_arg_callback_request(&query, opts.num_patterns,
- cc->argv + i, com_ls_callback, sc_send_result, cc);
+ cc->argv + i, com_ls_callback, afs_cb_result_handler, cc);
return ret;
}
}
save_add_callback_buffer(hash, path, afhi_ptr, pad->flags, format_num, &obj);
/* Ask afs to consider this entry for adding. */
- ret = send_callback_request(com_add_callback, &obj, sc_send_result, pad->cc);
+ ret = send_callback_request(com_add_callback, &obj,
+ afs_cb_result_handler, pad->cc);
goto out_free;
out_unmap:
if (i >= cc->argc)
return -E_AFT_SYNTAX;
ret = send_option_arg_callback_request(&query, cc->argc - i,
- cc->argv + i, com_touch_callback, sc_send_result, cc);
+ cc->argv + i, com_touch_callback, afs_cb_result_handler, cc);
if (ret < 0)
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
return ret;
if (i >= cc->argc)
return -E_AFT_SYNTAX;
ret = send_option_arg_callback_request(&query, cc->argc - i,
- cc->argv + i, com_rm_callback, sc_send_result, cc);
+ cc->argv + i, com_rm_callback, afs_cb_result_handler, cc);
if (ret < 0)
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
return ret;
if (!(flags & ~CPSI_FLAG_VERBOSE)) /* no copy flags given */
flags = ~(unsigned)CPSI_FLAG_VERBOSE | flags;
ret = send_option_arg_callback_request(&options, cc->argc - i,
- cc->argv + i, com_cpsi_callback, sc_send_result, cc);
+ cc->argv + i, com_cpsi_callback, afs_cb_result_handler, cc);
if (ret < 0)
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
return ret;
struct osl_object query = {.data = &parser_friendly,
.size = sizeof(parser_friendly)};
- return send_callback_request(afs_stat_callback, &query, sc_send_result, cc);
+ return send_callback_request(afs_stat_callback, &query,
+ afs_cb_result_handler, cc);
}
/* TODO: optionally fix problems by removing offending rows */
}
}
ret = send_option_arg_callback_request(&options, cc->argc - i, cc->argv + i,
- com_lsatt_callback, sc_send_result, cc);
+ com_lsatt_callback, afs_cb_result_handler, cc);
if (!ret) {
if (cc->argc > 1)
ret = sc_send_va_buffer(&cc->scc, "no matches\n");
if (cc->argc < 2)
return -E_ATTR_SYNTAX;
ret = send_standard_callback_request(cc->argc - 1, cc->argv + 1,
- com_addatt_callback, sc_send_result, cc);
+ com_addatt_callback, afs_cb_result_handler, cc);
if (ret < 0)
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
return ret;
if (cc->argc != 3)
return -E_ATTR_SYNTAX;
ret = send_standard_callback_request(cc->argc - 1, cc->argv + 1,
- com_mvatt_callback, sc_send_result, cc);
+ com_mvatt_callback, afs_cb_result_handler, cc);
if (ret < 0)
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
return ret;
if (cc->argc < 2)
return -E_ATTR_SYNTAX;
ret = send_standard_callback_request(cc->argc - 1, cc->argv + 1,
- com_rmatt_callback, sc_send_result, cc);
+ com_rmatt_callback, afs_cb_result_handler, cc);
if (ret < 0)
sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
return ret;
// 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,
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. */
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,