Changeset 5330


Ignore:
Timestamp:
Jun 1, 2016 10:05:22 AM (3 years ago)
Author:
riza
Message:

Re #1917(misc): Fix failed purity_test() on pjlib-test since getaddrinfo() might return multiple addrinfo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pjlib-test/sock.c

    r4894 r5330  
    425425        rc = pj_getaddrinfo(pj_AF_UNSPEC(), &str_ip, &cnt, ai); 
    426426        if (rc == PJ_SUCCESS) { 
    427             pj_assert(cnt == 1); 
    428             CHECK_SA_ZERO_LEN(&ai[0].ai_addr, -70); 
     427            while (cnt--) 
     428            CHECK_SA_ZERO_LEN(&ai[0].ai_addr, -70); 
    429429        } 
    430430    } 
     
    760760    pj_status_t status; 
    761761 
     762    PJ_LOG(3,("test", "...gethostbyname_test()")); 
     763 
    762764    /* Testing pj_gethostbyname() with invalid host */ 
    763765    host = pj_str("an-invalid-host-name"); 
Note: See TracChangeset for help on using the changeset viewer.