mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
use individual pools in open file handles to avoid flooding the pool
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8302 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
cc88332e2d
commit
6231ceb02b
@ -584,7 +584,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||
globals.read_codec.implementation->number_of_channels,
|
||||
globals.read_codec.implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT,
|
||||
switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||
tech_pvt->hold_file = NULL;
|
||||
goto cng;
|
||||
|
@ -496,7 +496,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
||||
globals.read_codec.implementation->number_of_channels,
|
||||
globals.read_codec.implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT,
|
||||
switch_core_session_get_pool(tech_pvt->session)) != SWITCH_STATUS_SUCCESS) {
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
tech_pvt->hold_file = NULL;
|
||||
goto cng;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
|
||||
(char *)fname,
|
||||
source->channels,
|
||||
source->rate,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, source->pool) != SWITCH_STATUS_SUCCESS) {
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open %s\n", fname);
|
||||
switch_yield(1000000);
|
||||
continue;
|
||||
|
@ -308,7 +308,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_displace_session(switch_core_session_
|
||||
read_codec->implementation->number_of_channels,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT,
|
||||
switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
switch_core_session_reset(session, SWITCH_TRUE);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
@ -755,7 +755,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session(switch_core_session_t
|
||||
file,
|
||||
channels,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error opening %s\n", file);
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
switch_core_session_reset(session, SWITCH_TRUE);
|
||||
|
@ -341,7 +341,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
|
||||
read_codec->implementation->number_of_channels,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT,
|
||||
switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Playing File\n");
|
||||
switch_safe_free(tmp_data);
|
||||
goto done;
|
||||
@ -994,7 +994,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
read_codec->implementation->number_of_channels,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT,
|
||||
switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Playing File\n");
|
||||
switch_safe_free(tmp_data);
|
||||
goto notready;
|
||||
|
@ -373,7 +373,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
||||
file,
|
||||
fh->channels,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
SWITCH_FILE_FLAG_WRITE | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
switch_core_session_reset(session, SWITCH_TRUE);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
@ -789,7 +789,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
||||
file,
|
||||
read_codec->implementation->number_of_channels,
|
||||
read_codec->implementation->actual_samples_per_second,
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_core_session_reset(session, SWITCH_TRUE);
|
||||
status = SWITCH_STATUS_NOTFOUND;
|
||||
goto end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user