Browse code

bug_fix: T->hf->len now covers CRLF too for FIFO/uac

Jiri Kuthan authored on 29/01/2003 21:56:23
Showing 1 changed files
... ...
@@ -458,7 +458,7 @@ char *build_uac_request_dlg(str* msg,           /* Method */
458 458
 
459 459
 	     /* To */
460 460
 	t->to.s = w;
461
-	t->to.len= TO_LEN+to->len;
461
+	t->to.len= TO_LEN+to->len+CRLF_LEN;
462 462
 	memapp(w, TO, TO_LEN);
463 463
 	memapp(w, to->s, to->len);
464 464
 	if (totag && totag->len ) {
... ...
@@ -470,7 +470,7 @@ char *build_uac_request_dlg(str* msg,           /* Method */
470 470
 
471 471
 	     /* From */
472 472
 	t->from.s = w;
473
-	t->from.len = FROM_LEN + from->len;
473
+	t->from.len = FROM_LEN + from->len + CRLF_LEN;
474 474
 	memapp(w, FROM, FROM_LEN);
475 475
 	memapp(w, from->s, from->len);
476 476
   	if (fromtag && fromtag->len ) { 
... ...
@@ -482,7 +482,9 @@ char *build_uac_request_dlg(str* msg,           /* Method */
482 482
 	
483 483
 	     /* CSeq */
484 484
 	t->cseq_n.s = w; 
485
-	t->cseq_n.len = CSEQ_LEN + cseq_str_len;
485
+	/* don't include method name and CRLF -- subsequent
486
+	 * local reuqests ACK/CANCEl will add their own */
487
+	t->cseq_n.len = CSEQ_LEN + cseq_str_len; 
486 488
 
487 489
 	memapp(w, CSEQ, CSEQ_LEN);
488 490
 	memapp(w, cseq_str, cseq_str_len);
... ...
@@ -491,7 +493,7 @@ char *build_uac_request_dlg(str* msg,           /* Method */
491 493
 
492 494
 	     /* Call-ID */
493 495
 	t->callid.s = w + CRLF_LEN; 
494
-	t->callid.len = callid->len;
496
+	t->callid.len = CALLID_LEN + callid->len + CRLF_LEN;
495 497
 	memapp(w, CRLF CALLID, CRLF_LEN + CALLID_LEN);
496 498
 	memapp(w, callid->s, callid->len);
497 499
 	memapp(w, CRLF, CRLF_LEN);