Ignore:
Timestamp:
Sep 20, 2012 6:00:23 AM (12 years ago)
Author:
bennylp
Message:

Fixed #1585: IPv6 support for SIP TCP and TLS transports and PJSUA-LIB v2

File:
1 edited

Legend:

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

    r4239 r4262  
    199199        PJSIP_TRANSPORT_RELIABLE 
    200200    }, 
     201    { 
     202        PJSIP_TRANSPORT_TLS6, 
     203        5061, 
     204        {"TLS", 3}, 
     205        "TLS IPv6 transport", 
     206        PJSIP_TRANSPORT_RELIABLE | PJSIP_TRANSPORT_SECURE 
     207    }, 
    201208}; 
    202209 
     
    12801287                status = get_net_interface(f->type, &prm->dst_host, 
    12811288                                           &tmp_str); 
    1282                 if (status != PJ_SUCCESS) 
    1283                     goto on_return; 
    1284                 pj_strdup(pool, &prm->ret_addr, &tmp_str); 
     1289                if (status == PJ_SUCCESS) { 
     1290                    pj_strdup(pool, &prm->ret_addr, &tmp_str); 
     1291                } else { 
     1292                    /* It could fail "normally" on certain cases, e.g. 
     1293                     * when connecting to IPv6 link local address, it 
     1294                     * will wail with EINVAL. 
     1295                     * In this case, fallback to use the default interface 
     1296                     * rather than failing the call. 
     1297                     */ 
     1298                    PJ_PERROR(5,(THIS_FILE, status, "Warning: unable to " 
     1299                                 "determine local interface")); 
     1300                    pj_strdup(pool, &prm->ret_addr, &f->addr_name.host); 
     1301                    status = PJ_SUCCESS; 
     1302                } 
    12851303            } else { 
    12861304                pj_strdup(pool, &prm->ret_addr, &f->addr_name.host); 
Note: See TracChangeset for help on using the changeset viewer.