char *key;
double value;
- static complain_t compl;
-
#if APCMAIN
# define PRINT_VALUE(name, val) printf(" Found property: name = %s; value = %f;\n", name, val)
#else
if (global_sockfd < 0)
{
- if ((global_sockfd = net_open (host, NULL, port)) < 0)
+ global_sockfd = net_open (host, NULL, port);
+ if (global_sockfd < 0)
{
- plugin_complain (LOG_ERR, &compl, "apcups plugin: "
- "Connecting to the apcupsd failed.");
+ ERROR ("apcups plugin: Connecting to the "
+ "apcupsd failed.");
return (-1);
}
- else
- {
- plugin_relief (LOG_NOTICE, &compl, "apcups plugin: "
- "Connection re-established to the apcupsd.");
- }
}
if (net_send (&global_sockfd, "status", 6) < 0)