[Pkg-voip-commits] [janus] 54/163: Added some checks on the availability of an SDP in the SIP plugin

Jonas Smedegaard dr at jones.dk
Sat Oct 28 01:22:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.5-1
in repository janus.

commit 6a57112aac29e21334f2aa959b1b9392d93d3b40
Author: Lorenzo Miniero <lminiero at gmail.com>
Date:   Tue Aug 1 15:33:05 2017 +0200

    Added some checks on the availability of an SDP in the SIP plugin
---
 plugins/janus_sip.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/plugins/janus_sip.c b/plugins/janus_sip.c
index 2fc2ffb..d4efabf 100644
--- a/plugins/janus_sip.c
+++ b/plugins/janus_sip.c
@@ -3046,7 +3046,7 @@ void janus_sip_sofia_callback(nua_event_t event, int status, char const *phrase,
 					break;
 				} else if(status == 183) {
 					/* If's a Session Progress: check if there's an SDP, and if so, treat it like a 200 */
-					if(!sip->sip_payload->pl_data)
+					if(!sip->sip_payload || !sip->sip_payload->pl_data)
 						break;
 					in_progress = TRUE;
 				} else {
@@ -3107,6 +3107,11 @@ void janus_sip_sofia_callback(nua_event_t event, int status, char const *phrase,
 				nua_respond(nh, 500, sip_status_phrase(500), TAG_END());
 				break;
 			}
+			if(sip->sip_payload == NULL) {
+				JANUS_LOG(LOG_ERR, "\tMissing SDP\n");
+				nua_respond(nh, 488, sip_status_phrase(488), TAG_END());
+				break;
+			}
 			char sdperror[100];
 			janus_sdp *sdp = janus_sdp_parse(sip->sip_payload->pl_data, sdperror, sizeof(sdperror));
 			if(!sdp) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list