[asterisk-commits] res rtp asterisk: Pass correct data length to ast rtcp inter... (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 20 10:29:40 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5254 )

Change subject: res_rtp_asterisk: Pass correct data length to ast_rtcp_interpret
......................................................................


res_rtp_asterisk: Pass correct data length to ast_rtcp_interpret

We are currently passing in the capacity of the read buffer instead of the
number of bytes that we actually read off the wire.

Change-Id: I60465049727d955c7f9a5e529e6f2aaff04cda36
---
M res/res_rtp_asterisk.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 251227a..8820183 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -4426,7 +4426,7 @@
 		return &ast_null_frame;
 	}
 
-	if (!*(read_area)) {
+	if (!*read_area) {
 		struct sockaddr_in addr_tmp;
 		struct ast_sockaddr addr_v4;
 
@@ -4448,7 +4448,7 @@
 		return &ast_null_frame;
 	}
 
-	return ast_rtcp_interpret(instance, read_area, read_area_size, &addr);
+	return ast_rtcp_interpret(instance, read_area, res, &addr);
 }
 
 static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int *rtpheader, int len, int hdrlen)
@@ -4633,7 +4633,7 @@
 
 	/* This could be a multiplexed RTCP packet. If so, be sure to interpret it correctly */
 	if (rtcp_mux(rtp, read_area)) {
-		return ast_rtcp_interpret(instance, read_area, read_area_size, &addr);
+		return ast_rtcp_interpret(instance, read_area, res, &addr);
 	}
 
 	/* Make sure the data that was read in is actually enough to make up an RTP packet */

-- 
To view, visit https://gerrit.asterisk.org/5254
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I60465049727d955c7f9a5e529e6f2aaff04cda36
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list