mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2417 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -579,7 +579,7 @@ static void deactivate_rtp(private_object_t *tech_pvt)
|
||||
{
|
||||
int loops = 0;//, sock = -1;
|
||||
|
||||
if (tech_pvt->rtp_session) {
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
while (loops < 10 && (switch_test_flag(tech_pvt, TFLAG_READING) || switch_test_flag(tech_pvt, TFLAG_WRITING))) {
|
||||
switch_yield(10000);
|
||||
loops++;
|
||||
@@ -606,7 +606,7 @@ static switch_status_t activate_rtp(private_object_t *tech_pvt)
|
||||
|
||||
assert(tech_pvt->codecs[tech_pvt->codec_index] != NULL);
|
||||
|
||||
if (tech_pvt->rtp_session) {
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ static switch_status_t activate_rtp(private_object_t *tech_pvt)
|
||||
&err,
|
||||
switch_core_session_get_pool(tech_pvt->session));
|
||||
|
||||
if (tech_pvt->rtp_session) {
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
uint8_t vad_in = switch_test_flag(tech_pvt, TFLAG_VAD_IN) ? 1 : 0;
|
||||
uint8_t vad_out = switch_test_flag(tech_pvt, TFLAG_VAD_OUT) ? 1 : 0;
|
||||
uint8_t inb = switch_test_flag(tech_pvt, TFLAG_OUTBOUND) ? 0 : 1;
|
||||
@@ -906,7 +906,7 @@ static switch_status_t sofia_kill_channel(switch_core_session_t *session, int si
|
||||
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_HUP);
|
||||
|
||||
if (tech_pvt->rtp_session) {
|
||||
if (switch_rtp_ready(tech_pvt->rtp_session)) {
|
||||
switch_rtp_kill_socket(tech_pvt->rtp_session);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user