From dcc0aae886ffe1c3394d41df666e37210dfe2807 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 8 Mar 2020 14:29:22 -0700 Subject: [PATCH] ircd::m::homeserver: Run conf item update callbacks at construction for now. --- matrix/homeserver.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/matrix/homeserver.cc b/matrix/homeserver.cc index f36bfa348..ad12f808a 100644 --- a/matrix/homeserver.cc +++ b/matrix/homeserver.cc @@ -467,6 +467,23 @@ ircd::m::homeserver::conf::conf(const struct opts &opts) } } { + for(const auto &[key, item] : ircd::conf::items) try + { + assert(item); + if(item->set_cb) + item->set_cb(); + } + catch(const std::exception &e) + { + log::error + { + "Failed to initialize conf item '%s' :%s", + key, + e.what() + }; + + throw; + } } size_t