add a debug_pool param to fsctl
This commit is contained in:
parent
50857cc82d
commit
7256caf278
|
@ -2601,6 +2601,7 @@ SWITCH_DECLARE(int) switch_stream_system_fork(const char *cmd, switch_stream_han
|
|||
SWITCH_DECLARE(int) switch_stream_system(const char *cmd, switch_stream_handle_t *stream);
|
||||
|
||||
SWITCH_DECLARE(switch_call_direction_t) switch_ice_direction(switch_core_session_t *session);
|
||||
SWITCH_DECLARE(void) switch_core_session_debug_pool(switch_stream_handle_t *stream);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
|
|
|
@ -2276,6 +2276,9 @@ SWITCH_STANDARD_API(ctl_function)
|
|||
switch_core_session_ctl(command, &arg);
|
||||
stream->write_function(stream, "+OK\n");
|
||||
|
||||
} else if (!strcasecmp(argv[0], "debug_pool")) {
|
||||
switch_core_session_debug_pool(stream);
|
||||
|
||||
} else if (!strcasecmp(argv[0], "debug_sql")) {
|
||||
int x = 0;
|
||||
switch_core_session_ctl(SCSC_DEBUG_SQL, &x);
|
||||
|
@ -6535,6 +6538,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
|
|||
switch_console_set_complete("add complete del");
|
||||
switch_console_set_complete("add db_cache status");
|
||||
switch_console_set_complete("add fsctl debug_level");
|
||||
switch_console_set_complete("add fsctl debug_pool");
|
||||
switch_console_set_complete("add fsctl debug_sql");
|
||||
switch_console_set_complete("add fsctl last_sps");
|
||||
switch_console_set_complete("add fsctl default_dtmf_duration");
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
#include "switch_core.h"
|
||||
#include "private/switch_core_pvt.h"
|
||||
|
||||
#define DEBUG_THREAD_POOL
|
||||
|
||||
struct switch_session_manager session_manager;
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_set_dmachine(switch_core_session_t *session, switch_ivr_dmachine_t *dmachine, switch_digit_action_target_t target)
|
||||
|
@ -2984,6 +2986,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_refresh_video(switch_core_se
|
|||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_session_debug_pool(switch_stream_handle_t *stream)
|
||||
{
|
||||
stream->write_function(stream, "Thread pool: running:%d busy:%d popping:%d\n",
|
||||
session_manager.running, session_manager.busy, session_manager.popping);
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
|
Loading…
Reference in New Issue