mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 20:47:06 +00:00
add adjustable log level and sps via fsctl
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5793 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
7c125a5d19
commit
0b9482f1fd
3 files changed
+19
-4
No files matched your search
+8
-2
@@ -648,16 +648,22 @@ SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, int32_
|
||||
break;
|
||||
case SCSC_LOGLEVEL:
|
||||
if (*val > -1) {
|
||||
printf("WTF %d\n", *val);
|
||||
runtime.hard_log_level = *val;
|
||||
}
|
||||
|
||||
if (runtime.hard_log_level > SWITCH_LOG_CONSOLE) {
|
||||
printf("WTF %d\n", *val);
|
||||
runtime.hard_log_level = SWITCH_LOG_CONSOLE;
|
||||
}
|
||||
*val = runtime.hard_log_level;
|
||||
break;
|
||||
case SCSC_SPS:
|
||||
switch_mutex_lock(runtime.throttle_mutex);
|
||||
if (*val > 0) {
|
||||
runtime.sps_total = *val;
|
||||
}
|
||||
*val = runtime.sps_total;
|
||||
switch_mutex_unlock(runtime.throttle_mutex);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user