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
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);
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");
#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)
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: