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 586
 	for(lump=msg->reply_lump;lump;lump=lump->next)
587 587
 		len += lump->text.len;
588 588
 	/*user agent header*/
589
-	len += USER_AGENT_LEN ;
589
+	len += USER_AGENT_LEN + CRLF_LEN;
590 590
 	/*content length header*/
591 591
 	len +=CONTENT_LEN_LEN + CRLF_LEN;
592 592
 	/* end of message */
... ...
@@ -639,7 +641,7 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
639 639
 						append_str( p, new_tag,new_tag_len,msg);
640 640
 						append_str( p, CRLF,CRLF_LEN,msg);
641 641
 					}
642
-				break;
642
+					break;
643 643
 				}
644 644
 			case HDR_VIA:
645 645
 			case HDR_FROM:
... ...
@@ -668,8 +670,7 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
668 668
 	/*end of message*/
669 669
 	memcpy( p, CRLF, CRLF_LEN );
670 670
 	p+=CRLF_LEN;
671
-	*(p++) = 0;
672
-	*returned_len=len;
671
+	*(p) = 0;
673 672
 	return buf;
674 673
 error:
675 674
 	if (buf) free(buf);