From c6a1139e788355e82238eba92dc3c3bcae4e62cf Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 21 Sep 2010 17:37:11 +0500 Subject: net.xmppcomponent_listener, mod_component: Removed useless undocumented option 'component_address'. --- net/xmppcomponent_listener.lua | 5 +---- plugins/mod_component.lua | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua index 5532186b..2cba2c32 100644 --- a/net/xmppcomponent_listener.lua +++ b/net/xmppcomponent_listener.lua @@ -73,13 +73,10 @@ function stream_callbacks.streamopened(session, attr) return; end - -- Store the original host (this is used for config, etc.) - session.user = attr.to; - -- Set the host for future reference - session.host = config.get(attr.to, "core", "component_address") or attr.to; -- Note that we don't create the internal component -- until after the external component auths successfully + session.host = attr.to; session.streamid = uuid_gen(); session.notopen = nil; diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua index 03331743..7c7e58c4 100644 --- a/plugins/mod_component.lua +++ b/plugins/mod_component.lua @@ -31,9 +31,9 @@ function handle_component_auth(session, stanza) return; end - local secret = config.get(session.user, "core", "component_secret"); + local secret = config.get(session.host, "core", "component_secret"); if not secret then - (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.user); + (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host); session:close("not-authorized"); return; end -- cgit v1.2.3