Fix unused parameter, missing initialization.

This commit is contained in:
Michael Friedrich 2013-09-25 11:31:35 +02:00
parent 033b06e66a
commit 0b4c554711
3 changed files with 9 additions and 9 deletions

View 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();

View 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);
};

View 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();
}