... | ... |
@@ -530,7 +530,7 @@ char * build_res_buf_from_sip_req( unsigned int code , |
530 | 530 |
/*computes the lenght of the new response buffer*/ |
531 | 531 |
len = 0; |
532 | 532 |
/* first line */ |
533 |
- len += 3/*code*/ + 1/*space*/ + strlen(text) + CRLF_LEN/*new line*/; |
|
533 |
+ len += SIP_VERSION_LEN + 1/*space*/ + 3/*code*/ + 1/*space*/ + strlen(text) + CRLF_LEN/*new line*/; |
|
534 | 534 |
/*headers that will be copied (TO, FROM, CSEQ,CALLID,VIA)*/ |
535 | 535 |
for ( hdr=msg->headers ; hdr ; hdr=hdr->next ) |
536 | 536 |
if ( hdr->type==HDR_VIA || hdr->type==HDR_FROM || |
... | ... |
@@ -552,6 +552,10 @@ char * build_res_buf_from_sip_req( unsigned int code , |
552 | 552 |
/* filling the buffer*/ |
553 | 553 |
p=buf; |
554 | 554 |
/* first line */ |
555 |
+ memcpy( p , SIP_VERSION , SIP_VERSION_LEN ); |
|
556 |
+ p += SIP_VERSION_LEN; |
|
557 |
+ *(p++) = ' ' ; |
|
558 |
+ /*code*/ |
|
555 | 559 |
for ( i=2 , foo = code ; i>=0 ; i-- , foo=foo/10 ) |
556 | 560 |
*(p+i) = '0' + foo - ( foo/10 )*10; |
557 | 561 |
p += 3; |
... | ... |
@@ -21,9 +21,8 @@ route{ |
21 | 21 |
|
22 | 22 |
if ( t_lookup_request()) { |
23 | 23 |
if ( method=="ACK" ) { |
24 |
- # XXX ... t_release not implemented yet |
|
25 |
- log("SER: t_release\n"); |
|
26 |
- #t_release(); |
|
24 |
+ log("SER: ACK received -> t_release\n"); |
|
25 |
+ t_put_on_wait(); |
|
27 | 26 |
} else { |
28 | 27 |
t_retransmit_reply(); |
29 | 28 |
log("SER: yet another annoying retranmission\n"); |