[pjsip] Keep getting Err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
bennylp at pjsip.org
Fri Feb 1 04:17:11 EST 2008
On 2/1/08, Lakmal Molligoda <mlakmal at gmail.com> wrote:
> Hi Benny,
> I took latest SVN and this issue is still thr. my sip server ip is getting
> passed to pj_gethostbyname function. and it returns PJ_ERESOLVE error.
> checking whether passed hostname is a ip address is not implemented in the
> pj_gethostbyname function.
The IP address checking is implemented in pj_getaddrinfo() function,
and it will only call pj_gethostbyname() if the name is not an IP
address. Check pj/addr_resolv_sock.c:139, you should see these lines:
/* Check if nodename is IP address */
ai.ai_addr.addr.sa_family = (pj_uint16_t)af;
If not, then maybe you're not synchronizing with the trunk?
More information about the pjsip