Changeset 1571 for pjproject


Ignore:
Timestamp:
Nov 11, 2007 3:06:07 AM (17 years ago)
Author:
bennylp
Message:

Do not resolve SIP address with STUN if public address is configured

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r1536 r1571  
    12411241     * the name of local host. 
    12421242     */ 
    1243     if (stun_srv.slen) { 
     1243    if (p_pub_addr->sin_addr.s_addr != 0) { 
     1244        /* 
     1245         * Public address is already specified, no need to resolve the  
     1246         * address, only set the port. 
     1247         */ 
     1248        if (p_pub_addr->sin_port == 0) 
     1249            p_pub_addr->sin_port = pj_htons((pj_uint16_t)port); 
     1250 
     1251    } else if (stun_srv.slen) { 
    12441252        /* 
    12451253         * STUN is specified, resolve the address with STUN. 
     
    12541262            return status; 
    12551263        } 
    1256  
    1257     } else if (p_pub_addr->sin_addr.s_addr != 0) { 
    1258         /* 
    1259          * Public address is already specified, no need to resolve the  
    1260          * address, only set the port. 
    1261          */ 
    1262         if (p_pub_addr->sin_port == 0) 
    1263             p_pub_addr->sin_port = pj_htons((pj_uint16_t)port); 
    12641264 
    12651265    } else { 
Note: See TracChangeset for help on using the changeset viewer.