One question about getaddrinfo invoked in _dbus_listen_tcp_socket

Elvis Qin <elvis.qin-dY08KVG/lbpWk0Htik3J/[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <[email protected]>
Hello expert



This is Elvis from broadcom. Now I meet one problem about dbus-dameon which
prefer adding more listen on TCP port,   it will meet below error “Failed
to start message bus: Failed to lookup host/port: "*:123456": Name or
service not known (-2)”



After trace, I know it is for getaddreinfo error.  Would you explain why
here we use below 2 flags and *AI_ADDRCONFIG = 0*?



Really look forward to your response.



dbus/dbus-sysdeps-unix.c



*  hints.ai_flags = AI_ADDRCONFIG | AI_PASSIVE;   ==== > Why here we put
 AI_ADDRCONFIG, any purpose? *

     if ((res = getaddrinfo(host, port, &hints, &ai)) != 0 || !ai)

    {

      dbus_set_error (error,

                      _dbus_error_from_errno (errno),

                      "Failed to lookup host/port: \"%s:%s\": %s (%d)",

                      host ? host : "*", port, gai_strerror(res), res);

      goto failed;

}



Thanks

Elvis

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.