aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-30 20:04:11 +0100
committerMatthew Wild <mwild1@gmail.com>2009-03-30 20:04:11 +0100
commit27d6ab1bf5447e6765896cea787a47d7312e780c (patch)
tree48c5c4d465de7be3fd932983b5d7d7648ee3519a /prosody
parentcb2b5ec86f2949720c642a729cdc292a255811c0 (diff)
downloadprosody-27d6ab1bf5447e6765896cea787a47d7312e780c.tar.gz
prosody-27d6ab1bf5447e6765896cea787a47d7312e780c.zip
Move SSL initialisation into the correct spot (thanks albert)
Diffstat (limited to 'prosody')
-rwxr-xr-xprosody12
1 files changed, 5 insertions, 7 deletions
diff --git a/prosody b/prosody
index 06ea5837..59ff904f 100755
--- a/prosody
+++ b/prosody
@@ -107,9 +107,13 @@ require "util.datamanager".set_data_path(data_path);
----------- End of out-of-place code --------------
-
eventmanager.fire_event("server-starting");
+local global_ssl_ctx = config.get("*", "core", "ssl");
+if global_ssl_ctx then
+ local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; };
+ setmetatable(global_ssl_ctx, { __index = default_ssl_ctx });
+end
-- start listening on sockets
function net_activate_ports(option, listener, default, conntype)
@@ -144,12 +148,6 @@ end
-- setup error handling
setmetatable(_G, { __index = function (t, k) error("Attempt to read a non-existent global '"..k.."'", 2); end, __newindex = function (t, k, v) error("Attempt to set a global: "..tostring(k).." = "..tostring(v), 2); end });
-local global_ssl_ctx = config.get("*", "core", "ssl");
-if global_ssl_ctx then
- local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none"; };
- setmetatable(global_ssl_ctx, { __index = default_ssl_ctx });
-end
-
eventmanager.fire_event("server-started");
local quitting;