Code

apcups plugin: Removed the `complain' stuff.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 9 Dec 2007 14:33:58 +0000 (15:33 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 9 Dec 2007 14:33:58 +0000 (15:33 +0100)
src/apcups.c

index 174febe45f5a5346124d7ad97ec83890cc964bda..08df0b50fbcb2cb36253bd2c97f9019f689962bb 100644 (file)
@@ -262,8 +262,6 @@ static int apc_query_server (char *host, int port,
        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
@@ -272,17 +270,13 @@ static int apc_query_server (char *host, int port,
 
        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)