diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2020-03-07 04:25:00 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2020-03-07 04:31:11 +0500 |
commit | 6b04e5778c1c0c9686066dd44caccfd755917c25 (patch) | |
tree | b6cceaeba9dcdfe649976210329ae3e698b60e58 /accel-pppd/session.c | |
parent | a76cfa750c2176b3156dcc65968aff8c90496de0 (diff) | |
download | accel-ppp-6b04e5778c1c0c9686066dd44caccfd755917c25.tar.gz accel-ppp-6b04e5778c1c0c9686066dd44caccfd755917c25.zip |
session: add global [common]max-starting option
usually there's no need to have per-proto limitation, since the need
of max starting limitation affects the whole server, not particular
protocol only.
Diffstat (limited to 'accel-pppd/session.c')
-rw-r--r-- | accel-pppd/session.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/accel-pppd/session.c b/accel-pppd/session.c index 81247d18..8ef569e6 100644 --- a/accel-pppd/session.c +++ b/accel-pppd/session.c @@ -36,6 +36,7 @@ static int conf_sid_source; static int conf_seq_save_timeout = 10; static const char *conf_seq_file; int __export conf_max_sessions; +int __export conf_max_starting; pthread_rwlock_t __export ses_lock = PTHREAD_RWLOCK_INITIALIZER; __export LIST_HEAD(ses_list); @@ -542,6 +543,12 @@ static void load_config(void) conf_max_sessions = atoi(opt); else conf_max_sessions = 0; + + opt = conf_get_opt("common", "max-starting"); + if (opt) + conf_max_starting = atoi(opt); + else + conf_max_starting = 0; } static void init(void) |