提交 c09a93be authored 作者: Michael Jerris's avatar Michael Jerris

fix msvc build.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6660 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b84554d1
...@@ -92,11 +92,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c ...@@ -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); int odd = switch_test_flag(alloc, SPF_ODD);
switch_mutex_lock(alloc->mutex); switch_mutex_lock(alloc->mutex);
srand(getpid() + time(NULL)); srand(getpid() + (unsigned)time(NULL));
while(alloc->track_used < alloc->track_len) { while(alloc->track_used < alloc->track_len) {
double r; double r;
int index; uint32_t index;
int tries = 0; int tries = 0;
do { do {
...@@ -117,9 +117,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c ...@@ -117,9 +117,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
if ((even && odd)) { if ((even && odd)) {
port = index + alloc->start; port = (switch_port_t)(index + alloc->start);
} else { } else {
port = index + (alloc->start / 2); port = (switch_port_t)(index + (alloc->start / 2));
port *= 2; port *= 2;
} }
goto end; goto end;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论