mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add dynamic buffers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2583 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -164,7 +164,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel,
|
||||
|
||||
switch_core_hash_init(&(*channel)->variables, pool);
|
||||
switch_core_hash_init(&(*channel)->private_hash, pool);
|
||||
switch_buffer_create(pool, &(*channel)->dtmf_buffer, 128);
|
||||
switch_buffer_create_dynamic(&(*channel)->dtmf_buffer, 128, 128, 0);
|
||||
|
||||
switch_mutex_init(&(*channel)->dtmf_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
switch_mutex_init(&(*channel)->flag_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
switch_mutex_init(&(*channel)->profile_mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
@@ -282,6 +283,11 @@ SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel_t *chan
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_uninit(switch_channel_t *channel)
|
||||
{
|
||||
switch_buffer_destroy(&channel->dtmf_buffer);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel,
|
||||
switch_core_session_t *session,
|
||||
switch_channel_state_t state, uint32_t flags)
|
||||
|
Reference in New Issue
Block a user