summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9229808)
raw | patch | inline | side by side (parent: 9229808)
author | Florian Forster <octo@verplant.org> | |
Fri, 2 Jun 2006 22:14:16 +0000 (00:14 +0200) | ||
committer | Florian Forster <octo@verplant.org> | |
Fri, 2 Jun 2006 22:14:16 +0000 (00:14 +0200) |
Also no further error is printed if the command exits due to no resolvable
hosts: People will notice that condition..
hosts: People will notice that condition..
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index 50c051b6d8c9beb7b3b544c9a24cb8897ca6c8f8..52f12c6d69ffb690cd4289f7a9cb8d1338394590 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
{
if (ping_host_add (ping, argv[i]) < 0)
{
- fprintf (stderr, "ping_host_add (%s) failed\n", argv[i]);
+ const char *errmsg = ping_get_error (ping);
+
+ fprintf (stderr, "Adding host `%s' failed: %s\n", argv[i], errmsg);
continue;
}
}
}
if (i == 0)
- {
- fprintf (stderr, "No valid hosts left.\n");
exit (1);
- }
memset (&sigint_action, '\0', sizeof (sigint_action));
sigint_action.sa_handler = sigint_handler;