Changeset 4119


Ignore:
Timestamp:
May 11, 2012 8:41:28 AM (12 years ago)
Author:
nanang
Message:

Fix #1507: Added TLS support in pjsua_transport_get_info().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_core.c

    r3883 r4119  
    20822082    PJSUA_LOCK(); 
    20832083 
    2084     if (pjsua_var.tpdata[id].type == PJSIP_TRANSPORT_UDP) { 
     2084    if (t->type == PJSIP_TRANSPORT_UDP) { 
    20852085 
    20862086        pjsip_transport *tp = t->data.tp; 
     
    21032103        status = PJ_SUCCESS; 
    21042104 
    2105     } else if (pjsua_var.tpdata[id].type == PJSIP_TRANSPORT_TCP) { 
     2105    } else if (t->type == PJSIP_TRANSPORT_TCP || 
     2106               t->type == PJSIP_TRANSPORT_TLS) 
     2107    { 
    21062108 
    21072109        pjsip_tpfactory *factory = t->data.factory; 
     
    21142116        info->id = id; 
    21152117        info->type = t->type; 
    2116         info->type_name = pj_str("TCP"); 
    2117         info->info = pj_str("TCP transport"); 
     2118        info->type_name = (t->type==PJSIP_TRANSPORT_TCP)? pj_str("TCP"): 
     2119                                                          pj_str("TLS"); 
     2120        info->info = (t->type==PJSIP_TRANSPORT_TCP)? pj_str("TCP transport"): 
     2121                                                     pj_str("TLS transport"); 
    21182122        info->flag = factory->flag; 
    21192123        info->addr_len = sizeof(factory->local_addr); 
Note: See TracChangeset for help on using the changeset viewer.