Browse code

- updated via_builder to new format (branch buf, len are a str now).

Andrei Pelinescu-Onciul authored on 24/01/2003 18:03:12
Showing 1 changed files
... ...
@@ -66,6 +66,7 @@ char *build_local(struct cell *Trans,unsigned int branch,
66 66
 	struct hdr_field    *hdr;
67 67
 	char branch_buf[MAX_BRANCH_PARAM_LEN];
68 68
 	int branch_len;
69
+	str branch_str;
69 70
 
70 71
 	if ( Trans->uac[branch].last_received<100)
71 72
 	{
... ...
@@ -82,8 +83,10 @@ char *build_local(struct cell *Trans,unsigned int branch,
82 83
 	if (!t_calc_branch(Trans,  branch, 
83 84
 		branch_buf, &branch_len ))
84 85
 		goto error;
86
+	branch_str.s=branch_buf;
87
+	branch_str.len=branch_len;
85 88
 	via=via_builder(&via_len, Trans->uac[branch].request.send_sock,
86
-		branch_buf, branch_len, Trans->uac[branch].request.send_sock->proto );
89
+		&branch_str, 0, Trans->uac[branch].request.send_sock->proto );
87 90
 	if (!via)
88 91
 	{
89 92
 		LOG(L_ERR, "ERROR: t_build_and_send_CANCEL: "
... ...
@@ -188,6 +191,7 @@ char *build_uac_request(  str msg_type, str dst, str from,
188 191
 
189 192
 	char branch_buf[MAX_BRANCH_PARAM_LEN];
190 193
 	int branch_len;
194
+	str branch_str;
191 195
 
192 196
 	int from_len;
193 197
 	char *from_str;
... ...
@@ -226,8 +230,11 @@ char *build_uac_request(  str msg_type, str dst, str from,
226 230
 		LOG(L_ERR, "ERROR: build_uac_request: branch calculation failed\n");
227 231
 		goto error;
228 232
 	}
233
+	branch_str.s=branch_buf;
234
+	branch_str.len=branch_len;
235
+	
229 236
 	via=via_builder(&via_len, t->uac[branch].request.send_sock,
230
-		branch_buf, branch_len, t->uac[branch].request.send_sock->proto);
237
+		&branch_str, 0, t->uac[branch].request.send_sock->proto);
231 238
 	
232 239
 	if (!via) {
233 240
 		LOG(L_ERR, "ERROR: build_uac_request: via building failed\n");
... ...
@@ -338,6 +345,7 @@ char *build_uac_request_dlg(str* msg,           /* Method */
338 345
 {
339 346
 	char *via, *buf, *w, content_len[10], cseq_str[10], branch_buf[MAX_BRANCH_PARAM_LEN];
340 347
 	int content_len_len, cseq_str_len, branch_len;
348
+	str branch_str;
341 349
 	unsigned int via_len;
342 350
 
343 351
 	buf=0;
... ...
@@ -369,9 +377,11 @@ char *build_uac_request_dlg(str* msg,           /* Method */
369 377
 		LOG(L_ERR, "ERROR: build_uac_request_dlg: branch calculation failed\n");
370 378
 		goto error;
371 379
 	}
372
-
380
+	
381
+	branch_str.s=branch_buf;
382
+	branch_str.len=branch_len;
373 383
 	via = via_builder(&via_len, send_sock,
374
-			branch_buf, branch_len, send_sock->proto);
384
+			&branch_str, 0, send_sock->proto);
375 385
 	if (!via) {
376 386
 		LOG(L_ERR, "ERROR: build_uac_request_dlg: via building failed\n");
377 387
 		goto error;