From 033b06e66a8e57747aada57ce15ca14dda295891 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 25 Sep 2013 11:21:20 +0200 Subject: [PATCH] Remove unused parameter. --- lib/db_ido/servicedbobject.cpp | 8 ++++---- lib/db_ido/servicedbobject.h | 2 +- lib/icinga/notification.cpp | 2 +- lib/icinga/service-notification.cpp | 2 +- lib/icinga/service.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/db_ido/servicedbobject.cpp b/lib/db_ido/servicedbobject.cpp index 814409eb8..521107973 100644 --- a/lib/db_ido/servicedbobject.cpp +++ b/lib/db_ido/servicedbobject.cpp @@ -49,7 +49,7 @@ void ServiceDbObject::StaticInitialize(void) /* History */ Service::OnAcknowledgementSet.connect(boost::bind(&ServiceDbObject::AddAcknowledgement, _1, _2, _3, _4, _5, _6)); - Service::OnNotificationSentToAllUsers.connect(bind(&ServiceDbObject::AddNotification, _1, _2, _3, _4, _5, _6, _7)); + Service::OnNotificationSentToAllUsers.connect(bind(&ServiceDbObject::AddNotification, _1, _2, _3, _4, _5, _6)); } ServiceDbObject::ServiceDbObject(const DbType::Ptr& type, const String& name1, const String& name2) @@ -786,7 +786,7 @@ void ServiceDbObject::AddAcknowledgement(const Service::Ptr& service, const Stri } void ServiceDbObject::AddNotification(const Service::Ptr& service, const std::set& users, NotificationType type, - const Dictionary::Ptr& cr, const String& author, const String& text, unsigned long notified_users) + const Dictionary::Ptr& cr, const String& author, const String& text) { Host::Ptr host = service->GetHost(); @@ -823,7 +823,7 @@ void ServiceDbObject::AddNotification(const Service::Ptr& service, const std::se } fields1->Set("escalated", 0); - fields1->Set("contacts_notified", notified_users); + fields1->Set("contacts_notified", users.size()); fields1->Set("instance_id", 0); /* DbConnection class fills in real ID */ query1.Fields = fields1; @@ -856,7 +856,7 @@ void ServiceDbObject::AddNotification(const Service::Ptr& service, const std::se } fields2->Set("escalated", 0); - fields2->Set("contacts_notified", notified_users); + fields2->Set("contacts_notified", users.size()); fields2->Set("instance_id", 0); /* DbConnection class fills in real ID */ query2.Fields = fields2; diff --git a/lib/db_ido/servicedbobject.h b/lib/db_ido/servicedbobject.h index 01d3c412e..204583a27 100644 --- a/lib/db_ido/servicedbobject.h +++ b/lib/db_ido/servicedbobject.h @@ -67,7 +67,7 @@ private: /* History */ static void AddAcknowledgement(const Service::Ptr& service, const String& author, const String& comment, AcknowledgementType type, double expiry, const String& authority); - static void AddNotification(const Service::Ptr& service, const std::set& users, NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text, unsigned long notified_users); + static void AddNotification(const Service::Ptr& service, const std::set& users, NotificationType type, const Dictionary::Ptr& cr, const String& author, const String& text); }; diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp index d227c1175..327c69f41 100644 --- a/lib/icinga/notification.cpp +++ b/lib/icinga/notification.cpp @@ -303,7 +303,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const Diction notified_users++; } - Service::OnNotificationSentToAllUsers(GetService(), allUsers, type, cr, author, text, notified_users); + Service::OnNotificationSentToAllUsers(GetService(), allUsers, type, cr, author, text); } void Notification::ExecuteNotificationHelper(NotificationType type, const User::Ptr& user, const Dictionary::Ptr& cr, bool force, const String& author, const String& text) diff --git a/lib/icinga/service-notification.cpp b/lib/icinga/service-notification.cpp index 0b91b0232..e7b67efa0 100644 --- a/lib/icinga/service-notification.cpp +++ b/lib/icinga/service-notification.cpp @@ -31,7 +31,7 @@ using namespace icinga; -boost::signals2::signal&, const NotificationType&, const Dictionary::Ptr&, const String&, const String&, unsigned long)> Service::OnNotificationSentToAllUsers; +boost::signals2::signal&, const NotificationType&, const Dictionary::Ptr&, const String&, const String&)> Service::OnNotificationSentToAllUsers; boost::signals2::signal Service::OnNotificationSentToUser; Dictionary::Ptr Service::GetNotificationDescriptions(void) const diff --git a/lib/icinga/service.h b/lib/icinga/service.h index 2bb1dbfbb..cfece1f24 100644 --- a/lib/icinga/service.h +++ b/lib/icinga/service.h @@ -240,7 +240,7 @@ public: static boost::signals2::signal OnNewCheckResult; static boost::signals2::signal OnNotificationsRequested; static boost::signals2::signal OnNotificationSentToUser; - static boost::signals2::signal&, const NotificationType&, const Dictionary::Ptr&, const String&, const String&, unsigned long)> OnNotificationSentToAllUsers; + static boost::signals2::signal&, const NotificationType&, const Dictionary::Ptr&, const String&, const String&)> OnNotificationSentToAllUsers; static boost::signals2::signal OnCommentAdded; static boost::signals2::signal OnCommentRemoved; static boost::signals2::signal OnDowntimeAdded; -- 2.40.0