Changeset 4103 for pjproject


Ignore:
Timestamp:
Apr 26, 2012 11:42:27 PM (13 years ago)
Author:
bennylp
Message:

Misc (re #1417): normalize the error status returned by pj_getaddrinfo() to PJ_ERESOLVE, because this error is treated specially to trigger SIP status code 502. This was suspected to have caused pjsip unit test to fail in the regc test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsip/sip_resolve.c

    r3553 r4103  
    264264            count = 1; 
    265265            status = pj_getaddrinfo(af, &target->addr.host, &count, &ai); 
    266             if (status != PJ_SUCCESS) 
     266            if (status != PJ_SUCCESS) { 
     267                /* "Normalize" error to PJ_ERESOLVE. This is a special error 
     268                 * because it will be translated to SIP status 502 by 
     269                 * sip_transaction.c 
     270                 */ 
     271                status = PJ_ERESOLVE; 
    267272                goto on_error; 
     273            } 
    268274 
    269275            svr_addr.entry[0].addr.addr.sa_family = (pj_uint16_t)af; 
Note: See TracChangeset for help on using the changeset viewer.