From 6daaf0844c4c21a177c7bac7cb905336d5437b37 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 12 May 2006 22:01:31 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1453 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_dingaling/mod_dingaling.c | 5 ++++- src/switch_rtp.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index 10d04c4596..70c4a70de0 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -1492,6 +1492,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi if (signal) { ldl_payload_t *payloads; unsigned int len = 0; + int match = 0; if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) { if (!strcasecmp(msg, "accept")) { @@ -1519,7 +1520,6 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi for(x = 0; x < len; x++) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Available Payload %s %u\n", payloads[x].name, payloads[x].id); for(y = 0; y < tech_pvt->num_codecs; y++) { - int match = 0; char *name = tech_pvt->codecs[y]->iananame; if (!strncasecmp(name, "ilbc", 4)) { @@ -1543,6 +1543,9 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi } } } + if (!match && !switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) { + do_describe(tech_pvt, 0); + } } } diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 60d0850805..083a3be4db 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -331,6 +331,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK)) { switch_socket_opt_set(rtp_session->sock, APR_SO_NONBLOCK, TRUE); + switch_set_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK); } switch_set_flag(rtp_session, SWITCH_RTP_FLAG_IO); return SWITCH_STATUS_SUCCESS; @@ -684,6 +685,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ for(;;) { bytes = sizeof(rtp_msg_t); status = switch_socket_recvfrom(rtp_session->from_addr, rtp_session->sock, 0, (void *)&rtp_session->recv_msg, &bytes); + if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BREAK)) { switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_BREAK);