summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-11-28 12:07:58 +0100
committerJo-Philipp Wich <jo@mein.io>2018-11-28 12:07:58 +0100
commitccd7c0af75da808ce284a8fb321ce4571bd250af (patch)
treeb0500f810d64ec5678557fddb0eac5b75b45a7a2
parentc79ef222858abf65a7d6fc5f869ec45385dd9021 (diff)
downloadrpcd-ccd7c0af75da808ce284a8fb321ce4571bd250af.tar.gz
treewide: rename exec_timeout to rpc_exec_timeout
Rename the extern int to denote a global symbol. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--exec.c2
-rw-r--r--file.c2
-rw-r--r--include/rpcd/exec.h2
-rw-r--r--main.c6
4 files changed, 6 insertions, 6 deletions
diff --git a/exec.c b/exec.c
index 146e62b..eb52966 100644
--- a/exec.c
+++ b/exec.c
@@ -350,7 +350,7 @@ rpc_exec(const char **args, rpc_exec_write_cb_t in,
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)
{
diff --git a/file.c b/file.c
index fbc099c..e1bc0ac 100644
--- a/file.c
+++ b/file.c
@@ -690,7 +690,7 @@ rpc_file_exec_run(const char *cmd,
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]);
diff --git a/include/rpcd/exec.h b/include/rpcd/exec.h
index 01981fe..928f5ed 100644
--- a/include/rpcd/exec.h
+++ b/include/rpcd/exec.h
@@ -50,7 +50,7 @@
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 *);
diff --git a/main.c b/main.c
index 4ea5f2c..1db3241 100644
--- a/main.c
+++ b/main.c
@@ -33,7 +33,7 @@
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)
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
break;
case 't':
- exec_timeout = 1000 * strtol(optarg, NULL, 0);
+ rpc_exec_timeout = 1000 * strtol(optarg, NULL, 0);
break;
default:
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
}
}
- 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;
}