git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2417 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-08-28 23:05:26 +00:00
parent 0c1e874de2
commit 353f936095
6 changed files with 63 additions and 30 deletions
@@ -286,7 +286,7 @@ static int activate_rtp(struct private_object *tech_pvt)
int ms = 20;
switch_rtp_flag_t flags;
if (tech_pvt->rtp_session) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
return 1;
}
@@ -695,7 +695,7 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
ldl_session_destroy(&tech_pvt->dlsession);
}
if (tech_pvt->rtp_session) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_destroy(&tech_pvt->rtp_session);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NUKE RTP\n");
tech_pvt->rtp_session = NULL;
@@ -734,7 +734,7 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
}
if (tech_pvt->rtp_session) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_kill_socket(tech_pvt->rtp_session);
}
@@ -1629,7 +1629,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
if (*msg == '+') {
switch_channel_queue_dtmf(channel, msg + 1);
switch_set_flag_locked(tech_pvt, TFLAG_DTMF);
if (tech_pvt->rtp_session) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_set_flag(tech_pvt->rtp_session, SWITCH_RTP_FLAG_BREAK);
}
}
+3 -3
View File
@@ -490,7 +490,7 @@ static void deactivate_rtp(struct private_object *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++;
@@ -587,7 +587,7 @@ static switch_status_t activate_rtp(struct private_object *tech_pvt)
key,
&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;
@@ -840,7 +840,7 @@ static switch_status_t exosip_kill_channel(switch_core_session_t *session, int s
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
switch_set_flag_locked(tech_pvt, TFLAG_BYE);
if (tech_pvt->rtp_session) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_kill_socket(tech_pvt->rtp_session);
}
+4 -4
View File
@@ -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);
}