[sr-dev] git:3.1: siptrace: don't attempt to get reply reason for ack

Daniel-Constantin Mierla miconda at gmail.com
Wed Oct 13 13:08:00 CEST 2010


Module: sip-router
Branch: 3.1
Commit: bf8b8d579608bfa1b702d2a6fa044b968da6dfdd
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bf8b8d579608bfa1b702d2a6fa044b968da6dfdd

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Oct 13 13:04:14 2010 +0200

siptrace: don't attempt to get reply reason for ack

- for sl filtered ack, execution of sl callback attempted to set the len
  of reply reason, which does not exist in this case
- reported by MÉSZÁROS Mihály
(cherry picked from commit f7630be368c10bb1901acd6968211ee4ec41c922)

---

 modules/sl/sl_funcs.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/sl/sl_funcs.c b/modules/sl/sl_funcs.c
index 0dc771a..67a2836 100644
--- a/modules/sl/sl_funcs.c
+++ b/modules/sl/sl_funcs.c
@@ -397,7 +397,10 @@ void sl_run_callbacks(unsigned int type, struct sip_msg *req,
 	param.req    = req;
 	param.code   = code;
 	sreason.s    = reason;
-	sreason.len  = strlen(reason);
+	if(reason)
+		sreason.len  = strlen(reason);
+	else
+		sreason.len  = 0;
 	param.reason = &sreason;
 	param.reply  = reply;
 	param.dst    = dst;




More information about the sr-dev mailing list