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

Freeswitch SVN mikej at freeswitch.org
Tue Dec 11 14:20:12 EST 2007


Author: mikej
Date: Tue Dec 11 14:20:12 2007
New Revision: 6660

Modified:
   freeswitch/trunk/src/switch_core_port_allocator.c

Log:
fix msvc build.

Modified: freeswitch/trunk/src/switch_core_port_allocator.c
==============================================================================
--- freeswitch/trunk/src/switch_core_port_allocator.c	(original)
+++ freeswitch/trunk/src/switch_core_port_allocator.c	Tue Dec 11 14:20:12 2007
@@ -92,11 +92,11 @@
 	int odd = switch_test_flag(alloc, SPF_ODD);
 
 	switch_mutex_lock(alloc->mutex);
-	srand(getpid() + time(NULL));
+	srand(getpid() + (unsigned)time(NULL));
 	
 	while(alloc->track_used < alloc->track_len) {
 		double r;
-		int index;
+		uint32_t index;
 		int tries = 0;
 
 		do {
@@ -117,9 +117,9 @@
 			status = SWITCH_STATUS_SUCCESS;
 
 			if ((even && odd)) {
-				port = index + alloc->start;
+				port = (switch_port_t)(index + alloc->start);
 			} else {
-				port = index + (alloc->start / 2);
+				port = (switch_port_t)(index + (alloc->start / 2));
 				port *= 2;
 			} 
 			goto end;



More information about the Freeswitch-svn mailing list