add max_sessions fsctl command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5812 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d8b5b417ee
commit
7bf2a6ca5d
|
@ -1009,7 +1009,8 @@ typedef enum {
|
|||
SCSC_LOGLEVEL,
|
||||
SCSC_SPS,
|
||||
SCSC_LAST_SPS,
|
||||
SCSC_RECLAIM
|
||||
SCSC_RECLAIM,
|
||||
SCSC_MAX_SESSIONS
|
||||
} switch_session_ctl_t;
|
||||
|
||||
typedef struct apr_pool_t switch_memory_pool_t;
|
||||
|
|
|
@ -121,6 +121,12 @@ SWITCH_STANDARD_API(ctl_function)
|
|||
switch_core_session_ctl(SCSC_SHUTDOWN, &arg);
|
||||
} else if (!strcasecmp(argv[0], "reclaim_mem")) {
|
||||
switch_core_session_ctl(SCSC_RECLAIM, &arg);
|
||||
} else if (!strcasecmp(argv[0], "max_sessions")) {
|
||||
if (argc > 1) {
|
||||
arg = atoi(argv[1]);
|
||||
}
|
||||
switch_core_session_ctl(SCSC_MAX_SESSIONS, &arg);
|
||||
stream->write_function(stream, "max sessions: %d\n", arg);
|
||||
} else if (!strcasecmp(argv[0], "loglevel")) {
|
||||
if (argc > 1) {
|
||||
if (*argv[1] > 47 && *argv[1] < 58) {
|
||||
|
|
|
@ -657,6 +657,9 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, int32_
|
|||
}
|
||||
*val = runtime.hard_log_level;
|
||||
break;
|
||||
case SCSC_MAX_SESSIONS:
|
||||
*val = switch_core_session_limit(*val);
|
||||
break;
|
||||
case SCSC_LAST_SPS:
|
||||
*val = runtime.sps_last;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue