]> granicus.if.org Git - icinga2/blobdiff - plugins/check_load.cpp
Make a few functions static
[icinga2] / plugins / check_load.cpp
index 3c6ba3983e72f309a54ff585a0f99c5f6c137fbd..94c70238f30ee4e08a7429b4e0bc0d5d4038154c 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
+ * Copyright (C) 2012-2017 Icinga Development Team (https://www.icinga.com/)  *
  *                                                                            *
  * This program is free software; you can redistribute it and/or              *
  * modify it under the terms of the GNU General Public License                *
@@ -236,6 +236,10 @@ INT check_load(printInfoStruct& printInfo)
                        if (debug)
                                std::wcout << L"Recieved Value of " << DisplayValue.doubleValue << L" (idle)" << '\n';
                        printInfo.load = 100.0 - DisplayValue.doubleValue;
+               } else {
+                       if (debug)
+                               std::wcout << L"Received data was not valid\n";
+                       goto die;
                }
 
                if (debug)