Software /
code /
prosody
Comparison
net/connlisteners.lua @ 380:2b22b8eee939
Small fix for connlisteners to accept nil for userdata
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 23 Nov 2008 04:53:12 +0000 |
parent | 145:fbb3a4ff9cf1 |
child | 467:66f145f5c932 |
comparison
equal
deleted
inserted
replaced
379:c5617678cd7b | 380:2b22b8eee939 |
---|---|
36 local h = get(name); | 36 local h = get(name); |
37 if not h then | 37 if not h then |
38 error("No such connection module: "..name, 0); | 38 error("No such connection module: "..name, 0); |
39 end | 39 end |
40 return server_add(h, | 40 return server_add(h, |
41 udata.port or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0), | 41 (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0), |
42 udata.interface or "*", udata.mode or h.default_mode or 1, udata.ssl ); | 42 (udata and udata.interface) or "*", (udata and udata.mode) or h.default_mode or 1, (udata and udata.ssl) or nil ); |
43 end | 43 end |
44 | 44 |
45 return _M; | 45 return _M; |