]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-641 Windows: Don't report "unknown command" on console when empty command...
authorJeff Lenk <jeff@jefflenk.com>
Tue, 27 Jul 2010 14:23:56 +0000 (09:23 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Tue, 27 Jul 2010 14:23:56 +0000 (09:23 -0500)
src/switch_console.c

index 472cdc48d3a53c27f1e53d79368f88c55e2c638f..e82290bce721d2234a787fc70ca649d3b261c1a9 100644 (file)
@@ -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));
                        }
                }