Software /
code /
prosody-modules
Changeset
451:f43d2d26c1c4
mod_seclabels: Fix config reloading
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 05 Oct 2011 23:54:33 +0200 |
parents | 450:fb152d4af082 |
children | 452:48b615229509 |
files | mod_seclabels/mod_seclabels.lua |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_seclabels/mod_seclabels.lua Wed Oct 05 21:03:51 2011 +0200 +++ b/mod_seclabels/mod_seclabels.lua Wed Oct 05 23:54:33 2011 +0200 @@ -21,12 +21,12 @@ }; }; local catalog_name, catalog_desc, labels; -function get_conf() +local function get_conf() catalog_name = module:get_option_string("security_catalog_name", "Default"); catalog_desc = module:get_option_string("security_catalog_desc", "My labels"); labels = module:get_option("security_labels", default_labels); end -module:hook("config-reloaded",get_conf); +module:hook_global("config-reloaded",get_conf); get_conf(); function handle_catalog_request(request) @@ -74,6 +74,14 @@ end end end + -- TODO query remote servers + --[[ FIXME later + labels = module:fire_event("sec-label-catalog", { + to = catalog_request.attr.to, + request = request; -- or just origin? + labels = labels; + }) or labels; + --]] add_labels(reply, labels, ""); request.origin.send(reply); return true;