summaryrefslogtreecommitdiff
path: root/res/res_pjsip_sdp_rtp.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-08-14 15:46:05 -0500
committerMark Michelson <mmichelson@digium.com>2015-08-14 15:48:53 -0500
commit5a85711568fa4268465c0f6f8a3b49ff8b09bcf1 (patch)
treee3410ddcff43b62ceb8572e6401630704e4b87e4 /res/res_pjsip_sdp_rtp.c
parent7c4cb8618d12b42fde03cf9f0fa98e1c0be7bd2d (diff)
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
Diffstat (limited to 'res/res_pjsip_sdp_rtp.c')
-rw-r--r--res/res_pjsip_sdp_rtp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 652188dc3..2ca1f98de 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -115,6 +115,10 @@ static int send_keepalive(const void *data)
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)) {