[asterisk-commits] rmudgett: trunk r372329 - in /trunk: ./ res/res_rtp_asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 5 12:38:24 CDT 2012
Author: rmudgett
Date: Wed Sep 5 12:38:22 2012
New Revision: 372329
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372329
Log:
Multiple revisions 372327-372328
........
r372327 | rmudgett | 2012-09-05 12:33:11 -0500 (Wed, 05 Sep 2012) | 15 lines
Fix RTP/RTCP read error message confusion.
The RTP/RTCP read error message can report "fail: success" when the
read failure is because of an ICE failure.
* Changed __rtp_recvfrom() to generate a PJ ICE message when ICE fails.
* Changed RTP/RTCP read error message to indicate an unspecified error
when errno is zero.
(closes issue ASTERISK-20288)
Reported by: Joern Krebs
Patches:
jira_asterisk_20288_err_msg.patch (license #5621) patch uploaded by rmudgett (modified)
........
r372328 | rmudgett | 2012-09-05 12:35:20 -0500 (Wed, 05 Sep 2012) | 1 line
Fix coding guidelines issue with a recent commit.
........
Merged revisions 372327-372328 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/res/res_rtp_asterisk.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_rtp_asterisk.c?view=diff&rev=372329&r1=372328&r2=372329
==============================================================================
--- trunk/res/res_rtp_asterisk.c (original)
+++ trunk/res/res_rtp_asterisk.c Wed Sep 5 12:38:22 2012
@@ -882,13 +882,21 @@
if (rtp->ice) {
pj_str_t combined = pj_str(ast_sockaddr_stringify(sa));
pj_sockaddr address;
+ pj_status_t status;
pj_thread_register_check();
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &combined, &address);
- if (pj_ice_sess_on_rx_pkt(rtp->ice, rtcp ? COMPONENT_RTCP : COMPONENT_RTP, rtcp ? TRANSPORT_SOCKET_RTCP : TRANSPORT_SOCKET_RTP,
- buf, len, &address, pj_sockaddr_get_len(&address)) != PJ_SUCCESS) {
+ status = pj_ice_sess_on_rx_pkt(rtp->ice, rtcp ? COMPONENT_RTCP : COMPONENT_RTP,
+ rtcp ? TRANSPORT_SOCKET_RTCP : TRANSPORT_SOCKET_RTP, buf, len, &address,
+ pj_sockaddr_get_len(&address));
+ if (status != PJ_SUCCESS) {
+ char buf[100];
+
+ pj_strerror(status, buf, sizeof(buf));
+ ast_log(LOG_WARNING, "PJ ICE Rx error status code: %d '%s'.\n",
+ (int) status, buf);
return -1;
}
if (!rtp->passthrough) {
@@ -2482,7 +2490,8 @@
0, &addr)) < 0) {
ast_assert(errno != EBADF);
if (errno != EAGAIN) {
- ast_log(LOG_WARNING, "RTCP Read error: %s. Hanging up.\n", strerror(errno));
+ ast_log(LOG_WARNING, "RTCP Read error: %s. Hanging up.\n",
+ (errno) ? strerror(errno) : "Unspecified");
return NULL;
}
return &ast_null_frame;
@@ -2790,8 +2799,7 @@
}
/* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */
- if (ast_rtp_codecs_find_payload_code(ast_rtp_instance_get_codecs(instance1),bridged_payload) == -1)
- {
+ if (ast_rtp_codecs_find_payload_code(ast_rtp_instance_get_codecs(instance1), bridged_payload) == -1) {
ast_debug(1, "Unsupported payload type received \n");
return -1;
}
@@ -2876,7 +2884,8 @@
&addr)) < 0) {
ast_assert(errno != EBADF);
if (errno != EAGAIN) {
- ast_log(LOG_WARNING, "RTP Read error: %s. Hanging up.\n", strerror(errno));
+ ast_log(LOG_WARNING, "RTP Read error: %s. Hanging up.\n",
+ (errno) ? strerror(errno) : "Unspecified");
return NULL;
}
return &ast_null_frame;
More information about the asterisk-commits
mailing list