summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsip/sip_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/src/pjsip/sip_util.c')
-rw-r--r--pjsip/src/pjsip/sip_util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pjsip/src/pjsip/sip_util.c b/pjsip/src/pjsip/sip_util.c
index 4f82a1a6..f238f524 100644
--- a/pjsip/src/pjsip/sip_util.c
+++ b/pjsip/src/pjsip/sip_util.c
@@ -1248,14 +1248,14 @@ stateless_send_resolver_callback( pj_status_t status,
}
pj_assert(tdata->dest_info.addr.count != 0);
-#if !defined(PJSIP_DONT_SWITCH_TO_TCP) || PJSIP_DONT_SWITCH_TO_TCP==0
/* RFC 3261 section 18.1.1:
* If a request is within 200 bytes of the path MTU, or if it is larger
* than 1300 bytes and the path MTU is unknown, the request MUST be sent
* using an RFC 2914 [43] congestion controlled transport protocol, such
* as TCP.
*/
- if (tdata->msg->type == PJSIP_REQUEST_MSG &&
+ if (pjsip_cfg()->endpt.disable_tcp_switch==0 &&
+ tdata->msg->type == PJSIP_REQUEST_MSG &&
tdata->dest_info.addr.count > 0 &&
tdata->dest_info.addr.entry[0].type == PJSIP_TRANSPORT_UDP)
{
@@ -1297,7 +1297,6 @@ stateless_send_resolver_callback( pj_status_t status,
tdata->dest_info.addr.count = count * 2;
}
}
-#endif /* !PJSIP_DONT_SWITCH_TO_TCP */
/* Process the addresses. */
stateless_send_transport_cb( stateless_data, tdata, -PJ_EPENDING);