Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
centreon
centreon-collect
Commits
e79c7861
Commit
e79c7861
authored
Jun 10, 2020
by
David Boucher
Browse files
fix(config/applier/host): When a host is disabled, so on for its services
parent
4c4d5463
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cce_core/configuration/applier/host.cc
View file @
e79c7861
...
...
@@ -18,7 +18,9 @@
*/
#include
"com/centreon/engine/configuration/applier/host.hh"
#include
<algorithm>
#include
"com/centreon/engine/broker.hh"
#include
"com/centreon/engine/common.hh"
#include
"com/centreon/engine/config.hh"
...
...
@@ -426,12 +428,19 @@ void applier::host::remove_object(configuration::host const& obj) {
// Remove events related to this host.
applier
::
scheduler
::
instance
().
remove_host
(
obj
.
key
());
//remove host from hostgroup->members
for
(
auto
&
it_h
:
it
->
second
->
get_parent_groups
())
//
remove host from hostgroup->members
for
(
auto
&
it_h
:
it
->
second
->
get_parent_groups
())
it_h
->
members
.
erase
(
it
->
second
->
get_name
());
// Notify event broker.
timeval
tv
(
get_broker_timestamp
(
nullptr
));
for
(
auto
it_s
=
it
->
second
->
services
.
begin
();
it_s
!=
it
->
second
->
services
.
end
();
++
it_s
)
broker_adaptive_service_data
(
NEBTYPE_SERVICE_DELETE
,
NEBFLAG_NONE
,
NEBATTR_NONE
,
it_s
->
second
,
CMD_NONE
,
MODATTR_ALL
,
MODATTR_ALL
,
&
tv
);
broker_adaptive_host_data
(
NEBTYPE_HOST_DELETE
,
NEBFLAG_NONE
,
NEBATTR_NONE
,
it
->
second
.
get
(),
CMD_NONE
,
MODATTR_ALL
,
MODATTR_ALL
,
&
tv
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment