summaryrefslogtreecommitdiff
path: root/accel-pppd/session.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-09-09 21:19:58 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-09-09 21:20:03 +0400
commitb13905663dc570fc9631d5063468f55b0a5a628d (patch)
tree33358dfcc8a224092d3d658dfa40177707a006bf /accel-pppd/session.c
parentd371f4dd5036cf94feedbcc9d568956361c8b762 (diff)
downloadaccel-ppp-b13905663dc570fc9631d5063468f55b0a5a628d.tar.gz
accel-ppp-b13905663dc570fc9631d5063468f55b0a5a628d.zip
updated procedure to check double sessions
drop existing sessions immediately and continue rather than wait full session termination
Diffstat (limited to 'accel-pppd/session.c')
-rw-r--r--accel-pppd/session.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/accel-pppd/session.c b/accel-pppd/session.c
index ac8633e5..cff5b302 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)