Module: check_mk
Branch: master
Commit: 2c7f7cd78cb14aa8ef3d3ca6f9ed5e051dd3e490
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2c7f7cd78cb14a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 22 15:52:16 2010 +0100
Livestatus: do not use is_contact_member_of_contactgroup anymore
---
.bugs/6 | 10 +++++++---
ChangeLog | 2 ++
livestatus/src/ContactgroupsMemberColumn.cc | 9 +++++++--
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/.bugs/6 b/.bugs/6
index 08f6291..e6619fb 100644
--- a/.bugs/6
+++ b/.bugs/6
@@ -1,12 +1,16 @@
Title: is_contact_member_of_contactgroup selbst programmieren
Component: livestatus
+State: done
+Class: todo
+Date: 2010-12-21 10:55:19
Benefit: 5
-State: open
Cost: 2
-Date: 2010-12-21 10:55:19
-Class: todo
+Fun: 0
Diese Funktion ist im CVS schon weg und sehr leicht
selbst zu programmieren. Sollte man bald mal machen,
damit ein stabiles Livestatus schon bereit ist, wenn
das neue Nagios kommt.
+
+2010-12-22 15:51:55: changed state open -> done
+Ist umgesetzt. Sollte jetzt funktionieren.
diff --git a/ChangeLog b/ChangeLog
index f47fa0b..5715a30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,8 @@
column to work you need to specify the base directory of the PNP graphs
with the module option pnp_path=, e.g.
pnp_path=/omd/sites/wato/var/pnp4nagios/perfdata
* Allow more than one column for StatsGroupBy:
+ * Do not use function is_contact_member_of_contactgroup anymore (get compatible
+ with Nagios CVS)
1.1.9i2:
Checks & Agents:
diff --git a/livestatus/src/ContactgroupsMemberColumn.cc
b/livestatus/src/ContactgroupsMemberColumn.cc
index d26b8ee..3811671 100644
--- a/livestatus/src/ContactgroupsMemberColumn.cc
+++ b/livestatus/src/ContactgroupsMemberColumn.cc
@@ -28,6 +28,11 @@
bool ContactgroupsMemberColumn::isNagiosMember(void *cg, void *ctc)
{
- return is_contact_member_of_contactgroup((contactgroup *)cg, (contact *)ctc);
+ contactsmember *mem;
+ for (mem = ((contactgroup *)cg)->members; mem != NULL; mem = mem->next)
+ {
+ if (mem->contact_ptr == ctc)
+ return true;
+ }
+ return false;
}
-