Sun, 10 Jan 2010 23:11:28 +0000
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 };