提交 69933df1 authored 作者: Michael Jerris's avatar Michael Jerris

update build on windows from latest core changes.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2542 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 7863ad0d
...@@ -119,7 +119,7 @@ struct switch_core_port_allocator; ...@@ -119,7 +119,7 @@ struct switch_core_port_allocator;
\param new pointer for the return value \param new pointer for the return value
\return SWITCH_STATUS_SUCCESS if the operation was a success \return SWITCH_STATUS_SUCCESS if the operation was a success
*/ */
SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t start, switch_port_t end, uint32_t inc, switch_core_port_allocator_t **new); SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t start, switch_port_t end, uint8_t inc, switch_core_port_allocator_t **new_allocator);
/*! /*!
\brief Get a port from the port allocator \brief Get a port from the port allocator
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
BEGIN_EXTERN_C BEGIN_EXTERN_C
static const switch_state_handler_table_t noop_state_handler = {}; static const switch_state_handler_table_t noop_state_handler = {0};
/** /**
* @defgroup switch_ivr IVR Library * @defgroup switch_ivr IVR Library
......
...@@ -141,12 +141,12 @@ struct switch_core_port_allocator { ...@@ -141,12 +141,12 @@ struct switch_core_port_allocator {
switch_port_t start; switch_port_t start;
switch_port_t end; switch_port_t end;
switch_port_t next; switch_port_t next;
uint32_t inc; uint8_t inc;
switch_mutex_t *mutex; switch_mutex_t *mutex;
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
}; };
SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t start, switch_port_t end, uint32_t inc, switch_core_port_allocator_t **new) SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t start, switch_port_t end, uint8_t inc, switch_core_port_allocator_t **new_allocator)
{ {
switch_status_t status; switch_status_t status;
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
...@@ -169,7 +169,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t sta ...@@ -169,7 +169,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_new(switch_port_t sta
} }
switch_mutex_init(&alloc->mutex, SWITCH_MUTEX_NESTED, pool); switch_mutex_init(&alloc->mutex, SWITCH_MUTEX_NESTED, pool);
alloc->pool = pool; alloc->pool = pool;
*new = alloc; *new_allocator = alloc;
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
...@@ -180,7 +180,7 @@ SWITCH_DECLARE(switch_port_t) switch_core_port_allocator_request_port(switch_cor ...@@ -180,7 +180,7 @@ SWITCH_DECLARE(switch_port_t) switch_core_port_allocator_request_port(switch_cor
switch_mutex_lock(alloc->mutex); switch_mutex_lock(alloc->mutex);
port = alloc->next; port = alloc->next;
alloc->next += alloc->inc; alloc->next = alloc->next + alloc->inc;
if (alloc->next > alloc->end) { if (alloc->next > alloc->end) {
alloc->next = alloc->start; alloc->next = alloc->start;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论