Changeset

2442:94c676b585c0

prosodyctl: Move definition of prosody singleton to prior to loading datamanager, and add platform
author Matthew Wild <mwild1@gmail.com>
date Sun, 10 Jan 2010 23:11:28 +0000
parents 2441:d72078946a16
children 2443:b335ae55af77
files prosodyctl
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 };