Changeset 722


Ignore:
Timestamp:
Sep 14, 2006 9:16:11 PM (15 years ago)
Author:
bennylp
Message:

Applied temporary fix to error code returned by pj_gethostbyname(). Under *nix, the error code is returned in h_errno, and the error string is reported by hstrerror(). But it is a bit too complex to support this for the moment, so we just return PJ_ERESOLVE for any failure returned by gethostbyname()

Location:
pjproject/trunk/pjlib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/errno.h

    r534 r722  
    286286 */ 
    287287#define PJ_ETOOBIG          (PJ_ERRNO_START_STATUS + 17)/* 70017 */ 
     288/** 
     289 * @hideinitializer 
     290 * Error in gethostbyname() 
     291 */ 
     292#define PJ_ERESOLVE         (PJ_ERRNO_START_STATUS + 18)/* 70018 */ 
    288293 
    289294 
  • pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c

    r721 r722  
    3939    he = gethostbyname(copy); 
    4040    if (!he) 
    41         return PJ_RETURN_OS_ERROR(pj_get_native_netos_error()); 
     41        return PJ_ERESOLVE; 
    4242 
    4343    phe->h_name = he->h_name; 
  • pjproject/trunk/pjlib/src/pj/errno.c

    r534 r722  
    6565    PJ_BUILD_ERR(PJ_EEOF,          "End of file" ), 
    6666    PJ_BUILD_ERR(PJ_ETOOBIG,       "Size is too big"), 
     67    PJ_BUILD_ERR(PJ_ERESOLVE,      "gethostbyname() has returned error"), 
    6768}; 
    6869#endif  /* PJ_HAS_ERROR_STRING */ 
Note: See TracChangeset for help on using the changeset viewer.