Software /
code /
prosody
Changeset
4610:171051f9dd00
mod_c2s: Use module:add_item() to add the net-provider for portmanager
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 14 Mar 2012 21:42:08 +0000 |
parents | 4609:83a5377ffea2 |
children | 4611:8572373fa26f |
files | plugins/mod_c2s.lua plugins/s2s/mod_s2s.lua |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_c2s.lua Wed Mar 14 21:40:14 2012 +0000 +++ b/plugins/mod_c2s.lua Wed Mar 14 21:42:08 2012 +0000 @@ -220,13 +220,15 @@ sessions[conn] = session; end -portmanager.register_service("c2s", { +module:add_item("net-provider", { + name = "c2s"; listener = listener; default_port = 5222; encryption = "starttls"; }); -portmanager.register_service("legacy_ssl", { +module:add_item("net-provider", { + name = "legacy_ssl"; listener = listener; encryption = "ssl"; });
--- a/plugins/s2s/mod_s2s.lua Wed Mar 14 21:40:14 2012 +0000 +++ b/plugins/s2s/mod_s2s.lua Wed Mar 14 21:42:08 2012 +0000 @@ -467,7 +467,8 @@ s2sout.set_listener(listener); -require "core.portmanager".register_service("s2s", { +module:add_item("net-provider", { + name = "s2s"; listener = listener; default_port = 5269; encryption = "starttls";