Ignore:
Timestamp:
Feb 16, 2012 5:35:25 AM (12 years ago)
Author:
bennylp
Message:

Allow run-time control of automatic switching to TCP when request is larger than 1300 (the PJSIP_DONT_SWITCH_TO_TCP compile time setting) via pjsip_cfg()->endpt.disable_tcp_switch setting. Thanks Johan Lantz for the suggestion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsip/sip_util.c

    r3832 r3952  
    12491249    pj_assert(tdata->dest_info.addr.count != 0); 
    12501250 
    1251 #if !defined(PJSIP_DONT_SWITCH_TO_TCP) || PJSIP_DONT_SWITCH_TO_TCP==0 
    12521251    /* RFC 3261 section 18.1.1: 
    12531252     * If a request is within 200 bytes of the path MTU, or if it is larger 
     
    12561255     * as TCP. 
    12571256     */ 
    1258     if (tdata->msg->type == PJSIP_REQUEST_MSG && 
     1257    if (pjsip_cfg()->endpt.disable_tcp_switch==0 && 
     1258        tdata->msg->type == PJSIP_REQUEST_MSG && 
    12591259        tdata->dest_info.addr.count > 0 &&  
    12601260        tdata->dest_info.addr.entry[0].type == PJSIP_TRANSPORT_UDP) 
     
    12981298        } 
    12991299    } 
    1300 #endif /* !PJSIP_DONT_SWITCH_TO_TCP */ 
    13011300 
    13021301    /* Process the addresses. */ 
Note: See TracChangeset for help on using the changeset viewer.