prosodyctl: Move definition of prosody singleton to prior to loading datamanager, and add platform

Sun, 10 Jan 2010 23:11:28 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 10 Jan 2010 23:11:28 +0000
changeset 2442
94c676b585c0
parent 2441
d72078946a16
child 2443
b335ae55af77

prosodyctl: Move definition of prosody singleton to prior to loading datamanager, and add platform

prosodyctl file | annotate | diff | comparison | revisions
--- a/prosodyctl	Sun Jan 10 22:43:28 2010 +0000
+++ b/prosodyctl	Sun Jan 10 23:11:28 2010 +0000
@@ -60,6 +60,8 @@
 	end
 end
 
+prosody = { hosts = {}, events = events, platform = "posix" };
+
 local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
 require "util.datamanager".set_data_path(data_path);
 
@@ -111,8 +113,7 @@
 
 local events = require "util.events".new();
 
-hosts = {};
-prosody = { hosts = hosts, events = events };
+hosts = prosody.hosts;
 
 for hostname, config in pairs(config.getconfig()) do
 	hosts[hostname] = { events = events };

mercurial