diff options
| author | xebd <xeb@mail.ru> | 2020-03-10 13:35:47 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-10 13:35:47 +0300 |
| commit | 7afe0f075676219ab4b9e8dbfed294992e9f360b (patch) | |
| tree | 4a7349449ac2072e52b441c813df42be4fec0ae1 /accel-pppd/session.c | |
| parent | 5db4429c75352b636cb8bb441216c4816ee8421f (diff) | |
| parent | 58b41703427284ca849bed7d11087b76ef16a46f (diff) | |
| download | accel-ppp-7afe0f075676219ab4b9e8dbfed294992e9f360b.tar.gz accel-ppp-7afe0f075676219ab4b9e8dbfed294992e9f360b.zip | |
Merge pull request #121 from themiron/max-starting-cleanup
Add global [common]max-starting option
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 81247d1..8ef569e 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) |
