projects
/
project
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fc1b008
)
main: only purge uci savedirs if not reloading
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 5 Sep 2013 12:26:14 +0000
(14:26 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 5 Sep 2013 12:38:01 +0000
(14:38 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 9bebd3e4fe18768b543a2bbf291c959ff4a96576..5a608c270958aba77d758c322c9bc2227d967f34 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-52,11
+52,13
@@
exec_self(int argc, char **argv)
for (i = 0; i < argc; i++)
args[i] = argv[i];
for (i = 0; i < argc; i++)
args[i] = argv[i];
+ setenv("RPC_HANGUP", "1", 1);
execv(cmd, (char * const *)args);
}
int main(int argc, char **argv)
{
execv(cmd, (char * const *)args);
}
int main(int argc, char **argv)
{
+ const char *hangup;
const char *ubus_socket = NULL;
int ch;
const char *ubus_socket = NULL;
int ch;
@@
-88,7
+90,12
@@
int main(int argc, char **argv)
rpc_uci_api_init(ctx);
rpc_plugin_api_init(ctx);
rpc_uci_api_init(ctx);
rpc_plugin_api_init(ctx);
- rpc_session_thaw();
+ hangup = getenv("RPC_HANGUP");
+
+ if (!hangup || strcmp(hangup, "1"))
+ rpc_uci_purge_savedirs();
+ else
+ rpc_session_thaw();
uloop_run();
ubus_free(ctx);
uloop_run();
ubus_free(ctx);