mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
handle invalid log level strings. (FSCORE-69)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6604 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -565,8 +565,13 @@ SWITCH_STANDARD_API(ctl_function)
|
||||
} else {
|
||||
arg = -1;
|
||||
}
|
||||
switch_core_session_ctl(SCSC_LOGLEVEL, &arg);
|
||||
stream->write_function(stream, "+OK log level: %s [%d]\n", switch_log_level2str(arg), arg);
|
||||
|
||||
if (arg == -1 || arg == SWITCH_LOG_INVALID) {
|
||||
stream->write_function(stream, "-ERR syntax error, log level not set!\n");
|
||||
} else {
|
||||
switch_core_session_ctl(SCSC_LOGLEVEL, &arg);
|
||||
stream->write_function(stream, "+OK log level: %s [%d]\n", switch_log_level2str(arg), arg);
|
||||
}
|
||||
} else if (!strcasecmp(argv[0], "last_sps")) {
|
||||
switch_core_session_ctl(SCSC_LAST_SPS, &arg);
|
||||
stream->write_function(stream, "+OK last sessions per second: %d\n", arg);
|
||||
|
Reference in New Issue
Block a user