]> git.sur5r.net Git - bacula/bacula/commit
Add support for new POSIX getaddrinfo interface.
authorMarco van Wieringen <mvw@planets.elm.net>
Thu, 19 Apr 2012 12:04:52 +0000 (14:04 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 28 May 2012 09:07:23 +0000 (11:07 +0200)
commite2bd82760a4255751de268862add9765bfac0491
tree5b4b545348e5734f66d3833014a2f0887d20444c
parent4fefe4e75a95ac85188d50f18e73be69d67605b4
Add support for new POSIX getaddrinfo interface.

Support the new POSIX getaddrinfo interface which replaces
the dated gethostbyname interface which is obsoleted in
the POSIX 1003.1 standard. When getaddrinfo is supported
by the OS its the prefered interface as gethostbyname is
not thread-safe and we don't support the gethostbyname_r
thread-safe version of gethostbyname.

The bnet code is changed to support the absolute mimimum set
of the getaddrinfo interface replacing only the core functions
normally performed by gethostbyname. We could add more generic
support for the getaddrinfo function but have not for now.

bstmp is changed to use the full getaddrinfo functionality
so it now can also connect to ipv6 mailhost when getaddrinfo
is used.

Also all sprintf calls in bsmtp are replaced with snprintf calls.
bacula/autoconf/configure.in
bacula/src/lib/bnet.c
bacula/src/lib/bsock.c
bacula/src/tools/bsmtp.c