Ignore:
Timestamp:
May 19, 2016 6:55:16 AM (5 years ago)
Author:
ming
Message:

Fixed #1921: Add support to handle IPv6 transports in pjsua_transport API and transport keep alive

Also:

  • add more detailed transport info for TCP and TLS transport
  • fixed pjsua sample app which tries to get IPv4 local address from IPv6 transport.
File:
1 edited

Legend:

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

    r5244 r5308  
    310310                                                pjsip_tpfactory **p_factory) 
    311311{ 
     312    enum { INFO_LEN = 100 }; 
     313    char local_addr[PJ_INET6_ADDRSTRLEN+10]; 
    312314    pj_pool_t *pool; 
    313315    pj_bool_t is_ipv6; 
     
    546548        goto on_error; 
    547549    } 
     550 
     551    /* Set transport info. */ 
     552    if (listener->factory.info == NULL) { 
     553        listener->factory.info = (char*) pj_pool_alloc(listener->factory.pool, 
     554                                                       INFO_LEN); 
     555    } 
     556    pj_sockaddr_print(listener_addr, local_addr, sizeof(local_addr), 3); 
     557    pj_ansi_snprintf(  
     558        listener->factory.info, INFO_LEN, "tls %s [published as %.*s:%d]", 
     559        local_addr, 
     560        (int)listener->factory.addr_name.host.slen, 
     561        listener->factory.addr_name.host.ptr, 
     562        listener->factory.addr_name.port); 
    548563 
    549564    if (has_listener) { 
Note: See TracChangeset for help on using the changeset viewer.