Module: kamailio Branch: master Commit: 474649171d3c269e2fcfb00c7b1dbd318a952f51 URL: https://github.com/kamailio/kamailio/commit/474649171d3c269e2fcfb00c7b1dbd31...
Author: Donat Zenichev dzenichev@sipwise.com Committer: Victor Seva linuxmaniac@torreviejawireless.org Date: 2021-11-19T09:18:55+01:00
tsilo: Be compliant with changes in TM, now only t_append_branches()
Since of changes in TM's module, where 't_append_branches()' and 't_append_branch_by_contact()' have been merged into one function, we need to edit all the occurences where TM's API is called in TSILO.
No logic changes.
---
Modified: src/modules/tsilo/ts_append.c
---
Diff: https://github.com/kamailio/kamailio/commit/474649171d3c269e2fcfb00c7b1dbd31... Patch: https://github.com/kamailio/kamailio/commit/474649171d3c269e2fcfb00c7b1dbd31...
---
diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c index 1847ac1c1b..e4967f8167 100644 --- a/src/modules/tsilo/ts_append.c +++ b/src/modules/tsilo/ts_append.c @@ -89,6 +89,10 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table, str * int ret; str stable;
+ str contact; /* needed for usage of TM's API, t_append_branches() */ + contact.s = NULL; /* must be emptied */ + contact.len = 0; + orig_t = _tmb.t_gett();
if(_tmb.t_lookup_ident(&t, tindex, tlabel) < 0) @@ -129,7 +133,7 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table, str * goto done; }
- ret = _tmb.t_append_branches(); + ret = _tmb.t_append_branches(&contact);
done: /* unref the transaction which had been referred by t_lookup_ident() call. @@ -245,7 +249,7 @@ int ts_append_by_contact_to(struct sip_msg* msg, int tindex, int tlabel, char *t
/* start the transaction only for the desired contact contact must be of syntax: sip:<user>@<host>:<port> with no parameters list*/ - ret = _tmb.t_append_branch_by_contact(contact); + ret = _tmb.t_append_branches(contact);
done: /* unref the transaction which had been referred by t_lookup_ident() call.