equal
deleted
inserted
replaced
193 end |
193 end |
194 |
194 |
195 local cl = require "net.connlisteners"; |
195 local cl = require "net.connlisteners"; |
196 -- start listening on sockets |
196 -- start listening on sockets |
197 function net_activate_ports(option, listener, default, conntype) |
197 function net_activate_ports(option, listener, default, conntype) |
|
198 if not cl.get(listener) then return; end |
198 local ports = config.get("*", "core", option.."_ports") or default; |
199 local ports = config.get("*", "core", option.."_ports") or default; |
199 if type(ports) == "number" then ports = {ports} end; |
200 if type(ports) == "number" then ports = {ports} end; |
200 |
201 |
201 if type(ports) ~= "table" then |
202 if type(ports) ~= "table" then |
202 log("error", "core."..option.." is not a table"); |
203 log("error", "core."..option.." is not a table"); |