mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-17 00:34:13 +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:
1 parent
4960fbc73f
commit
f689b62fb6
9 files changed
+143
-14
No files matched your search
@@ -370,6 +370,8 @@ static switch_status_t wanpipe_on_hangup(switch_core_session_t *session)
|
||||
|
||||
teletone_destroy_session(&tech_pvt->tone_session);
|
||||
|
||||
switch_buffer_destroy(&tech_pvt->dtmf_buffer);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -623,7 +625,7 @@ static switch_status_t wanpipe_send_dtmf(switch_core_session_t *session, char *d
|
||||
|
||||
if (!tech_pvt->dtmf_buffer) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Allocate DTMF Buffer....");
|
||||
if (switch_buffer_create(switch_core_session_get_pool(session), &tech_pvt->dtmf_buffer, 3192) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_buffer_create_dynamic(&tech_pvt->dtmf_buffer, 1024, 3192, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Failed to allocate DTMF Buffer!\n");
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user