提交 e794ed9a authored 作者: Anthony Minessale's avatar Anthony Minessale

dont transmit console replies over the logger engine

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10996 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 841bec48
......@@ -249,10 +249,18 @@ static int switch_console_process(char *cmd, int rec)
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 {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论