From 0b818bd37330901a15a37472f6fca967e7844352 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Tue, 15 Oct 2013 17:55:20 +0200 Subject: [PATCH] im-collectd: the core only sends updates the first time the host is monitored. --- src/im/InformationManager.cc | 5 +---- src/xml/ObjectXML.cc | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/im/InformationManager.cc b/src/im/InformationManager.cc index f8efeddd62..d5614b9ec4 100644 --- a/src/im/InformationManager.cc +++ b/src/im/InformationManager.cc @@ -98,8 +98,6 @@ int InformationManager::start() return -1; } - utime(remotes_location.c_str(), 0); - NebulaLog::log("InM",Log::INFO,"Starting Information Manager..."); pthread_attr_init (&pattr); @@ -257,8 +255,7 @@ void InformationManager::timer_action() { bool update_remotes = false; - if ((sb.st_mtime != 0) && - (sb.st_mtime > host->get_last_monitored())) + if (host->get_last_monitored() == 0) { update_remotes = true; } diff --git a/src/xml/ObjectXML.cc b/src/xml/ObjectXML.cc index 1417d6f898..40f140768b 100644 --- a/src/xml/ObjectXML.cc +++ b/src/xml/ObjectXML.cc @@ -292,8 +292,8 @@ int ObjectXML::xpath(unsigned long long& value, const char * xpath_expr, int ObjectXML::xpath(time_t& value, const char * xpath_expr, const time_t& def) { - int int_val; - int int_def = static_cast(def); + unsigned long long int_val; + unsigned long long int_def = static_cast(def); int rc; rc = xpath(int_val, xpath_expr, int_def);