From c8f9fb565c2e72d3db08a587479dbb97e1ca4eb5 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Tue, 27 Jul 2010 09:23:56 -0500 Subject: [PATCH] FSCORE-641 Windows: Don't report "unknown command" on console when empty command has been given --- src/switch_console.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/switch_console.c b/src/switch_console.c index 472cdc48d3..e82290bce7 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -1472,11 +1472,12 @@ SWITCH_DECLARE(void) switch_console_loop(void) if (console_readConsole(stdinHandle, keys, (int) sizeof(keys), &read, &key)) { if (console_bufferInput(keys, read, cmd, key)) { if (!strcmp(cmd, "Empty")) { - cmd[0] = '\n'; - cmd[1] = 0; + cmd[0] = 0; } activity = 1; - running = switch_console_process(cmd); + if (cmd[0]) { + running = switch_console_process(cmd); + } memset(cmd, 0, sizeof(cmd)); } }