diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-06-11 12:18:46 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-06-11 12:18:46 +0200 |
commit | 5db02763d61785529bef538f196c180e968b7c26 (patch) | |
tree | 22ea731c13c6dbda47397fddc3875727f97ff564 /main.c | |
parent | 8f0c8e8e91945a3e5c3fa7111b2a3494b731b32c (diff) |
netifd: process reload calls immediately instead of going through a timer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -211,22 +211,17 @@ static void netifd_do_restart(struct uloop_timeout *timeout) execvp(global_argv[0], global_argv); } -static void netifd_do_reload(struct uloop_timeout *timeout) -{ - config_init_all(); -} - -static struct uloop_timeout main_timer; - void netifd_reload(void) { - main_timer.cb = netifd_do_reload; - uloop_timeout_set(&main_timer, 100); + config_init_all(); } void netifd_restart(void) { - main_timer.cb = netifd_do_restart; + static struct uloop_timeout main_timer = { + .cb = netifd_do_restart + }; + interface_set_down(NULL); uloop_timeout_set(&main_timer, 1000); } |