Module: sip-router
Branch: 3.3
Commit: 7881d44ce92c953e77305545b8773d3e056ea80e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7881d44…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Oct 5 14:34:13 2012 +0200
nathelper(k): nicer handling of no sdp in sdp_1918(...)
- don't print error message if there is no sdp body
(cherry picked from commit 019bcdc56533e7ccd0e1cc7d45b1d2d8ebc868ae)
---
modules_k/nathelper/nathelper.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules_k/nathelper/nathelper.c b/modules_k/nathelper/nathelper.c
index a7f20a4..7195054 100644
--- a/modules_k/nathelper/nathelper.c
+++ b/modules_k/nathelper/nathelper.c
@@ -1191,12 +1191,15 @@ sdp_1918(struct sip_msg* msg)
{
str *ip;
int pf;
+ int ret;
int sdp_session_num, sdp_stream_num;
sdp_session_cell_t* sdp_session;
sdp_stream_cell_t* sdp_stream;
- if(0 != parse_sdp(msg)) {
- LM_ERR("Unable to parse sdp\n");
+ ret = parse_sdp(msg);
+ if(ret != 0) {
+ if(ret < 0)
+ LM_ERR("Unable to parse sdp\n");
return 0;
}