mod_portaudio: do not destroy codec and timers if there is a call in progress!

This commit is contained in:
Moises Silva 2011-03-20 02:36:46 -04:00
parent e7a58ab233
commit dbe4a4850a

View File

@ -1245,17 +1245,19 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
error: error:
if (endpoint) { if (endpoint) {
if (endpoint->read_timer.interval) { if (!endpoint->master) {
switch_core_timer_destroy(&endpoint->read_timer); if (endpoint->read_timer.interval) {
} switch_core_timer_destroy(&endpoint->read_timer);
if (endpoint->write_timer.interval) { }
switch_core_timer_destroy(&endpoint->write_timer); if (endpoint->write_timer.interval) {
} switch_core_timer_destroy(&endpoint->write_timer);
if (endpoint->read_codec.codec_interface) { }
switch_core_codec_destroy(&endpoint->read_codec); if (endpoint->read_codec.codec_interface) {
} switch_core_codec_destroy(&endpoint->read_codec);
if (endpoint->write_codec.codec_interface) { }
switch_core_codec_destroy(&endpoint->write_codec); if (endpoint->write_codec.codec_interface) {
switch_core_codec_destroy(&endpoint->write_codec);
}
} }
switch_mutex_unlock(endpoint->mutex); switch_mutex_unlock(endpoint->mutex);
} }