Rename the extern int to denote a global symbol.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
uloop_process_add(&c->process);
c->timeout.cb = rpc_exec_timeout_cb;
- uloop_timeout_set(&c->timeout, exec_timeout);
+ uloop_timeout_set(&c->timeout, rpc_exec_timeout);
if (c->stdin_cb)
{
uloop_process_add(&c->process);
c->timeout.cb = rpc_file_exec_timeout_cb;
- uloop_timeout_set(&c->timeout, exec_timeout);
+ uloop_timeout_set(&c->timeout, rpc_exec_timeout);
close(opipe[1]);
close(epipe[1]);
ustream_fd_init(&us, fd); \
} while(0)
-extern int exec_timeout;
+extern int rpc_exec_timeout;
typedef int (*rpc_exec_write_cb_t)(struct ustream *, void *);
typedef int (*rpc_exec_read_cb_t)(struct blob_buf *, char *, int, void *);
static struct ubus_context *ctx;
static bool respawn = false;
-int exec_timeout = RPC_EXEC_DEFAULT_TIMEOUT;
+int rpc_exec_timeout = RPC_EXEC_DEFAULT_TIMEOUT;
static void
handle_signal(int sig)
break;
case 't':
- exec_timeout = 1000 * strtol(optarg, NULL, 0);
+ rpc_exec_timeout = 1000 * strtol(optarg, NULL, 0);
break;
default:
}
}
- if (exec_timeout < 1000 || exec_timeout > 600000) {
+ if (rpc_exec_timeout < 1000 || rpc_exec_timeout > 600000) {
fprintf(stderr, "Invalid execution timeout specified\n");
return -1;
}