git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@930 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-03-26 17:42:06 +00:00
parent bcb9d08d77
commit d22db18b4b
3 changed files with 39 additions and 9 deletions

View File

@@ -31,11 +31,12 @@
*/
#include <switch_console.h>
#include <switch.h>
#define CMD_BUFLEN SWITCH_RECCOMMENDED_BUFFER_SIZE * 10
static int switch_console_process(char *cmd)
{
char *arg = NULL;
char *retbuf = (char *)malloc(SWITCH_RECCOMMENDED_BUFFER_SIZE * 10);
char *retbuf = (char *)malloc(CMD_BUFLEN);
#ifdef EMBED_PERL
const char *perlhelp = "perl - execute some perl. (print to STDERR if you want to see it.)\n";
@@ -73,7 +74,7 @@ static int switch_console_process(char *cmd)
if ((arg = strchr(cmd, ' ')) != 0) {
*arg++ = '\0';
}
if (switch_api_execute(cmd, arg, retbuf, sizeof(retbuf)) == SWITCH_STATUS_SUCCESS) {
if (switch_api_execute(cmd, arg, retbuf, CMD_BUFLEN) == SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE_CLEAN, "API CALL [%s(%s)] output:\n%s\n", cmd, arg ? arg : "",
retbuf);
} else {