diff --git a/src/ping.c b/src/ping.c
index 48cea55c57f6e173d348e280d0f12bba976404ce..48a0ac87ef513c72b28bc73c8922083b088398ac 100644 (file)
--- a/src/ping.c
+++ b/src/ping.c
#include "common.h"
#include "plugin.h"
#include "configfile.h"
-#include "utils_debug.h"
#include <netinet/in.h>
#include "liboping/oping.h"
hl_prev = NULL;
while (hl_this != NULL)
{
- DBG ("host = %s, wait_left = %i, wait_time = %i, next = %p",
+ DEBUG ("host = %s, wait_left = %i, wait_time = %i, next = %p",
hl_this->host, hl_this->wait_left, hl_this->wait_time, (void *) hl_this->next);
if (hl_this->wait_left <= 0)
{
if (ping_host_add (pingobj, hl_this->host) == 0)
{
- DBG ("Successfully added host %s", hl_this->host);
+ DEBUG ("Successfully added host %s", hl_this->host);
/* Remove the host from the linked list */
if (hl_prev != NULL)
hl_prev->next = hl_this->next;
{
if ((pingobj = ping_construct ()) == NULL)
{
- syslog (LOG_ERR, "ping: `ping_construct' failed: %s",
+ ERROR ("ping: `ping_construct' failed: %s",
ping_get_error (pingobj));
return (1);
}
if ((hl = (hostlist_t *) malloc (sizeof (hostlist_t))) == NULL)
{
- syslog (LOG_ERR, "ping plugin: malloc failed: %s",
+ ERROR ("ping plugin: malloc failed: %s",
strerror (errno));
return (1);
}
if ((host = strdup (value)) == NULL)
{
free (hl);
- syslog (LOG_ERR, "ping plugin: strdup failed: %s",
+ ERROR ("ping plugin: strdup failed: %s",
strerror (errno));
return (1);
}
int ttl = atoi (value);
if (ping_setopt (pingobj, PING_DEF_TIMEOUT, (void *) &ttl))
{
- syslog (LOG_WARNING, "ping: liboping did not accept the TTL value %i", ttl);
+ WARNING ("ping: liboping did not accept the TTL value %i", ttl);
return (1);
}
}
if (ping_send (pingobj) < 0)
{
- syslog (LOG_ERR, "ping: `ping_send' failed: %s",
+ ERROR ("ping: `ping_send' failed: %s",
ping_get_error (pingobj));
return (-1);
}
&latency, &buf_len))
continue;
- DBG ("host = %s, latency = %f", host, latency);
+ DEBUG ("host = %s, latency = %f", host, latency);
ping_submit (host, latency);
}