summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2016-03-18 13:40:07 +0300
committerDmitry Kozlov <xeb@mail.ru>2016-03-18 13:40:07 +0300
commitecee62f204a93c7f512dce46657fbd101d155d78 (patch)
treed2fbe940bd94e7a93310651dceaf7c27e4866b75 /accel-pppd/ctrl/ipoe
parent862f1cbfe781098be2263443fc108a46f521a163 (diff)
downloadaccel-ppp-ecee62f204a93c7f512dce46657fbd101d155d78.tar.gz
accel-ppp-ecee62f204a93c7f512dce46657fbd101d155d78.zip
make termination caused by SIGTERM soft
Diffstat (limited to 'accel-pppd/ctrl/ipoe')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index c986c63b..63df0660 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -1097,7 +1097,7 @@ static int ipoe_session_terminate(struct ap_session *s, int hard)
{
struct ipoe_session *ses = container_of(s, typeof(*ses), ses);
- if (hard || !conf_soft_terminate || ses->UP)
+ if (hard || !conf_soft_terminate || ses->UP || ap_shutdown)
ipoe_session_terminated(ses);
else
ses->terminate = 1;
@@ -2068,8 +2068,8 @@ static void ipoe_serv_close(struct triton_context_t *ctx)
struct ipoe_serv *serv = container_of(ctx, typeof(*serv), ctx);
pthread_mutex_lock(&serv->lock);
+ serv->need_close = 1;
if (!list_empty(&serv->sessions)) {
- serv->need_close = 1;
pthread_mutex_unlock(&serv->lock);
return;
}