Module: kamailio
Branch: master
Commit: a805573d89c11bb7c5786dc37a81d306269a89ef
URL: 
https://github.com/kamailio/kamailio/commit/a805573d89c11bb7c5786dc37a81d306269a89ef

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2026-06-27T20:53:39+02:00

tsilo: set back the current transaction context on not found

---

Modified: src/modules/tsilo/ts_append.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/a805573d89c11bb7c5786dc37a81d306269a89ef.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a805573d89c11bb7c5786dc37a81d306269a89ef.patch

---

diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c
index efee22745b2..6376735289b 100644
--- a/src/modules/tsilo/ts_append.c
+++ b/src/modules/tsilo/ts_append.c
@@ -218,7 +218,7 @@ int ts_append_branches(sip_msg_t *msg, str *ruri)
                /* lookup a transaction based on its identifier 
(hash_index:label) */
                if(_tmb.t_lookup_ident(&t, ptr->tindex, ptr->tlabel) < 0 || t 
== NULL) {
                        LM_ERR("transaction [%u:%u] not found\n", ptr->tindex, 
ptr->tlabel);
-                       continue;
+                       goto done;
                }
 
                /* check if the dialog is still in the early stage */
@@ -246,8 +246,10 @@ int ts_append_branches(sip_msg_t *msg, str *ruri)
        done:
                /* unref the transaction which had been referred by 
t_lookup_ident() call.
                 * Restore the original transaction (if any) */
-               _tmb.unref_cell(t);
+               if(t != NULL)
+                       _tmb.unref_cell(t);
                _tmb.set_tb(orig_t, orig_branch);
+               t = NULL;
        }
 
        unlock_entry_by_ruri(t_uri);

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to