diff options
author | naddy <naddy@FreeBSD.org> | 2004-08-10 23:13:08 +0800 |
---|---|---|
committer | naddy <naddy@FreeBSD.org> | 2004-08-10 23:13:08 +0800 |
commit | 8b3bb53b4fad5f0face35c005e78f5ca69c5e599 (patch) | |
tree | a85a9b4adaf0048138d4e94b69b6e3d20d0c19a3 /net/sixxs-heartbeatd | |
parent | 41ec29931efda13ac738da1aae18ac6d550f8766 (diff) | |
download | freebsd-ports-gnome-8b3bb53b4fad5f0face35c005e78f5ca69c5e599.tar.gz freebsd-ports-gnome-8b3bb53b4fad5f0face35c005e78f5ca69c5e599.tar.zst freebsd-ports-gnome-8b3bb53b4fad5f0face35c005e78f5ca69c5e599.zip |
The return value of getaddrinfo(3) was only checked for negative
values but on FreeBSD it can also return positive values to indicate
a problem.
PR: 70242
Submitted by: Meno Abels <meno.abels@adviser.com>
Diffstat (limited to 'net/sixxs-heartbeatd')
-rw-r--r-- | net/sixxs-heartbeatd/Makefile | 2 | ||||
-rw-r--r-- | net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/net/sixxs-heartbeatd/Makefile b/net/sixxs-heartbeatd/Makefile index 1a9beb8aba44..0a3c6d0288ec 100644 --- a/net/sixxs-heartbeatd/Makefile +++ b/net/sixxs-heartbeatd/Makefile @@ -7,7 +7,7 @@ PORTNAME= sixxs-heartbeatd PORTVERSION= 20031026 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net ipv6 MASTER_SITES= http://www.sixxs.net/archive/sixxs/heartbeat/unix/ DISTNAME= heartbeat-unix-2003-10-26 diff --git a/net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c b/net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c new file mode 100644 index 000000000000..3dc64906179c --- /dev/null +++ b/net/sixxs-heartbeatd/files/patch-client_heartbeat-hb.c @@ -0,0 +1,23 @@ + +$FreeBSD$ + +--- client/hb.c.orig Tue Aug 10 08:10:03 2004 ++++ client/hb.c Tue Aug 10 08:09:11 2004 +@@ -91,7 +91,7 @@ + hints.ai_socktype = SOCK_DGRAM; + + // Get the POP IPv4 into a sockaddr +- if (getaddrinfo(sIPv4POP, PORT, &hints, &res) < 0) ++ if (getaddrinfo(sIPv4POP, PORT, &hints, &res) != 0) + { + hblog(LOG_ERR, "Couldn't resolve POP ip %s\n", sIPv4POP); + close(sockfd); +@@ -147,7 +147,7 @@ + hints.ai_socktype = SOCK_DGRAM; + + // Get the POP IPv4 into a sockaddr +- if (getaddrinfo(sIPv4LocalResolve, NULL, &hints, &res) < 0) ++ if (getaddrinfo(sIPv4LocalResolve, NULL, &hints, &res) != 0) + { + hblog(LOG_ERR, "Couldn't resolve POP ip %s\n", sIPv4POP); + // We return a -1, thus the app will keep beating |