Keep getting Err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 */
    pj_bzero(&ai[0], sizeof(ai[0]));
    ai[0].ai_addr.addr.sa_family = (pj_uint16_t)af;

If not, then maybe you're not synchronizing with the trunk?

cheers,
 -benny



> thanks
> lakmal
>



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux