projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interface: report link up events for force_link interfaces
[project/netifd.git]
/
main.c
diff --git
a/main.c
b/main.c
index
c5e8e67
..
5717b81
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-173,9
+173,6
@@
netifd_start_process(const char **argv, char **env, struct netifd_process *proc)
exit(127);
}
exit(127);
}
- if (pid < 0)
- goto error;
-
close(pfds[1]);
proc->uloop.cb = netifd_process_cb;
proc->uloop.pid = pid;
close(pfds[1]);
proc->uloop.cb = netifd_process_cb;
proc->uloop.pid = pid;
@@
-211,22
+208,17
@@
static void netifd_do_restart(struct uloop_timeout *timeout)
execvp(global_argv[0], global_argv);
}
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)
{
void netifd_reload(void)
{
- main_timer.cb = netifd_do_reload;
- uloop_timeout_set(&main_timer, 100);
+ config_init_all();
}
void netifd_restart(void)
{
}
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);
}
interface_set_down(NULL);
uloop_timeout_set(&main_timer, 1000);
}