Register dummy stderr callback when ivoking plugins calls to avoid filling the ustream with unread data.
This commit is contained in:
parent
3cac366777
commit
0b4d4aeeac
1 changed files with 8 additions and 2 deletions
10
plugin.c
10
plugin.c
|
@ -93,6 +93,12 @@ rpc_plugin_call_stdout_cb(struct blob_buf *blob, char *buf, int len, void *priv)
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
rpc_plugin_call_stderr_cb(struct blob_buf *blob, char *buf, int len, void *priv)
|
||||||
|
{
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rpc_plugin_call_finish_cb(struct blob_buf *blob, int stat, void *priv)
|
rpc_plugin_call_finish_cb(struct blob_buf *blob, int stat, void *priv)
|
||||||
{
|
{
|
||||||
|
@ -160,8 +166,8 @@ rpc_plugin_call(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
c->argv[2] = c->method;
|
c->argv[2] = c->method;
|
||||||
|
|
||||||
return rpc_exec(c->argv, rpc_plugin_call_stdin_cb,
|
return rpc_exec(c->argv, rpc_plugin_call_stdin_cb,
|
||||||
rpc_plugin_call_stdout_cb, NULL, rpc_plugin_call_finish_cb,
|
rpc_plugin_call_stdout_cb, rpc_plugin_call_stderr_cb,
|
||||||
c, ctx, req);
|
rpc_plugin_call_finish_cb, c, ctx, req);
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (c)
|
if (c)
|
||||||
|
|
Loading…
Reference in a new issue