Module: sip-router Branch: master Commit: 019bcdc56533e7ccd0e1cc7d45b1d2d8ebc868ae URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=019bcdc5...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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
---
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 8ff80fe..c0ab7e8 100644 --- a/modules_k/nathelper/nathelper.c +++ b/modules_k/nathelper/nathelper.c @@ -1375,12 +1375,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; }