From e589e89a2ca8ccd72292999e3e656ad18a9c5d55 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 20 Jul 2019 17:01:34 -0700 Subject: [PATCH] modules/m_fetch: Fix interface implementations. --- modules/m_fetch.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/m_fetch.cc b/modules/m_fetch.cc index 9fb89b08a..1ab25f8de 100644 --- a/modules/m_fetch.cc +++ b/modules/m_fetch.cc @@ -622,14 +622,14 @@ size_t IRCD_MODULE_EXPORT ircd::m::fetch::count() { - size_t ret(0); - for_each([&ret](const auto &request) - { - ++ret; - return true; - }); + return requests.size(); +} - return ret; +bool +IRCD_MODULE_EXPORT +ircd::m::fetch::exists(const m::event::id &event_id) +{ + return requests.count(string_view{event_id}); } bool