From 0be0fe9e821569a865405e15fa66633ffe2aeefe Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 3 Mar 2020 17:45:58 -0800 Subject: [PATCH] modules/federation: Fix conf item shared between invite and invite2. --- modules/federation/invite.cc | 1 + modules/federation/invite2.cc | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/federation/invite.cc b/modules/federation/invite.cc index a4386b0cd..77a8e7843 100644 --- a/modules/federation/invite.cc +++ b/modules/federation/invite.cc @@ -52,6 +52,7 @@ method_put }; conf::item +IRCD_MODULE_EXPORT_DATA stream_cross_sleeptime { { "name", "ircd.federation.invite.stream_cross_sleeptime" }, diff --git a/modules/federation/invite2.cc b/modules/federation/invite2.cc index f2974afaf..e961799dd 100644 --- a/modules/federation/invite2.cc +++ b/modules/federation/invite2.cc @@ -10,6 +10,10 @@ using namespace ircd; +// federation_invite (weak) +extern conf::item +stream_cross_sleeptime; + static void process(client &, const m::resource::request &, @@ -44,12 +48,6 @@ method_put } }; -mods::import> -stream_cross_sleeptime -{ - "federation_invite", "stream_cross_sleeptime" -}; - m::resource::response put__invite(client &client, const m::resource::request &request) @@ -211,7 +209,7 @@ put__invite(client &client, // Synapse needs time to process our response otherwise our eval below may // complete before this response arrives for them and is processed. - ctx::sleep(milliseconds(*stream_cross_sleeptime)); + ctx::sleep(milliseconds(stream_cross_sleeptime)); // Post processing, does not throw. process(client, request, signed_event);