From b13905663dc570fc9631d5063468f55b0a5a628d Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 9 Sep 2014 21:19:58 +0400 Subject: updated procedure to check double sessions drop existing sessions immediately and continue rather than wait full session termination --- accel-pppd/session.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'accel-pppd/session.c') diff --git a/accel-pppd/session.c b/accel-pppd/session.c index ac8633e..cff5b30 100644 --- a/accel-pppd/session.c +++ b/accel-pppd/session.c @@ -332,21 +332,14 @@ int __export ap_session_set_username(struct ap_session *s, char *username) log_ppp_info1("%s: second session denied\n", username); return -1; } else { - if (conf_single_session == 1) { - if (ses->wakeup) - continue; - //ap_session_ifdown(ses); - ses->wakeup = s->ctrl->ctx; - wait = 1; - triton_context_call(ses->ctrl->ctx, (triton_event_func)__terminate_sec, ses); - } + ap_session_ifdown(ses); + triton_context_call(ses->ctrl->ctx, (triton_event_func)__terminate_sec, ses); + continue; } - break; } } - s->username = username; - } else - s->username = username; + } + s->username = username; pthread_rwlock_unlock(&ses_lock); if (wait) -- cgit v1.2.3