summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a6ac95)
raw | patch | inline | side by side (parent: 0a6ac95)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Dec 2007 14:33:58 +0000 (15:33 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Dec 2007 14:33:58 +0000 (15:33 +0100) |
src/apcups.c | patch | blob | history |
diff --git a/src/apcups.c b/src/apcups.c
index 174febe45f5a5346124d7ad97ec83890cc964bda..08df0b50fbcb2cb36253bd2c97f9019f689962bb 100644 (file)
--- a/src/apcups.c
+++ b/src/apcups.c
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)