summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ppp_auth.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-05-18 01:04:19 +0000
committerDmitry Kozlov <xeb@mail.ru>2014-05-18 02:15:25 +0000
commitd5c3630d92b329735048b228878bb3ae137799cc (patch)
tree2e7ae38e67170ef8f7ce502e40e3d6fbecd06903 /accel-pppd/ppp/ppp_auth.c
parentec41e172a9da0de7cf5c28027928c698d0d1ebf8 (diff)
downloadaccel-ppp-d5c3630d92b329735048b228878bb3ae137799cc.tar.gz
accel-ppp-d5c3630d92b329735048b228878bb3ae137799cc.zip
improved single-session=replace handling
Wait for previous session completely terminated before continuing authorization new session.
Diffstat (limited to 'accel-pppd/ppp/ppp_auth.c')
-rw-r--r--accel-pppd/ppp/ppp_auth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ppp/ppp_auth.c b/accel-pppd/ppp/ppp_auth.c
index 0510358..b32400e 100644
--- a/accel-pppd/ppp/ppp_auth.c
+++ b/accel-pppd/ppp/ppp_auth.c
@@ -336,10 +336,10 @@ int __export ppp_auth_succeeded(struct ppp_t *ppp, char *username)
{
struct auth_layer_data_t *ad = container_of(ppp_find_layer_data(ppp, &auth_layer), typeof(*ad), ld);
- if (ap_session_check_single(username))
+ if (ap_session_set_username(&ppp->ses, username)) {
+ _free(username);
return -1;
-
- ppp->ses.username = username;
+ }
triton_context_call(ppp->ses.ctrl->ctx, (triton_event_func)__ppp_auth_started, ppp);