xmlhandlers: Don't restrict CDATA
[prosody.git] / core / hostmanager.lua
index f8d7400d65e2b01e96bed14cd1fe98d748b56636..c8928b27e3aaa6dfcb1575f84f65fe432e2e0f73 100644 (file)
@@ -1,6 +1,6 @@
 -- Prosody IM
--- Copyright (C) 2008-2009 Matthew Wild
--- Copyright (C) 2008-2009 Waqas Hussain
+-- Copyright (C) 2008-2010 Matthew Wild
+-- Copyright (C) 2008-2010 Waqas Hussain
 -- 
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
@@ -42,7 +42,7 @@ local function load_enabled_hosts(config)
        end
        
        if not activated_any_host then
-               log("error", "No hosts defined in the config file. This may cause unexpected behaviour as no modules will be loaded.");
+               log("error", "No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.");
        end
        
        eventmanager.fire_event("hosts-activated", defined_hosts);
@@ -60,13 +60,13 @@ function activate(host, host_config)
                        dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen();
                      };
        for option_name in pairs(host_config.core) do
-               if option_name:match("_ports$") then
-                       log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in global Host \"*\" instead", host, option_name);
+               if option_name:match("_ports$") or option_name:match("_interface$") then
+                       log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name);
                end
        end
        
-       hosts[host].ssl_ctx = certmanager.get_context(host, "client", host_config); -- for outgoing connections
-       hosts[host].ssl_ctx_in = certmanager.get_context(host, "server", host_config); -- for incoming connections
+       hosts[host].ssl_ctx = certmanager.create_context(host, "client", host_config); -- for outgoing connections
+       hosts[host].ssl_ctx_in = certmanager.create_context(host, "server", host_config); -- for incoming connections
        
        log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host);
        eventmanager.fire_event("host-activated", host, host_config);