Module: kamailio
Branch: master
Commit: 06e1ad190ea62efc09a158f9c86d447d078d805b
URL:
https://github.com/kamailio/kamailio/commit/06e1ad190ea62efc09a158f9c86d447…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-21T08:53:53+02:00
debugger: fix orig offset computation inside w_dbg_sip_msg()
---
Modified: src/modules/debugger/debugger_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/06e1ad190ea62efc09a158f9c86d447…
Patch:
https://github.com/kamailio/kamailio/commit/06e1ad190ea62efc09a158f9c86d447…
---
diff --git a/src/modules/debugger/debugger_mod.c b/src/modules/debugger/debugger_mod.c
index 97dee43590..5c973c57b5 100644
--- a/src/modules/debugger/debugger_mod.c
+++ b/src/modules/debugger/debugger_mod.c
@@ -547,9 +547,11 @@ static int w_dbg_sip_msg(struct sip_msg* msg, char *level, char
*facility)
}
/* skip original uri */
- if (msg->new_uri.s){
- orig_offs=msg->first_line.u.request.uri.s - msg->buf;
- orig_offs=msg->first_line.u.request.uri.len;
+ if(msg->first_line.type == SIP_REQUEST) {
+ if(msg->new_uri.s) {
+ orig_offs = msg->first_line.u.request.uri.s - msg->buf;
+ orig_offs += msg->first_line.u.request.uri.len;
+ }
}
/* alloc private mem and copy lumps */