diff options
author | Kozlov Dmitry <dima@server> | 2010-12-06 17:33:09 +0300 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-12-06 17:33:09 +0300 |
commit | deecc72f6a96153d93dccd547177676bc878a3f3 (patch) | |
tree | 72f648a13c2458f2715db2c366f9eb52eeb47623 /accel-pptpd/ctrl | |
parent | bdf38bdf25400e175d8b20c087c9919199fe8b6e (diff) | |
download | accel-ppp-deecc72f6a96153d93dccd547177676bc878a3f3.tar.gz accel-ppp-deecc72f6a96153d93dccd547177676bc878a3f3.zip |
switch logs on contexts which dosn't handles ppp too so potential race conditions may be arised
Diffstat (limited to 'accel-pptpd/ctrl')
-rw-r--r-- | accel-pptpd/ctrl/l2tp/l2tp.c | 5 | ||||
-rw-r--r-- | accel-pptpd/ctrl/pppoe/pppoe.c | 1 | ||||
-rw-r--r-- | accel-pptpd/ctrl/pptp/pptp.c | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/accel-pptpd/ctrl/l2tp/l2tp.c b/accel-pptpd/ctrl/l2tp/l2tp.c index 2314748..cb891b6 100644 --- a/accel-pptpd/ctrl/l2tp/l2tp.c +++ b/accel-pptpd/ctrl/l2tp/l2tp.c @@ -1043,8 +1043,9 @@ static void l2tp_udp_close(struct triton_context_t *ctx) static struct l2tp_serv_t udp_serv = { - .hnd.read=l2tp_udp_read, - .ctx.close=l2tp_udp_close, + .hnd.read = l2tp_udp_read, + .ctx.close = l2tp_udp_close, + .ctx.before_switch = log_switch, }; /*static struct l2tp_serv_t ip_serv = diff --git a/accel-pptpd/ctrl/pppoe/pppoe.c b/accel-pptpd/ctrl/pppoe/pppoe.c index 839c716..b5a9189 100644 --- a/accel-pptpd/ctrl/pppoe/pppoe.c +++ b/accel-pptpd/ctrl/pppoe/pppoe.c @@ -1051,6 +1051,7 @@ void pppoe_server_start(const char *ifname, void *cli) } serv->ctx.close = pppoe_serv_close; + serv->ctx.before_switch = log_switch; serv->hnd.fd = sock; serv->hnd.read = pppoe_serv_read; serv->ifname = _strdup(ifname); diff --git a/accel-pptpd/ctrl/pptp/pptp.c b/accel-pptpd/ctrl/pptp/pptp.c index 8a1cbbe..f7ffee0 100644 --- a/accel-pptpd/ctrl/pptp/pptp.c +++ b/accel-pptpd/ctrl/pptp/pptp.c @@ -680,8 +680,9 @@ static void pptp_serv_close(struct triton_context_t *ctx) static struct pptp_serv_t serv= { - .hnd.read=pptp_connect, - .ctx.close=pptp_serv_close, + .hnd.read = pptp_connect, + .ctx.close = pptp_serv_close, + .ctx.before_switch = log_switch, }; static int show_stat_exec(const char *cmd, char * const *fields, int fields_cnt, void *client) |