[Freeswitch-svn] [commit] r5046 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Apr 30 19:56:27 EDT 2007


Author: anthm
Date: Mon Apr 30 19:56:27 2007
New Revision: 5046

Modified:
   freeswitch/trunk/src/switch_console.c
   freeswitch/trunk/src/switch_core.c

Log:
update

Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c	(original)
+++ freeswitch/trunk/src/switch_console.c	Mon Apr 30 19:56:27 2007
@@ -184,7 +184,7 @@
 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 @@
 	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);

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Mon Apr 30 19:56:27 2007
@@ -613,7 +613,6 @@
 
 SWITCH_DECLARE(int32_t) switch_core_session_ctl(switch_session_ctl_t cmd, uint32_t * val)
 {
-
 	if (runtime.shutting_down) {
 		return -1;
 	}



More information about the Freeswitch-svn mailing list