Module: sip-router
Branch: master
Commit: f22dcd559c739dd99275cd2444cf481d458d2fab
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f22dcd5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Apr 26 18:32:55 2013 +0200
dispatcher: proper localization of To uri for keepalives
- it was affected by introduction of <> around the URI in To header
- reported by Peter Dunkley
---
modules/dispatcher/dispatch.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/dispatcher/dispatch.c b/modules/dispatcher/dispatch.c
index cc8b7bf..0f6e8b0 100644
--- a/modules/dispatcher/dispatch.c
+++ b/modules/dispatcher/dispatch.c
@@ -2352,10 +2352,10 @@ static void ds_options_callback( struct cell *t, int type,
* cast it to an int. */
group = (int)(long)(*ps->param);
/* The SIP-URI is taken from the Transaction.
- * Remove the "To: " (s+4) and the trailing new-line (s - 4 (To: )
- * - 2 (\r\n)). */
- uri.s = t->to.s + 4;
- uri.len = t->to.len - 6;
+ * Remove the "To: <" (s+5) and the trailing >+new-line (s - 5 (To:
<)
+ * - 3 (>\r\n)). */
+ uri.s = t->to.s + 5;
+ uri.len = t->to.len - 8;
LM_DBG("OPTIONS-Request was finished with code %d (to %.*s, group %d)\n",
ps->code, uri.len, uri.s, group);
/* ps->code contains the result-code of the request.