Changeset 6025


Ignore:
Timestamp:
Jun 12, 2019 5:04:32 AM (5 years ago)
Author:
ming
Message:

Re #2198:

  • Do not return IPv6 address for loop transport
  • Fixed failed PJSIP test because of result count mismatch due to the additional IPv6 address
Location:
pjproject/trunk/pjsip/src
Files:
2 edited

Legend:

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

    r5998 r6025  
    284284                } 
    285285 
    286                 if (af == pj_AF_INET6() || PJSIP_MAX_RESOLVED_ADDRESSES > 1) 
     286                if (af == pj_AF_INET6() || 
     287                    (type != PJSIP_TRANSPORT_LOOP_DGRAM && 
     288                     PJSIP_MAX_RESOLVED_ADDRESSES > 1)) 
    287289                { 
    288290                    /* Generate a synthesized IPv6 address, if possible. */ 
  • pjproject/trunk/pjsip/src/test/dns_test.c

    r5848 r6025  
    363363        unsigned i; 
    364364 
    365         if (ref->count != result.servers.count) { 
     365        /* Result may have double the number of addresses, for IPv4 and IPv6 */ 
     366        if (ref->count != result.servers.count && 
     367            2*ref->count != result.servers.count) 
     368        { 
    366369            PJ_LOG(3,(THIS_FILE, "  test_resolve() error 10: result count mismatch")); 
    367370            return 10; 
Note: See TracChangeset for help on using the changeset viewer.