[Freeswitch-svn] [commit] r10790 - freeswitch/trunk/src/mod/applications/mod_commands

FreeSWITCH SVN anthm at freeswitch.org
Tue Dec 16 05:48:43 PST 2008


Author: anthm
Date: Tue Dec 16 08:48:43 2008
New Revision: 10790

Log:
let more commands in mod_commmands run from the dialplan via the eval app

Modified:
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c

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	Tue Dec 16 08:48:43 2008
@@ -457,10 +457,6 @@
 	const char *err;
 	switch_xml_t xml_root;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (cmd && !strcmp(cmd, "reloadxml")) {
 		if ((xml_root = switch_xml_open_root(1, &err))) {
 			switch_xml_free(xml_root);
@@ -696,10 +692,6 @@
 	int sps = 0, last_sps = 0;
 	const char *var;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	switch_core_measure_time(switch_core_uptime(), &duration);
 
 	if (stream->param_event) {
@@ -877,10 +869,6 @@
 {
 	const char *err;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd)) {
 		stream->write_function(stream, "-USAGE: %s\n", LOAD_SYNTAX);
 		return SWITCH_STATUS_SUCCESS;
@@ -902,10 +890,6 @@
 	switch_bool_t force = SWITCH_FALSE;
 	const char *p = cmd;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd)) {
 		stream->write_function(stream, "-USAGE: %s\n", UNLOAD_SYNTAX);
 		return SWITCH_STATUS_SUCCESS;
@@ -950,10 +934,6 @@
 	switch_bool_t force = SWITCH_FALSE;
 	const char *p = cmd;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd)) {
 		stream->write_function(stream, "-USAGE: %s\n", UNLOAD_SYNTAX);
 		return SWITCH_STATUS_SUCCESS;
@@ -1003,10 +983,6 @@
 	const char *err;
 	switch_xml_t xml_root;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if ((xml_root = switch_xml_open_root(1, &err))) {
 		switch_xml_free(xml_root);
 	}
@@ -1023,10 +999,6 @@
 	char *mycmd = NULL, *kcause = NULL;
 	switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd) || !(mycmd = strdup(cmd))) {
 		stream->write_function(stream, "-USAGE: %s\n", KILL_SYNTAX);
 		return SWITCH_STATUS_SUCCESS;
@@ -1057,10 +1029,6 @@
 {
 	switch_core_session_t *ksession = NULL;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!cmd) {
 		stream->write_function(stream, "-USAGE: %s\n", PARK_SYNTAX);
 	} else if ((ksession = switch_core_session_locate(cmd))) {
@@ -1082,10 +1050,6 @@
 	int argc = 0;
 	char *tuuid, *dest, *dp, *context, *arg = NULL;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd) || !(mycmd = strdup(cmd))) {
 		stream->write_function(stream, "-USAGE: %s\n", TRANSFER_SYNTAX);
 		return SWITCH_STATUS_SUCCESS;
@@ -1303,10 +1267,6 @@
 	char *mycmd = NULL, *argv[6] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1346,10 +1306,6 @@
 	char *mycmd = NULL, *argv[4] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1392,10 +1348,6 @@
 	int argc = 0;
 	switch_status_t status = SWITCH_STATUS_FALSE;
 
-	if (session) {
-		return status;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1427,10 +1379,6 @@
 	int argc = 0;
 	switch_status_t status = SWITCH_STATUS_FALSE;
 
-	if (session) {
-		return status;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1467,10 +1415,6 @@
 	int argc = 0;
 	switch_status_t status = SWITCH_STATUS_FALSE;
 
-	if (session) {
-		return status;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1514,10 +1458,6 @@
 	int argc = 0;
 	switch_status_t status = SWITCH_STATUS_FALSE;
 
-	if (session) {
-		return status;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1549,10 +1489,6 @@
 	int argc = 0;
 	switch_status_t status = SWITCH_STATUS_FALSE;
 
-	if (session) {
-		return status;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1589,10 +1525,6 @@
 	char *mycmd = NULL, *argv[4] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -1633,10 +1565,6 @@
 	int argc = 0;
 	uint32_t limit = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd)) {
 		goto usage;
 	}
@@ -1704,10 +1632,6 @@
 	uint32_t limit = 0;
 	char *flags = NULL;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd) || !(mycmd = strdup(cmd))) {
 		goto usage;
 	}
@@ -1769,10 +1693,6 @@
 	char *mycmd, *flag;
 	switch_channel_t *channel = NULL;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd)) {
 		stream->write_function(stream, "-USAGE: %s\n", BREAK_SYNTAX);
 		return SWITCH_STATUS_SUCCESS;
@@ -1812,10 +1732,6 @@
 	char *mycmd = NULL, *argv[4] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 	}
@@ -2368,10 +2284,6 @@
 	switch_core_flag_t cflags = switch_core_flags();
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	db = switch_core_db_handle();
 	
 	holder.justcount = 0;
@@ -2657,10 +2569,6 @@
 	char *mycmd = NULL, *argv[3] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 		if ((argc == 2 || argc == 3) && !switch_strlen_zero(argv[0])) {
@@ -2709,10 +2617,6 @@
 	int argc = 0;
 	char *var_name, *var_value = NULL;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		char *uuid = mycmd;
 		if (!(vars = strchr(uuid, ' '))) {
@@ -2763,10 +2667,6 @@
 	char *mycmd = NULL, *argv[4] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 		if (argc >= 2 && !switch_strlen_zero(argv[0])) {
@@ -2814,10 +2714,6 @@
 	char *uuid = NULL, *dtmf_data = NULL;
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (switch_strlen_zero(cmd)) {
 		goto usage;
 	}
@@ -2864,10 +2760,6 @@
 	char *mycmd = NULL, *argv[4] = { 0 };
 	int argc = 0;
 
-	if (session) {
-		return SWITCH_STATUS_FALSE;
-	}
-
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
 		if (argc >= 0 && !switch_strlen_zero(argv[0])) {



More information about the Freeswitch-svn mailing list