]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 30 Apr 2007 23:56:27 +0000 (23:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 30 Apr 2007 23:56:27 +0000 (23:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5046 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_console.c
src/switch_core.c

index 2faea6e40c07de85ed4b9560dd46113bd3426a00..e239936523baebec5aea128426946465171450eb 100644 (file)
@@ -184,7 +184,7 @@ static char prompt_str[512] = "";
 char * prompt(EditLine *e) {
        if (switch_strlen_zero(prompt_str)) {
                gethostname(hostname, sizeof(hostname));
-               snprintf(prompt_str, sizeof(prompt_str), "\nfreeswitch@%s> ", hostname);
+               snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", hostname);
        }       
 
        return prompt_str;
@@ -220,7 +220,15 @@ SWITCH_DECLARE(void) switch_console_loop(void)
        history(myhistory, &ev, H_LOAD, hfile);
 
        while (running) {
+               uint32_t arg;
+
+               switch_core_session_ctl(SCSC_CHECK_RUNNING, &arg);
+               if (!arg) {
+                       break;
+               }
+
                line = el_gets(el, &count);
+
                if (count > 1) {
                        if (!switch_strlen_zero(line)) {
                                char *cmd = strdup(line);
index f6447ddf8aa423f556867bc10aeefd3192bed453..264377848148dca857bc4c62ee32f63ffbc66ec9 100644 (file)
@@ -613,7 +613,6 @@ SWITCH_DECLARE(switch_time_t) switch_core_uptime(void)
 
 SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, uint32_t * val)
 {
-
        if (runtime.shutting_down) {
                return -1;
        }