From 088f8c16a67ff31767c9223808cb9ad579980620 Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 5 Mar 2008 20:46:21 +0000 Subject: [PATCH] fix sillyness git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7794 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_console.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/switch_console.c b/src/switch_console.c index e4f40899c7..91f889b5d7 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -252,7 +252,7 @@ static char prompt_str[512] = ""; * If a fnkey is configured then process the command */ static unsigned char console_fnkey_pressed(int i) { - char *c; + char *c, *cmd; assert((i > 0) && (i <= 12)); @@ -265,8 +265,10 @@ static unsigned char console_fnkey_pressed(int i) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "FUNCTION KEY F%d IS NOT BOUND, please edit switch.conf XML file\n", i); return CC_REDISPLAY; } - - switch_console_process(c); + + cmd = strdup(c); + switch_console_process(cmd); + free(cmd); return CC_REDISPLAY; }