diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2021-09-24 18:59:41 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2021-09-24 18:59:41 +0300 |
commit | ff91c7376f2a6200be7ea90d36411e1acb4cd9c8 (patch) | |
tree | e80d68f8a651d68d6c69aa26b9b02ddcdd6f67b2 | |
parent | 3b01433a2e00a3489fc2a746078d79530a450015 (diff) | |
parent | fb615c9b18ddc6f40f58860fe4ec6f92b52af51e (diff) | |
download | accel-ppp-ff91c7376f2a6200be7ea90d36411e1acb4cd9c8.tar.gz accel-ppp-ff91c7376f2a6200be7ea90d36411e1acb4cd9c8.zip |
Merge branch 'master' of github.com:accel-ppp/accel-ppp
-rw-r--r-- | accel-pppd/logs/log_file.c | 2 | ||||
-rw-r--r-- | accel-pppd/session.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/logs/log_file.c b/accel-pppd/logs/log_file.c index 42d9f3f..481afa1 100644 --- a/accel-pppd/logs/log_file.c +++ b/accel-pppd/logs/log_file.c @@ -268,7 +268,7 @@ static struct ap_private *find_pd(struct ap_session *ses, void *pd_key) struct list_head *pos, *next; list_for_each_safe(pos, next, &ses->pd_list) { - pd = list_entry(pos->next, typeof(*pd), entry); + pd = list_entry(pos, typeof(*pd), entry); if (pd->key == pd_key) { return pd; } diff --git a/accel-pppd/session.c b/accel-pppd/session.c index 1411f24..78d12f9 100644 --- a/accel-pppd/session.c +++ b/accel-pppd/session.c @@ -278,6 +278,8 @@ void __export ap_session_terminate(struct ap_session *ses, int cause, int hard) if (ses->terminating) { if (hard) ses->ctrl->terminate(ses, hard); + else if (ses->state == AP_STATE_FINISHING) + ses->ctrl->terminate(ses, 1); return; } |