mod_seclabels: Remove config-reloaded hook. Just reload the module to update
authorKim Alvefur <zash@zash.se>
Mon, 25 Mar 2013 00:55:29 +0100
changeset 937 5276e1fc26b6
parent 936 7236cdec3ea1
child 938 d0e71a3bd2c4
mod_seclabels: Remove config-reloaded hook. Just reload the module to update
mod_seclabels/mod_seclabels.lua
--- a/mod_seclabels/mod_seclabels.lua	Mon Mar 25 00:44:54 2013 +0100
+++ b/mod_seclabels/mod_seclabels.lua	Mon Mar 25 00:55:29 2013 +0100
@@ -25,14 +25,9 @@
 		PUBLIC = { label = "THISISPUBLIC" };
 	};
 };
-local catalog_name, catalog_desc, labels;
-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_global("config-reloaded",get_conf);
-get_conf();
+local catalog_name = module:get_option_string("security_catalog_name", "Default");
+local catalog_desc = module:get_option_string("security_catalog_desc", "My labels");
+local labels = module:get_option("security_labels", default_labels);
 
 function handle_catalog_request(request)
 	local catalog_request = request.stanza.tags[1];