diff options
author | Christian Weisgerber <naddy@FreeBSD.org> | 2004-08-10 15:13:08 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@FreeBSD.org> | 2004-08-10 15:13:08 +0000 |
commit | c7d850453c00cc71e3da5628b43e5ac416e60335 (patch) | |
tree | f72b24180902aa55d4574bbe127b5bf8c7fa9bea | |
parent | 9e4111b5302f230de585164efd527ab3d692d104 (diff) | |
download | freebsd-ports-c7d850453c00cc71e3da5628b43e5ac416e60335.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>
-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 |