# HG changeset patch # User Matthew Wild # Date 1256041529 -3600 # Node ID a3bf6cb1275272881a3575e127658683246d4539 # Parent 9cbf4e8cb0ed07b03d9b17d67fac86df51a0a667 prosody: Use rawget to test for the existence of ssl (LuaSec) so we don't look for a nil global diff -r 9cbf4e8cb0ed -r a3bf6cb12752 prosody --- a/prosody Mon Oct 19 21:08:40 2009 +0100 +++ b/prosody Tue Oct 20 13:25:29 2009 +0100 @@ -202,7 +202,7 @@ prosody.events.fire_event("server-starting"); -- Load SSL settings from config, and create a ctx table - local global_ssl_ctx = ssl and config.get("*", "core", "ssl"); + local global_ssl_ctx = rawget(_G, "ssl") and 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 });