Software / code / prosody
Comparison
prosodyctl @ 8917:d4c98115e00c
prosodyctl: check: Replace loaded-module calculation with a more accurate query to modulemanager, fixes #1171
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 20 Jun 2018 10:42:57 +0100 |
| parent | 8882:a420b386a72a |
| child | 8923:ddd98e262519 |
comparison
equal
deleted
inserted
replaced
| 8916:e727747279a0 | 8917:d4c98115e00c |
|---|---|
| 1077 if target_hosts:contains("localhost") then | 1077 if target_hosts:contains("localhost") then |
| 1078 print(" Target 'localhost' cannot be accessed from other servers"); | 1078 print(" Target 'localhost' cannot be accessed from other servers"); |
| 1079 target_hosts:remove("localhost"); | 1079 target_hosts:remove("localhost"); |
| 1080 end | 1080 end |
| 1081 | 1081 |
| 1082 local modules = set.new(it.to_array(it.values(host_options.modules_enabled or {}))) | 1082 local modules, component_module = modulemanager.get_modules_for_host(host); |
| 1083 + set.new(it.to_array(it.values(configmanager.get("*", "modules_enabled") or {}))) | 1083 |
| 1084 + set.new({ configmanager.get(host, "component_module") }); | 1084 if component_module then |
| 1085 modules:add(component_module); | |
| 1086 end | |
| 1085 | 1087 |
| 1086 if modules:contains("proxy65") then | 1088 if modules:contains("proxy65") then |
| 1087 local proxy65_target = configmanager.get(host, "proxy65_address") or host; | 1089 local proxy65_target = configmanager.get(host, "proxy65_address") or host; |
| 1088 local A, AAAA = dns.lookup(idna.to_ascii(proxy65_target), "A"), dns.lookup(idna.to_ascii(proxy65_target), "AAAA"); | 1090 local A, AAAA = dns.lookup(idna.to_ascii(proxy65_target), "A"), dns.lookup(idna.to_ascii(proxy65_target), "AAAA"); |
| 1089 local prob = {}; | 1091 local prob = {}; |