From 548b1440e5ca1d97e941b368543aef315af8a3f0 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 1 Sep 2004 07:23:06 +0000 Subject: [PATCH] - Fix logic error in resolution of names on IPv4 systems. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1575 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/ChangeLog | 2 ++ bacula/ReleaseNotes | 1 + bacula/src/lib/bnet.c | 10 +++------- bacula/src/version.h | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 72acd0411c..9f7b7306ff 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -1,4 +1,6 @@ Changes to 1.35.2 +01Sep04 +- Fix logic error in resolution of names on IPv4 systems. 30Aug04 - Inhibit printing of FileSet for a restore as it is misleading. - Cleaned up a number of minor scripting problems with the CDROM diff --git a/bacula/ReleaseNotes b/bacula/ReleaseNotes index 1aa986dc8a..b840899197 100644 --- a/bacula/ReleaseNotes +++ b/bacula/ReleaseNotes @@ -20,6 +20,7 @@ Items to note!!! - Regular expressions are not implemented in the Win32 FD. Other Items: +- Fix logic error in resolution of names on IPv4 systems. - Inhibit printing of FileSet for a restore as it is misleading. - Cleaned up a number of minor scripting problems with the CDROM creation. diff --git a/bacula/src/lib/bnet.c b/bacula/src/lib/bnet.c index 1cdd33520f..ac65544ba8 100644 --- a/bacula/src/lib/bnet.c +++ b/bacula/src/lib/bnet.c @@ -637,19 +637,13 @@ dlist *bnet_host2ipaddrs(const char *host, int family, const char **errstr) return 0; } } else { - int done = 0; errmsg = resolv_host(AF_INET, host, addr_list); #ifdef HAVE_IPV6 if (errmsg) { errmsg = resolv_host(AF_INET6, host, addr_list); - if (!errmsg) { - done = 1; - } - } else { - done = 1; } #endif - if (!done) { + if (errmsg) { *errstr = errmsg; free_addresses(addr_list); return 0; @@ -684,6 +678,8 @@ static BSOCK *bnet_open(JCR * jcr, const char *name, char *host, char *service, /* Note errstr is not malloc'ed */ Qmsg2(jcr, M_ERROR, 0, "gethostbyname() for host \"%s\" failed: ERR=%s\n", host, errstr); + Dmsg2(100, "bnet_host2ipaddrs() for host %s failed: ERR=%s\n", + host, errstr); *fatal = 1; return NULL; } diff --git a/bacula/src/version.h b/bacula/src/version.h index 56b7e9019a..e094337fdf 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -1,8 +1,8 @@ /* */ #undef VERSION #define VERSION "1.35.2" -#define BDATE "30 August 2004" -#define LSMDATE "30Aug04" +#define BDATE "01 September 2004" +#define LSMDATE "01Sep04" /* Debug flags */ #undef DEBUG -- 2.39.2