diff options
author | Kozlov Dmitry <dima@server> | 2010-12-27 15:25:38 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-12-27 15:25:38 +0300 |
commit | 2b34d862111f1fd84cdb9d744ac34c1c933f34da (patch) | |
tree | 1e758ddc96689793e1c4c1b55cf3671bb05f2884 /accel-pptpd/extra/pppd_compat.c | |
parent | ccaeb500e38d82c37568292d7850b66691793626 (diff) | |
download | accel-ppp-2b34d862111f1fd84cdb9d744ac34c1c933f34da.tar.gz accel-ppp-2b34d862111f1fd84cdb9d744ac34c1c933f34da.zip |
implemented partial config reload via SIGUSR1 signal or cli
Diffstat (limited to 'accel-pptpd/extra/pppd_compat.c')
-rw-r--r-- | accel-pptpd/extra/pppd_compat.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/accel-pptpd/extra/pppd_compat.c b/accel-pptpd/extra/pppd_compat.c index 3a28c939..f6e85b02 100644 --- a/accel-pptpd/extra/pppd_compat.c +++ b/accel-pptpd/extra/pppd_compat.c @@ -151,7 +151,7 @@ static void ev_ppp_pre_up(struct ppp_t *ppp) if (conf_verbose) log_ppp_info2("pppd_compat: ip-pre-up started (pid %i)\n", pid); sigchld_unlock(); - triton_context_schedule(pd->ppp->ctrl->ctx); + triton_context_schedule(); pthread_mutex_lock(&pd->ip_pre_up_hnd.lock); pthread_mutex_unlock(&pd->ip_pre_up_hnd.lock); if (pd->res != 0) { @@ -274,7 +274,7 @@ static void ev_ppp_finished(struct ppp_t *ppp) if (conf_verbose) log_ppp_info2("pppd_compat: ip-down started (pid %i)\n", pid); sigchld_unlock(); - triton_context_schedule(pd->ppp->ctrl->ctx); + triton_context_schedule(); pthread_mutex_lock(&pd->ip_down_hnd.lock); pthread_mutex_unlock(&pd->ip_down_hnd.lock); } else if (pid == 0) { @@ -344,7 +344,7 @@ static void ev_radius_coa(struct ev_radius_t *ev) sigchld_unlock(); if (conf_verbose) log_ppp_info2("pppd_compat: ip-change started (pid %i)\n", pid); - triton_context_schedule(pd->ppp->ctrl->ctx); + triton_context_schedule(); if (!ev->res) ev->res = pd->res; } else if (pid == 0) { @@ -490,23 +490,23 @@ static void __init init(void) opt = conf_get_opt("pppd-compat", "ip-pre-up"); if (opt) - conf_ip_pre_up = opt; + conf_ip_pre_up = _strdup(opt); opt = conf_get_opt("pppd-compat", "ip-up"); if (opt) - conf_ip_up = opt; + conf_ip_up = _strdup(opt); opt = conf_get_opt("pppd-compat", "ip-down"); if (opt) - conf_ip_down = opt; + conf_ip_down = _strdup(opt); opt = conf_get_opt("pppd-compat", "ip-change"); if (opt) - conf_ip_change = opt; + conf_ip_change = _strdup(opt); opt = conf_get_opt("pppd-compat", "radattr-prefix"); if (opt) - conf_radattr_prefix = opt; + conf_radattr_prefix = _strdup(opt); opt = conf_get_opt("pppd-compat", "verbose"); if (opt && atoi(opt) > 0) @@ -522,4 +522,3 @@ static void __init init(void) triton_event_register_handler(EV_RADIUS_COA, (triton_event_func)ev_radius_coa); #endif } - |