From 6ab2671259ebfc683af69b57f400457bbbe169eb Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 23 Mar 2015 06:53:52 +0100 Subject: Improve sync/async execution of up/down scripts --- src/fastd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fastd.c') diff --git a/src/fastd.c b/src/fastd.c index 19fa10f..5ac1967 100644 --- a/src/fastd.c +++ b/src/fastd.c @@ -207,14 +207,14 @@ static void close_sockets(void) { /** Calls the on-pre-up command */ static inline void on_pre_up(void) { - fastd_shell_command_exec(&conf.on_pre_up, NULL); + fastd_shell_command_exec_sync(&conf.on_pre_up, NULL, NULL); } /** Calls the on-up command */ static inline void on_up(fastd_iface_t *iface) { fastd_shell_env_t *env = fastd_shell_env_alloc(); fastd_shell_env_set_iface(env, iface); - fastd_shell_command_exec(&conf.on_up, env); + fastd_shell_command_exec_sync(&conf.on_up, env, NULL); fastd_shell_env_free(env); } @@ -222,7 +222,7 @@ static inline void on_up(fastd_iface_t *iface) { static inline void on_down(fastd_iface_t *iface) { fastd_shell_env_t *env = fastd_shell_env_alloc(); fastd_shell_env_set_iface(env, iface); - fastd_shell_command_exec(&conf.on_down, env); + fastd_shell_command_exec_sync(&conf.on_down, env, NULL); fastd_shell_env_free(env); } -- cgit v1.2.3