Ignore:
Timestamp:
Jun 28, 2006 4:46:49 PM (18 years ago)
Author:
bennylp
Message:

Major improvements in PJSIP to support TCP. The changes fall into these categories: (1) the TCP transport implementation itself (*.[hc]), (2) bug-fix in SIP transaction when using reliable transports, (3) support for TCP transport in PJSUA-LIB/PJSUA, and (4) changes in PJSIP-TEST to support TCP testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r556 r563  
    13001300        pj_memcpy(&tsx->addr, &tsx->res_addr.addr, tsx->res_addr.addr_len); 
    13011301        tsx->addr_len = tsx->res_addr.addr_len; 
     1302        tsx->is_reliable = PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport); 
    13021303    } 
    13031304 
     
    21312132            } 
    21322133 
    2133             /* Start timer H for transaction termination */ 
    2134             pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer, 
    2135                                        &timeout_timer_val); 
     2134            /* For INVITE, start timer H for transaction termination  
     2135             * regardless whether transport is reliable or not. 
     2136             * For non-INVITE, start timer J with the value of 64*T1 for 
     2137             * non-reliable transports, and zero for reliable transports. 
     2138             */ 
     2139            if (tsx->method.id == PJSIP_INVITE_METHOD) { 
     2140                /* Start timer H for INVITE */ 
     2141                pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer, 
     2142                                           &timeout_timer_val); 
     2143            } else if (!tsx->is_reliable) { 
     2144                /* Start timer J on 64*T1 seconds for non-INVITE */ 
     2145                pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer, 
     2146                                           &timeout_timer_val); 
     2147            } else { 
     2148                /* Start timer J on zero seconds for non-INVITE */ 
     2149                pj_time_val zero_time = { 0, 0 }; 
     2150                pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer, 
     2151                                           &zero_time); 
     2152            } 
    21362153 
    21372154            /* For INVITE, if unreliable transport is used, retransmission  
Note: See TracChangeset for help on using the changeset viewer.