getaddrinfo(3) returns non-zero on error, not only negative values.

From: Meno Abels <meno.abels@adviser.com>

Also update plist.
This commit is contained in:
naddy 2004-08-10 16:11:30 +00:00
parent 4de0731419
commit b53d1508cf
2 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-client_hb_c,v 1.1 2004/08/10 16:11:30 naddy Exp $
--- client/hb.c.orig Tue Aug 10 18:06:17 2004
+++ client/hb.c Tue Aug 10 18:06:50 2004
@@ -91,7 +91,7 @@ int heartbeat_socket(
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 @@ int heartbeat_socket(
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

View File

@ -1,7 +1,7 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/04/23 19:32:51 naddy Exp $
@comment $OpenBSD: PLIST,v 1.2 2004/08/10 16:11:30 naddy Exp $
sbin/sixxs-heartbeatd
share/doc/sixxs-heartbeatd/
share/doc/sixxs-heartbeatd/README
share/doc/sixxs-heartbeatd/draft-massar-v6ops-heartbeat-00.txt
share/examples/sixxs-heartbeatd/
share/examples/sixxs-heartbeatd/heartbeat.conf
@dirrm share/examples/sixxs-heartbeatd
@dirrm share/doc/sixxs-heartbeatd