summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2012-10-17 14:24:52 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2012-10-17 14:24:52 +0000
commit6d57ecd48c2efa36973ebcf204ffed0ed8a39580 (patch)
treefbfe10fa310a17ab585f1d274220d3255ea57727 /res
parent1a0646aec17422b5d5071714fa8f1992a097c367 (diff)
Change a few warnings to debug and the inverse.
Remove the "RTP Read too short" warning for RTP keepalives. Remove the the warning about the application delimiter switch from pipe to comma. (You should've done this by now.) Make cdr_odbc report more when an insert fails. Make chan_sip warn less when the peer wants SRTP (and we don't) or sends a zero port to disable a media type. Review: https://reviewboard.asterisk.org/r/2167 (closes issue ASTERISK-20538) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_rtp_asterisk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 00f909fae..45df0f923 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -3467,7 +3467,14 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
/* Make sure the data that was read in is actually enough to make up an RTP packet */
if (res < hdrlen) {
- ast_log(LOG_WARNING, "RTP Read too short\n");
+ /* If this is a keepalive containing only nulls, don't bother with a warning */
+ int i;
+ for (i = 0; i < res; ++i) {
+ if (rtp->rawdata[AST_FRIENDLY_OFFSET + i] != '\0') {
+ ast_log(LOG_WARNING, "RTP Read too short\n");
+ return &ast_null_frame;
+ }
+ }
return &ast_null_frame;
}