Changeset

7729:f8b81a82e8b6

prosody: Set session tables on the 'prosody' global first, then export them as globals
author Kim Alvefur <zash@zash.se>
date Sun, 20 Nov 2016 11:30:26 +0100
parents 7728:da54ad64f6da
children 7730:0656392b1685
files prosody
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/prosody	Sun Nov 20 11:15:10 2016 +0100
+++ b/prosody	Sun Nov 20 11:30:26 2016 +0100
@@ -212,14 +212,14 @@
 end
 
 function init_global_state()
+	prosody.bare_sessions = {};
+	prosody.full_sessions = {};
+	prosody.hosts = {};
+
 	-- COMPAT: These globals are deprecated
-	bare_sessions = {};
-	full_sessions = {};
-	hosts = {};
-
-	prosody.bare_sessions = bare_sessions;
-	prosody.full_sessions = full_sessions;
-	prosody.hosts = hosts;
+	bare_sessions = prosody.bare_sessions;
+	full_sessions = prosody.full_sessions;
+	hosts = prosody.hosts;
 	
 	local data_path = config.get("*", "data_path") or CFG_DATADIR or "data";
 	local custom_plugin_paths = config.get("*", "plugin_paths");