[Freeswitch-svn] [commit] r9847 - in freeswitch/trunk/src/mod: applications/mod_commands formats/mod_local_stream

Freeswitch SVN mikej at freeswitch.org
Sun Oct 5 02:27:45 EDT 2008


Author: mikej
Date: Sun Oct  5 02:27:45 2008
New Revision: 9847

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

Log:
windows compiler fixes.


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	Sun Oct  5 02:27:45 2008
@@ -701,17 +701,17 @@
 			switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
 			stream->write_function(stream, "+OK\n");
 		} else if (!strcasecmp(argv[0], "shutdown")) {
-			switch_session_ctl_t cmd = SCSC_SHUTDOWN;
+			switch_session_ctl_t command = SCSC_SHUTDOWN;
 			int x = 0;
 			arg = 0;
 			for (x = 1; x < 5; x++) {
 				if (argv[x]) {
 					if (!strcasecmp(argv[x], "cancel")) {
 						arg = 0;
-						cmd = SCSC_CANCEL_SHUTDOWN;
+						command = SCSC_CANCEL_SHUTDOWN;
 						break;
 					} else if (!strcasecmp(argv[x], "elegant")) {
-						cmd = SCSC_SHUTDOWN_ELEGANT;
+						command = SCSC_SHUTDOWN_ELEGANT;
 					} else if (!strcasecmp(argv[x], "restart")) {
 						arg = 1;
 					}
@@ -719,7 +719,7 @@
 					break;
 				}
 			}
-			switch_core_session_ctl(cmd, &arg);
+			switch_core_session_ctl(command, &arg);
 			stream->write_function(stream, "+OK\n");
 		} else if (!strcasecmp(argv[0], "reclaim_mem")) {
 			switch_core_session_ctl(SCSC_RECLAIM, &arg);
@@ -2596,6 +2596,7 @@
 
 	if (!switch_strlen_zero(cmd) && (mycmd = strdup(cmd))) {
 		argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
+		switch_assert(argv[0]);
 		if ((cause = switch_channel_str2cause(argv[0])) == SWITCH_CAUSE_NONE) {
 			cause = SWITCH_CAUSE_MANAGER_REQUEST;
 		}

Modified: freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	Sun Oct  5 02:27:45 2008
@@ -588,7 +588,7 @@
 	if (argv[5]) {
 		tmp = atoi(argv[5]);
 		if (tmp == 1 || tmp == 2) {
-			channels = tmp;
+			channels = (uint8_t)tmp;
 		}
 	}
 
@@ -622,24 +622,24 @@
 					char *val = (char *) switch_xml_attr_soft(param, "value");
 
 					if (!strcasecmp(var, "rate")) {
-						int tmp = atoi(val);
+						tmp = atoi(val);
 						if (tmp == 8000 || tmp == 16000 || tmp == 32000) {
 							rate = tmp;
 						}
 					} else if (!strcasecmp(var, "shuffle")) {
 						shuffle = switch_true(val);
 					} else if (!strcasecmp(var, "prebuf")) {
-						int tmp = atoi(val);
+						tmp = atoi(val);
 						if (tmp > 0) {
 							prebuf = (uint32_t) tmp;
 						}
 					} else if (!strcasecmp(var, "channels")) {
-						int tmp = atoi(val);
+						tmp = atoi(val);
 						if (tmp == 1 || tmp == 2) {
 							channels = (uint8_t) tmp;
 						}
 					} else if (!strcasecmp(var, "interval")) {
-						int tmp = atoi(val);
+						tmp = atoi(val);
 						if (SWITCH_ACCEPTABLE_INTERVAL(tmp)) {
 							interval = tmp;
 						} else {



More information about the Freeswitch-svn mailing list