X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd_acl.cpp;fp=src%2Fmodules%2Fm_httpd_acl.cpp;h=49710c2194dd645cf5aac419dcde43a0774ed026;hb=4fbd6681fedbff9b4cb04cc774f785cbe8b5c35b;hp=2dbc1be69c9d510f7bb17dc5da454a126b18fe41;hpb=bf0bf05ac07a4bd0afeba5a276ef86308f0f9e54;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index 2dbc1be69..49710c219 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -51,7 +51,7 @@ class ModuleHTTPAccessList : public Module, public HTTPACLEventListener void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { - acl_list.clear(); + std::vector new_acls; ConfigTagList acls = ServerInstance->Config->ConfTags("httpdacl"); for (ConfigIter i = acls.first; i != acls.second; i++) { @@ -89,8 +89,9 @@ class ModuleHTTPAccessList : public Module, public HTTPACLEventListener ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Read ACL: path=%s pass=%s whitelist=%s blacklist=%s", path.c_str(), password.c_str(), whitelist.c_str(), blacklist.c_str()); - acl_list.push_back(HTTPACL(path, username, password, whitelist, blacklist)); + new_acls.push_back(HTTPACL(path, username, password, whitelist, blacklist)); } + acl_list.swap(new_acls); } void BlockAccess(HTTPRequest* http, unsigned int returnval, const std::string &extraheaderkey = "", const std::string &extraheaderval="")