[sr-dev] git:master:06e1ad19: debugger: fix orig offset computation inside w_dbg_sip_msg()
Daniel-Constantin Mierla
miconda at gmail.com
Fri Jul 21 08:58:43 CEST 2017
Module: kamailio
Branch: master
Commit: 06e1ad190ea62efc09a158f9c86d447d078d805b
URL: https://github.com/kamailio/kamailio/commit/06e1ad190ea62efc09a158f9c86d447d078d805b
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/06e1ad190ea62efc09a158f9c86d447d078d805b.diff
Patch: https://github.com/kamailio/kamailio/commit/06e1ad190ea62efc09a158f9c86d447d078d805b.patch
---
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 */
More information about the sr-dev
mailing list