portaudio tweaks

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1311 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-05-01 17:20:30 +00:00
parent b2477412e4
commit 913104b50c
2 changed files with 51 additions and 35 deletions

View File

@@ -61,6 +61,7 @@ static int switch_console_process(char *cmd, char *retbuf, int retlen)
if ((arg = strchr(cmd, ' ')) != 0) {
*arg++ = '\0';
}
if (switch_api_execute(cmd, arg, retbuf, retlen) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_CONSOLE, "API CALL [%s(%s)] output:\n%s\n", cmd, arg ? arg : "", retbuf);
} else {
@@ -136,6 +137,7 @@ SWITCH_DECLARE(void) switch_console_loop(void)
assert(retbuf != NULL);
gethostname(hostname, sizeof(hostname));
memset(retbuf, 0, CMD_BUFLEN);
while (running) {
if (activity) {
@@ -157,7 +159,9 @@ SWITCH_DECLARE(void) switch_console_loop(void)
break;
}
}
if (cmd[0]) {
*retbuf = '\0';
running = switch_console_process(cmd, retbuf, CMD_BUFLEN);
}
}