Browse code

*** empty log message ***

Bogdan-Andrei Iancu authored on 18/02/2002 21:06:19
Showing 1 changed files
... ...
@@ -572,10 +572,12 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
572 572
 		{
573 573
 			case HDR_TO:
574 574
 				if (new_tag)
575
+				{
575 576
 					if (get_to(msg)->tag_value.s )
576 577
 						len+=new_tag_len-get_to(msg)->tag_value.len;
577 578
 					else
578 579
 						len+=new_tag_len+5/*";tag="*/;
580
+				}
579 581
 			case HDR_VIA:
580 582
 			case HDR_FROM:
581 583
 			case HDR_CALLID:
... ...
@@ -586,7 +588,7 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
586 588
 	for(lump=msg->reply_lump;lump;lump=lump->next)
587 589
 		len += lump->text.len;
588 590
 	/*user agent header*/
589
-	len += USER_AGENT_LEN ;
591
+	len += USER_AGENT_LEN + CRLF_LEN;
590 592
 	/*content length header*/
591 593
 	len +=CONTENT_LEN_LEN + CRLF_LEN;
592 594
 	/* end of message */
... ...
@@ -639,7 +641,7 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
639 641
 						append_str( p, new_tag,new_tag_len,msg);
640 642
 						append_str( p, CRLF,CRLF_LEN,msg);
641 643
 					}
642
-				break;
644
+					break;
643 645
 				}
644 646
 			case HDR_VIA:
645 647
 			case HDR_FROM:
... ...
@@ -668,8 +670,7 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
668 670
 	/*end of message*/
669 671
 	memcpy( p, CRLF, CRLF_LEN );
670 672
 	p+=CRLF_LEN;
671
-	*(p++) = 0;
672
-	*returned_len=len;
673
+	*(p) = 0;
673 674
 	return buf;
674 675
 error:
675 676
 	if (buf) free(buf);