Module: kamailio
Branch: master
Commit: 837d7eab397547a4a67158e4da719288e20a0bb4
URL:
https://github.com/kamailio/kamailio/commit/837d7eab397547a4a67158e4da71928…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-30T11:17:03+02:00
tsilo: restore also the global t branch index
---
Modified: src/modules/tsilo/ts_append.c
---
Diff:
https://github.com/kamailio/kamailio/commit/837d7eab397547a4a67158e4da71928…
Patch:
https://github.com/kamailio/kamailio/commit/837d7eab397547a4a67158e4da71928…
---
diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c
index 2781deffc42..fece9b40970 100644
--- a/src/modules/tsilo/ts_append.c
+++ b/src/modules/tsilo/ts_append.c
@@ -100,14 +100,16 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char
*table, str *
struct sip_msg *orig_msg;
int ret;
str stable;
+ int orig_branch;
if(contact->s!=NULL && contact->len > 0) {
LM_DBG("trying to append based on specific contact <%.*s>\n",
contact->len, contact->s);
}
- /* lookup a transaction based on its identifier (hash_index:label) */
orig_t = _tmb.t_gett();
+ orig_branch = _tmb.t_gett_branch();
+ /* lookup a transaction based on its identifier (hash_index:label) */
if(_tmb.t_lookup_ident(&t, tindex, tlabel) < 0)
{
LM_ERR("transaction [%u:%u] not found\n", tindex, tlabel);
@@ -155,7 +157,7 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char
*table, str *
/* unref the transaction which had been referred by t_lookup_ident() call.
* Restore the original transaction (if any) */
if(t) _tmb.unref_cell(t);
- _tmb.t_sett(orig_t, T_BR_UNDEFINED);
+ _tmb.t_sett(orig_t, orig_branch);
return ret;
}