diff options
author | Vladislav Grishenko <themiron@users.noreply.github.com> | 2021-09-20 21:06:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 21:06:53 +0300 |
commit | fb615c9b18ddc6f40f58860fe4ec6f92b52af51e (patch) | |
tree | b87c44be4f5c186ecaaedbd0266adece64540408 /accel-pppd | |
parent | faf7d93f34f588e0a8b1f1acc9ab421702831dc4 (diff) | |
parent | 2117fb22a60973e773ccf97c17cd2b48e78f6d76 (diff) | |
download | accel-ppp-fb615c9b18ddc6f40f58860fe4ec6f92b52af51e.tar.gz accel-ppp-fb615c9b18ddc6f40f58860fe4ec6f92b52af51e.zip |
Merge pull request #22 from DmitriyEshenko/master
Fix logging per-user-dir. Add possibility to drop session hard if it already has finish state
Diffstat (limited to 'accel-pppd')
-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; } |