]> granicus.if.org Git - icinga2/commitdiff
Fix unused parameter, missing initialization.
authorMichael Friedrich <michael.friedrich@netways.de>
Wed, 25 Sep 2013 09:31:35 +0000 (11:31 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 25 Sep 2013 09:31:35 +0000 (11:31 +0200)
lib/db_ido/servicedbobject.cpp
lib/db_ido/servicedbobject.h
lib/icinga/compatutility.cpp

index 52110797301239e264f784955b2458d7d97d4b66..f5d278849b16bdeca0d0b5a5028dd9c147954495 100644 (file)
@@ -48,7 +48,7 @@ void ServiceDbObject::StaticInitialize(void)
        Service::OnDowntimeTriggered.connect(boost::bind(&ServiceDbObject::TriggerDowntime, _1, _2));
 
        /* History */
-       Service::OnAcknowledgementSet.connect(boost::bind(&ServiceDbObject::AddAcknowledgement, _1, _2, _3, _4, _5, _6));
+       Service::OnAcknowledgementSet.connect(boost::bind(&ServiceDbObject::AddAcknowledgement, _1, _2, _3, _4, _5));
        Service::OnNotificationSentToAllUsers.connect(bind(&ServiceDbObject::AddNotification, _1, _2, _3, _4, _5, _6));
 }
 
@@ -729,7 +729,7 @@ void ServiceDbObject::TriggerDowntime(const Service::Ptr& service, const Diction
 }
 
 void ServiceDbObject::AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment,
-                                        AcknowledgementType type, double expiry, const String& authority)
+    AcknowledgementType type, double expiry)
 {
        Host::Ptr host = service->GetHost();
 
index 204583a27ae1470fffb937e82cdcf36a5227403a..c4ed15191d8f09c447fed2cbff4a2a12750c4ec9 100644 (file)
@@ -66,7 +66,7 @@ private:
        static void TriggerDowntime(const Service::Ptr& service, const Dictionary::Ptr& downtime);
 
         /* History */
-        static void AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment, AcknowledgementType type, double expiry, const String& authority);
+        static void AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment, AcknowledgementType type, double expiry);
         static void AddNotification(const Service::Ptr& service, const std::set<User::Ptr>& users, NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text);
 
 };
index e53c23fa95df94e7d4fd66cfec19703d21de54dc..103f8cf1f749601c88720191d70bac26fe1c80ae 100644 (file)
@@ -100,8 +100,8 @@ Dictionary::Ptr CompatUtility::GetHostConfigAttributes(const Host::Ptr& host)
        Service::Ptr service = host->GetCheckService();
 
        if (service) {
-               unsigned long notification_type_filter;
-               unsigned long notification_state_filter;
+               unsigned long notification_type_filter = 0;
+               unsigned long notification_state_filter = 0;
 
                ObjectLock olock(service);
 
@@ -308,8 +308,8 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se
 
        double notification_interval = -1;
        String notification_period;
-       unsigned long notification_type_filter;
-       unsigned long notification_state_filter;
+       unsigned long notification_type_filter = 0;
+       unsigned long notification_state_filter = 0;
 
        BOOST_FOREACH(const Notification::Ptr& notification, service->GetNotifications()) {
                if (notification_interval == -1 || notification->GetNotificationInterval() < notification_interval)
@@ -324,7 +324,7 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se
                if (notification->GetNotificationStateFilter())
                        notification_state_filter = notification->GetNotificationStateFilter();
 
-               Log(LogDebug, "compatutility", "notification_type_filter: " + Convert::ToString(notification_type_filter) + " notification_state_filter: " + Convert::ToString(notification_state_filter));
+               Log(LogDebug, "icinga", "notification_type_filter: " + Convert::ToString(notification_type_filter) + " notification_state_filter: " + Convert::ToString(notification_state_filter));
        }
 
 
@@ -454,7 +454,7 @@ Dictionary::Ptr CompatUtility::GetCustomVariableConfig(const DynamicObject::Ptr&
        } else if (object->GetType() == DynamicType::GetByName("User")) {
                custom = static_pointer_cast<User>(object)->GetCustom();
        } else {
-               Log(LogDebug, "compatutility", "unknown object type for custom vars");
+               Log(LogDebug, "icinga", "unknown object type for custom vars");
                return Dictionary::Ptr();
        }