From 3a185902b7643636cf239b95e8b99028b5fd90dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 3 Aug 2018 15:44:48 +0300 Subject: [PATCH] MXS-1929: Implement filter destruction Now that the filters are fully reference counted, their destruction is trivially simple to implement. --- server/core/filter.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/core/filter.cc b/server/core/filter.cc index bf82f1d3e..bc7ecfefc 100644 --- a/server/core/filter.cc +++ b/server/core/filter.cc @@ -146,6 +146,7 @@ void filter_free(const SFilterDef& filter) // Removing the filter from the list will trigger deletion once it's no longer in use Guard guard(this_unit.lock); auto it = std::remove(this_unit.filters.begin(), this_unit.filters.end(), filter); + ss_dassert(it != this_unit.filters.end()); this_unit.filters.erase(it); } @@ -174,7 +175,7 @@ void filter_destroy(const SFilterDef& filter) { ss_dassert(filter); ss_dassert(filter_can_be_destroyed(filter)); - ss_info_dassert(!true, "Not yet implemented"); + filter_free(filter); } void filter_destroy_instances()