Module: kamailio
Branch: master
Commit: 0b3a669ca5d151dee4a825a24c8c5705af4ef34c
URL:
https://github.com/kamailio/kamailio/commit/0b3a669ca5d151dee4a825a24c8c570…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2020-04-09T05:11:06+02:00
Merge pull request #2278 from kamailio/grumvalski/siptrace_ack_fix
siptrace: safety check for transaction when checking ACK
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0b3a669ca5d151dee4a825a24c8c570…
Patch:
https://github.com/kamailio/kamailio/commit/0b3a669ca5d151dee4a825a24c8c570…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 5a8d153687..dd508372d4 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -885,16 +885,18 @@ static int sip_trace_helper(sip_msg_t *msg, dest_info_t *dst, str
*duri,
orig_t = tmb.t_gett();
if(tmb.t_lookup_request(msg,0,&canceled)) {
t_invite = tmb.t_gett();
- if (t_invite->uas.request->msg_flags & FL_SIPTRACE) {
- LM_DBG("Transaction is already been traced, skipping.\n");
- ret = 1;
+ if (t_invite!=T_NULL_CELL) {
+ if (t_invite->uas.request->msg_flags & FL_SIPTRACE) {
+ LM_DBG("Transaction is already been traced, skipping.\n");
+ ret = 1;
+ }
+ tmb.t_release_transaction( t_invite );
+ tmb.t_unref(msg);
}
- tmb.t_release_transaction( t_invite );
- tmb.t_unref(msg);
- tmb.t_sett(orig_t, T_BR_UNDEFINED);
- if (ret)
- return 1;
}
+ tmb.t_sett(orig_t, T_BR_UNDEFINED);
+ if (ret)
+ return 1;
}
if (trace_type == SIPTRACE_DIALOG && dlgb.get_dlg == NULL) {