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

Mark Michelson asteriskteam at digium.com
Fri Aug 14 16:28:41 CDT 2015


Mark Michelson has uploaded a new change for review.

  https://gerrit.asterisk.org/1097

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(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/1097/1

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: newchange
Gerrit-Change-Id: I2d7dcd5022697cfc6bf3d9e19245419078e79b64
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list