Changeset 4770 for pjproject/trunk/pjsip/src/pjsip/sip_util.c
- Timestamp:
- Feb 27, 2014 6:16:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_util.c
r4537 r4770 803 803 /* Fill-up destination information from a target URI */ 804 804 static pj_status_t get_dest_info(const pjsip_uri *target_uri, 805 const pjsip_uri *request_uri, 805 806 pj_pool_t *pool, 806 807 pjsip_host_info *dest_info) … … 811 812 pj_bzero(dest_info, sizeof(*dest_info)); 812 813 813 if (PJSIP_URI_SCHEME_IS_SIPS(target_uri)) { 814 /* When request URI uses sips scheme, TLS must always be used regardless 815 * of the target scheme or transport type (see ticket #1740). 816 */ 817 if (PJSIP_URI_SCHEME_IS_SIPS(target_uri) || 818 (pjsip_cfg()->endpt.disable_tls_switch == 0 && request_uri && 819 PJSIP_URI_SCHEME_IS_SIPS(request_uri))) 820 { 814 821 pjsip_uri *uri = (pjsip_uri*) target_uri; 815 822 const pjsip_sip_uri *url=(const pjsip_sip_uri*)pjsip_uri_get_uri(uri); 816 823 unsigned flag; 824 825 if (!PJSIP_URI_SCHEME_IS_SIPS(target_uri)) { 826 PJ_LOG(4,(THIS_FILE, "Automatic switch to TLS transport as " 827 "request-URI uses ""sips"" scheme.")); 828 } 817 829 818 830 dest_info->flag |= (PJSIP_TRANSPORT_SECURE | PJSIP_TRANSPORT_RELIABLE); … … 896 908 } 897 909 898 return get_dest_info(target_uri, (pj_pool_t*)tdata->pool, dest_info); 910 return get_dest_info(target_uri, tdata->msg->line.req.uri, 911 (pj_pool_t*)tdata->pool, dest_info); 899 912 } 900 913 … … 999 1012 1000 1013 /* Fill up the destination host/port from the URI. */ 1001 status = get_dest_info(target_uri, tdata->pool, dest_info); 1014 status = get_dest_info(target_uri, new_request_uri, tdata->pool, 1015 dest_info); 1002 1016 if (status != PJ_SUCCESS) 1003 1017 return status; … … 1496 1510 1497 1511 /* Build destination info. */ 1498 status = get_dest_info(uri, tdata->pool, &dest_info);1512 status = get_dest_info(uri, NULL, tdata->pool, &dest_info); 1499 1513 if (status != PJ_SUCCESS) { 1500 1514 pjsip_tx_data_dec_ref(tdata);
Note: See TracChangeset
for help on using the changeset viewer.