[sr-dev] git:master:40e09d86: siptrace: trace transaction when message flag is set
Daniel-Constantin Mierla
miconda at gmail.com
Mon Sep 30 20:17:57 CEST 2019
Module: kamailio
Branch: master
Commit: 40e09d8625184f19ff5666a2848cbb8c6212db26
URL: https://github.com/kamailio/kamailio/commit/40e09d8625184f19ff5666a2848cbb8c6212db26
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-09-30T20:17:10+02:00
siptrace: trace transaction when message flag is set
---
Modified: src/modules/siptrace/siptrace.c
---
Diff: https://github.com/kamailio/kamailio/commit/40e09d8625184f19ff5666a2848cbb8c6212db26.diff
Patch: https://github.com/kamailio/kamailio/commit/40e09d8625184f19ff5666a2848cbb8c6212db26.patch
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 24089020fc..544fb5392a 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -1026,8 +1026,13 @@ static int w_sip_trace3(sip_msg_t *msg, char *dest, char *correlation_id, char *
if (trace_type_p != NULL) {
trace_type = *(enum siptrace_type_t *)(trace_type_p);
} else {
- /* fallback to default */
- trace_type = SIPTRACE_MESSAGE;
+ /* fallback to default - transaction tracking when flag is set,
+ * otherwise only the current message*/
+ if(msg->flags & trace_flag) {
+ trace_type = SIPTRACE_TRANSACTION;
+ } else {
+ trace_type = SIPTRACE_MESSAGE;
+ }
}
return sip_trace_helper(msg, (dest)?&dest_info:NULL,
More information about the sr-dev
mailing list