Software /
code /
prosody
Comparison
core/s2smanager.lua @ 4458:9f6c68cb3fbd
s2smanager: Don't throw an error when the "interface" config option is a string (which it is by default).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 14 Dec 2011 06:46:24 +0500 |
parent | 4455:447234173e9e |
child | 4461:a81d045e7d16 |
comparison
equal
deleted
inserted
replaced
4457:332a5d73e5b6 | 4458:9f6c68cb3fbd |
---|---|
317 local has_other = false; | 317 local has_other = false; |
318 | 318 |
319 if not sources then | 319 if not sources then |
320 sources = {}; | 320 sources = {}; |
321 local cfg_sources = config.get("*", "core", "interface") or connlisteners_get("xmppserver").default_interface; | 321 local cfg_sources = config.get("*", "core", "interface") or connlisteners_get("xmppserver").default_interface; |
322 if type(cfg_sources) == "string" then | |
323 cfg_sources = { cfg_sources }; | |
324 end | |
322 for i, source in ipairs(cfg_sources) do | 325 for i, source in ipairs(cfg_sources) do |
323 if source == "*" then | 326 if source == "*" then |
324 sources[i] = new_ip("0.0.0.0", "IPv4"); | 327 sources[i] = new_ip("0.0.0.0", "IPv4"); |
325 else | 328 else |
326 sources[i] = new_ip(source, (source:find(":") and "IPv6") or "IPv4"); | 329 sources[i] = new_ip(source, (source:find(":") and "IPv6") or "IPv4"); |