Software / code / prosody
Comparison
core/hostmanager.lua @ 2618:b8f6aa70d019
hostmanager: Small optimisation in checking whether a host is enabled
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 12 Feb 2010 12:47:23 +0000 |
| parent | 2617:0888bb4e817d |
| child | 2628:04958fb28c44 |
comparison
equal
deleted
inserted
replaced
| 2617:0888bb4e817d | 2618:b8f6aa70d019 |
|---|---|
| 33 local function load_enabled_hosts(config) | 33 local function load_enabled_hosts(config) |
| 34 local defined_hosts = config or configmanager.getconfig(); | 34 local defined_hosts = config or configmanager.getconfig(); |
| 35 local activated_any_host; | 35 local activated_any_host; |
| 36 | 36 |
| 37 for host, host_config in pairs(defined_hosts) do | 37 for host, host_config in pairs(defined_hosts) do |
| 38 if host ~= "*" and (host_config.core.enabled == nil or host_config.core.enabled) and not host_config.core.component_module then | 38 if host ~= "*" and host_config.core.enabled ~= false and not host_config.core.component_module then |
| 39 activated_any_host = true; | 39 activated_any_host = true; |
| 40 activate(host, host_config); | 40 activate(host, host_config); |
| 41 end | 41 end |
| 42 end | 42 end |
| 43 | 43 |