[Freeswitch-svn] [commit] r10996 - freeswitch/trunk/src
FreeSWITCH SVN
anthm at freeswitch.org
Mon Dec 29 15:38:59 PST 2008
Author: anthm
Date: Mon Dec 29 18:38:59 2008
New Revision: 10996
Log:
dont transmit console replies over the logger engine
Modified:
freeswitch/trunk/src/switch_console.c
Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c (original)
+++ freeswitch/trunk/src/switch_console.c Mon Dec 29 18:38:59 2008
@@ -249,10 +249,18 @@
SWITCH_STANDARD_STREAM(stream);
if (stream.data) {
+ FILE *handle = switch_core_get_console();
+
if (switch_api_execute(cmd, arg, NULL, &stream) == SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_CONSOLE, "API CALL [%s(%s)] output:\n%s\n", cmd, arg ? arg : "", (char *) stream.data);
+ if (handle) {
+ fprintf(handle, "API CALL [%s(%s)] output:\n%s\n", cmd, arg ? arg : "", (char *) stream.data);
+ fflush(handle);
+ }
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Unknown Command: %s\n", cmd);
+ if (handle) {
+ fprintf(handle, "Unknown Command: %s\n", cmd);
+ fflush(handle);
+ }
}
free(stream.data);
} else {
More information about the Freeswitch-svn
mailing list