[Freeswitch-svn] [commit] r9753 - freeswitch/trunk/src/mod/applications/mod_commands
Freeswitch SVN
mikej at freeswitch.org
Mon Sep 29 19:52:26 EDT 2008
Author: mikej
Date: Mon Sep 29 19:52:25 2008
New Revision: 9753
Modified:
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
Log:
cleanup fsctl output.
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Mon Sep 29 19:52:25 2008
@@ -691,17 +691,22 @@
if (!strcasecmp(argv[0], "hupall")) {
arg = 1;
switch_core_session_ctl(SCSC_HUPALL, &arg);
+ stream->write_function(stream, "+OK\n");
} else if (!strcasecmp(argv[0], "pause")) {
arg = 1;
switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
+ stream->write_function(stream, "+OK\n");
} else if (!strcasecmp(argv[0], "resume")) {
arg = 0;
switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
+ stream->write_function(stream, "+OK\n");
} else if (!strcasecmp(argv[0], "shutdown")) {
arg = 0;
switch_core_session_ctl(SCSC_SHUTDOWN, &arg);
+ stream->write_function(stream, "+OK\n");
} else if (!strcasecmp(argv[0], "reclaim_mem")) {
switch_core_session_ctl(SCSC_RECLAIM, &arg);
+ stream->write_function(stream, "+OK\n");
} else if (!strcasecmp(argv[0], "max_sessions")) {
if (argc > 1) {
arg = atoi(argv[1]);
@@ -731,7 +736,7 @@
arg = -1;
}
- if (arg == -1 || arg == SWITCH_LOG_INVALID) {
+ if (arg == SWITCH_LOG_INVALID) {
stream->write_function(stream, "-ERR syntax error, log level not set!\n");
} else {
switch_core_session_ctl(SCSC_LOGLEVEL, &arg);
@@ -757,7 +762,6 @@
goto end;
}
- stream->write_function(stream, "+OK\n");
end:
free(mydata);
} else {
More information about the Freeswitch-svn
mailing list