fix msvc build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6660 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b84554d125
commit
c09a93be1b
|
@ -92,11 +92,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
|
|||
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 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue