X-Git-Url: http://git.archive.openwrt.org/?p=project%2Frpcd.git;a=blobdiff_plain;f=file.c;h=b0bdd99397f42107dc7a72b928875a008ed1519f;hp=d4198460b8873bf6f3666d3dfabf118fbfb455bf;hb=6a00d27ae5bc3985de32d1cad6c734816df0098a;hpb=bea6a818756e6c2edbdddcedac26f8e1e29affde diff --git a/file.c b/file.c index d419846..b0bdd99 100644 --- a/file.c +++ b/file.c @@ -45,7 +45,6 @@ enum { RPC_E_CMD, RPC_E_PARM, RPC_E_ENV, - RPC_E_MODE, __RPC_E_MAX, }; @@ -53,7 +52,6 @@ static const struct blobmsg_policy rpc_exec_policy[__RPC_E_MAX] = { [RPC_E_CMD] = { .name = "command", .type = BLOBMSG_TYPE_STRING }, [RPC_E_PARM] = { .name = "params", .type = BLOBMSG_TYPE_ARRAY }, [RPC_E_ENV] = { .name = "env", .type = BLOBMSG_TYPE_TABLE }, - [RPC_E_MODE] = { .name = "mode", .type = BLOBMSG_TYPE_STRING }, }; static const char *d_types[] = { @@ -383,7 +381,7 @@ static void rpc_file_exec_opipe_read_cb(struct ustream *s, int bytes) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, opipe); + container_of(s, struct rpc_file_exec_context, opipe.stream); if (ustream_read_buf_full(s)) rpc_file_exec_reply(c, UBUS_STATUS_NOT_SUPPORTED); @@ -393,7 +391,7 @@ static void rpc_file_exec_epipe_read_cb(struct ustream *s, int bytes) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, epipe); + container_of(s, struct rpc_file_exec_context, epipe.stream); if (ustream_read_buf_full(s)) rpc_file_exec_reply(c, UBUS_STATUS_NOT_SUPPORTED); @@ -403,7 +401,7 @@ static void rpc_file_exec_opipe_state_cb(struct ustream *s) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, opipe); + container_of(s, struct rpc_file_exec_context, opipe.stream); if (c->opipe.stream.eof && c->epipe.stream.eof) rpc_file_exec_reply(c, UBUS_STATUS_OK); @@ -413,7 +411,7 @@ static void rpc_file_exec_epipe_state_cb(struct ustream *s) { struct rpc_file_exec_context *c = - container_of(s, struct rpc_file_exec_context, epipe); + container_of(s, struct rpc_file_exec_context, epipe.stream); if (c->opipe.stream.eof && c->epipe.stream.eof) rpc_file_exec_reply(c, UBUS_STATUS_OK);