[Asterisk-code-review] res pjsip sdp rtp: Restore removed NULL check. (asterisk[13])

Matt Jordan asteriskteam at digium.com
Sun Aug 16 11:27:48 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: res_pjsip_sdp_rtp: Restore removed NULL check.
......................................................................


res_pjsip_sdp_rtp: Restore removed NULL check.

When sending an RTP keepalive, we need to be sure we're not dealing with
a NULL RTP instance. There had been a NULL check, but the commit that
added the rtp_timeout and rtp_hold_timeout options removed the NULL
check.

Change-Id: I2d7dcd5022697cfc6bf3d9e19245419078e79b64
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, approved



diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index d860525..0a5cbcb 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -115,6 +115,10 @@
 	time_t interval;
 	int send_keepalive;
 
+	if (!rtp) {
+		return 0;
+	}
+
 	keepalive = ast_rtp_instance_get_keepalive(rtp);
 
 	if (!ast_sockaddr_isnull(&session_media->direct_media_addr)) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d7dcd5022697cfc6bf3d9e19245419078e79b64
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list