From 69933df109ed8b8af43ba3c8e0922f1b2df13504 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 7 Sep 2006 05:35:08 +0000 Subject: [PATCH] update build on windows from latest core changes. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2542 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_core.h | 2 +- src/include/switch_ivr.h | 2 +- src/switch_core.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/include/switch_core.h b/src/include/switch_core.h index f2d027eb35..7335d7f7e8 100644 --- a/src/include/switch_core.h +++ b/src/include/switch_core.h @@ -119,7 +119,7 @@ struct switch_core_port_allocator; \param new pointer for the return value \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 diff --git a/src/include/switch_ivr.h b/src/include/switch_ivr.h index a9ff01cd23..af215fa6f4 100644 --- a/src/include/switch_ivr.h +++ b/src/include/switch_ivr.h @@ -42,7 +42,7 @@ 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 diff --git a/src/switch_core.c b/src/switch_core.c index 06f2b0e406..86d79ba704 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -141,12 +141,12 @@ struct switch_core_port_allocator { switch_port_t start; switch_port_t end; switch_port_t next; - uint32_t inc; + uint8_t inc; switch_mutex_t *mutex; 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_memory_pool_t *pool; @@ -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); alloc->pool = pool; - *new = alloc; + *new_allocator = alloc; return SWITCH_STATUS_SUCCESS; } @@ -180,7 +180,7 @@ SWITCH_DECLARE(switch_port_t) switch_core_port_allocator_request_port(switch_cor switch_mutex_lock(alloc->mutex); port = alloc->next; - alloc->next += alloc->inc; + alloc->next = alloc->next + alloc->inc; if (alloc->next > alloc->end) { alloc->next = alloc->start; }