Browse code

nathelper(k): nicer handling of no sdp in sdp_1918(...)

- don't print error message if there is no sdp body

Daniel-Constantin Mierla authored on 05/10/2012 12:34:13
Showing 1 changed files
... ...
@@ -1375,12 +1375,15 @@ sdp_1918(struct sip_msg* msg)
1375 1375
 {
1376 1376
 	str *ip;
1377 1377
 	int pf;
1378
+	int ret;
1378 1379
 	int sdp_session_num, sdp_stream_num;
1379 1380
 	sdp_session_cell_t* sdp_session;
1380 1381
 	sdp_stream_cell_t* sdp_stream;
1381 1382
 
1382
-	if(0 != parse_sdp(msg)) {
1383
-		LM_ERR("Unable to parse sdp\n");
1383
+	ret = parse_sdp(msg);
1384
+	if(ret != 0) {
1385
+		if(ret < 0)
1386
+			LM_ERR("Unable to parse sdp\n");
1384 1387
 		return 0;
1385 1388
 	}
1386 1389