Software /
code /
prosody
Comparison
core/s2smanager.lua @ 4431:bbede0141f7e
s2smanager: Use config over xmppserver's default interface
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 28 Nov 2011 14:30:12 +0000 |
parent | 4422:c25dee24623f |
child | 4443:7456ddcc0b14 |
comparison
equal
deleted
inserted
replaced
4430:607de4c95129 | 4431:bbede0141f7e |
---|---|
317 local handle4, handle6; | 317 local handle4, handle6; |
318 local has_other = false; | 318 local has_other = false; |
319 | 319 |
320 if not sources then | 320 if not sources then |
321 sources = {}; | 321 sources = {}; |
322 local cfg_sources = connlisteners_get("xmppserver").default_interface or config.get("*", "core", "interface"); | 322 local cfg_sources = config.get("*", "core", "interface") or connlisteners_get("xmppserver").default_interface; |
323 for i, source in ipairs(cfg_sources) do | 323 for i, source in ipairs(cfg_sources) do |
324 if source == "*" then | 324 if source == "*" then |
325 sources[i] = new_ip("0.0.0.0", "IPv4"); | 325 sources[i] = new_ip("0.0.0.0", "IPv4"); |
326 else | 326 else |
327 sources[i] = new_ip(source, (source:find(":") and "IPv6") or "IPv4"); | 327 sources[i] = new_ip(source, (source:find(":") and "IPv6") or "IPv4"); |