summaryrefslogtreecommitdiff
path: root/accel-pppd/session.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2017-12-26 20:46:01 +0300
committerDmitry Kozlov <xeb@mail.ru>2017-12-26 20:46:06 +0300
commitc767ca5d3c09d8f64dbfa05e86fde1fd5d702083 (patch)
treedb66e2dec5c5a3fdf1a5178782079a40fca4cc74 /accel-pppd/session.c
parentb8bf4001c5ae882153acc3a3632281c51662866c (diff)
downloadaccel-ppp-c767ca5d3c09d8f64dbfa05e86fde1fd5d702083.tar.gz
accel-ppp-c767ca5d3c09d8f64dbfa05e86fde1fd5d702083.zip
reworked context priorities
Introduced 4 priorities: 0 - management (cli) 1 - starting sessions (default priority) 2 - active sessions 3 - finishing sessions
Diffstat (limited to 'accel-pppd/session.c')
-rw-r--r--accel-pppd/session.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/session.c b/accel-pppd/session.c
index 3c559398..f96c193b 100644
--- a/accel-pppd/session.c
+++ b/accel-pppd/session.c
@@ -169,6 +169,8 @@ void __export ap_session_activate(struct ap_session *ses)
triton_timer_add(ses->ctrl->ctx, &ses->timer, 0);
}
+ triton_context_set_priority(ses->ctrl->ctx, 2);
+
#ifdef USE_BACKUP
if (!ses->backup)
backup_save_session(ses);
@@ -265,6 +267,8 @@ void __export ap_session_terminate(struct ap_session *ses, int cause, int hard)
if (ses->terminated)
return;
+ triton_context_set_priority(ses->ctrl->ctx, 3);
+
if (!ses->stop_time)
ses->stop_time = _time();