فهرست منبع

minor changes :)

Bogdan-Andrei Iancu 24 سال پیش
والد
کامیت
8b863d8cca
2فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 5 1
      msg_translator.c
  2. 2 3
      t_debug.cfg

+ 5 - 1
msg_translator.c

@@ -530,7 +530,7 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
 	/*computes the lenght of the new response buffer*/
 	len = 0;
 	/* first line */
-	len += 3/*code*/ + 1/*space*/ + strlen(text) + CRLF_LEN/*new line*/;
+	len += SIP_VERSION_LEN + 1/*space*/ + 3/*code*/ + 1/*space*/ + strlen(text) + CRLF_LEN/*new line*/;
 	/*headers that will be copied (TO, FROM, CSEQ,CALLID,VIA)*/
 	for ( hdr=msg->headers ; hdr ; hdr=hdr->next )
 		if ( hdr->type==HDR_VIA || hdr->type==HDR_FROM ||
@@ -552,6 +552,10 @@ char * build_res_buf_from_sip_req(	unsigned int code ,
 	/* filling the buffer*/
 	p=buf;
 	/* first line */
+	memcpy( p , SIP_VERSION , SIP_VERSION_LEN );
+	p += SIP_VERSION_LEN;
+	*(p++) = ' ' ;
+	/*code*/
 	for ( i=2 , foo = code  ;  i>=0  ;  i-- , foo=foo/10 )
 		*(p+i) = '0' + foo - ( foo/10 )*10;
 	p += 3;

+ 2 - 3
t_debug.cfg

@@ -21,9 +21,8 @@ route{
 
 	if ( t_lookup_request()) {
 		if ( method=="ACK" )	{
-			# XXX ... t_release not implemented yet
-			log("SER: t_release\n");
-			#t_release();
+			log("SER: ACK received -> t_release\n");
+			t_put_on_wait();
 		} else {
 			t_retransmit_reply();
 			log("SER: yet another annoying retranmission\n");