support passing args to request handle for elimination of global var
This commit is contained in:
parent
79124c6e5c
commit
486b38d679
8 changed files with 120 additions and 19 deletions
|
|
@ -83,7 +83,7 @@ typedef struct {
|
|||
static run_job_t run_jobs[MAX_RUN_JOBS];
|
||||
static run_task_t run_tasks[MAX_RUN_TASKS];
|
||||
|
||||
static int myreq_handler(xce_request_t*);
|
||||
static int myreq_handler(xce_request_t*, void*);
|
||||
|
||||
extern int cmd_help(int, char*[]);
|
||||
extern int cmd_up(int, char*[]);
|
||||
|
|
@ -265,7 +265,7 @@ int enter_ctx(command_ctx_t* ctx)
|
|||
config.key = get_setting("secret");
|
||||
|
||||
xcecli_ctx_init(&(ctx->ctx), &config);
|
||||
xcecli_set_handler(ctx->ctx, &myreq_handler);
|
||||
xcecli_set_handler(ctx->ctx, &myreq_handler, NULL);
|
||||
xcecli_start(ctx->ctx);
|
||||
|
||||
return 0;
|
||||
|
|
@ -2100,7 +2100,7 @@ static int handle_runtasks(xce_request_t* request)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int myreq_handler(xce_request_t* request)
|
||||
static int myreq_handler(xce_request_t* request, void* args)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue