Browse code

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.

Donat Zenichev authored on 14/11/2021 21:13:15 • Victor Seva committed on 19/11/2021 08:18:55
Showing 1 changed files
... ...
@@ -89,6 +89,10 @@ int ts_append_to(struct sip_msg* msg, int tindex, int tlabel, char *table, str *
89 89
 	int ret;
90 90
 	str stable;
91 91
 
92
+	str contact;       /* needed for usage of TM's API, t_append_branches() */
93
+	contact.s = NULL;  /* must be emptied */
94
+	contact.len = 0;
95
+
92 96
 	orig_t = _tmb.t_gett();
93 97
 
94 98
 	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 *
129 133
 		goto done;
130 134
 	}
131 135
 
132
-	ret = _tmb.t_append_branches();
136
+	ret = _tmb.t_append_branches(&contact);
133 137
 
134 138
 done:
135 139
 	/* 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
245 249
 
246 250
 	/* start the transaction only for the desired contact
247 251
 		contact must be of syntax: sip:<user>@<host>:<port> with no parameters list*/
248
-	ret = _tmb.t_append_branch_by_contact(contact);
252
+	ret = _tmb.t_append_branches(contact);
249 253
 
250 254
 done:
251 255
 	/* unref the transaction which had been referred by t_lookup_ident() call.