Software /
code /
prosody
Comparison
core/hostmanager.lua @ 1925:6897bd311afa
hostmanager: Only initialse SSL contexts if SSL library available
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 05 Oct 2009 22:15:32 +0100 |
parent | 1893:2d202336c9b6 |
child | 1974:cfac07d8428e |
comparison
equal
deleted
inserted
replaced
1924:75e6ba240888 | 1925:6897bd311afa |
---|---|
49 if option_name:match("_ports$") then | 49 if option_name:match("_ports$") then |
50 log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in global Host \"*\" instead", host, option_name); | 50 log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in global Host \"*\" instead", host, option_name); |
51 end | 51 end |
52 end | 52 end |
53 | 53 |
54 local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl"); | 54 if ssl then |
55 if ssl_config then | 55 local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl"); |
56 hosts[host].ssl_ctx = ssl.newcontext(setmetatable(ssl_config, { __index = default_ssl_ctx })); | 56 if ssl_config then |
57 hosts[host].ssl_ctx = ssl.newcontext(setmetatable(ssl_config, { __index = default_ssl_ctx })); | |
58 end | |
57 end | 59 end |
58 | 60 |
59 log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); | 61 log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host); |
60 eventmanager.fire_event("host-activated", host, host_config); | 62 eventmanager.fire_event("host-activated", host, host_config); |
61 end | 63 end |