Mercurial > prosody-hg
comparison plugins/mod_proxy65.lua @ 4729:da3c1d980c04
mod_proxy65: Fix traceback when proxy65 service fails to bind a port
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 27 Apr 2012 22:18:20 +0100 |
| parents | 3d90264c7b3d |
| children | 31496e8227e8 |
comparison
equal
deleted
inserted
replaced
| 4728:7c81b04a4fed | 4729:da3c1d980c04 |
|---|---|
| 89 | 89 |
| 90 function module.add_host(module) | 90 function module.add_host(module) |
| 91 local host, name = module:get_host(), module:get_option_string("name", "SOCKS5 Bytestreams Service"); | 91 local host, name = module:get_host(), module:get_option_string("name", "SOCKS5 Bytestreams Service"); |
| 92 | 92 |
| 93 local proxy_address = module:get_option("proxy65_address", host); | 93 local proxy_address = module:get_option("proxy65_address", host); |
| 94 local proxy_port = module:get_option_number("proxy65_port", next(portmanager.get_active_services():search("proxy65", nil)[1])); | 94 local proxy_port = module:get_option_number("proxy65_port", next(portmanager.get_active_services():search("proxy65", nil)[1] or {})); |
| 95 local proxy_acl = module:get_option("proxy65_acl"); | 95 local proxy_acl = module:get_option("proxy65_acl"); |
| 96 | 96 |
| 97 module:add_identity("proxy", "bytestreams", name); | 97 module:add_identity("proxy", "bytestreams", name); |
| 98 module:add_feature("http://jabber.org/protocol/bytestreams"); | 98 module:add_feature("http://jabber.org/protocol/bytestreams"); |
| 99 | 99 |
