aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-09-21 17:37:11 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-09-21 17:37:11 +0500
commitc6a1139e788355e82238eba92dc3c3bcae4e62cf (patch)
treefa10ec5c62e39cf46aeb0a9c2ede026801e18b2a
parent076aadf990ce6e3c48ec0e6f545fac2a3167d0d9 (diff)
downloadprosody-c6a1139e788355e82238eba92dc3c3bcae4e62cf.tar.gz
prosody-c6a1139e788355e82238eba92dc3c3bcae4e62cf.zip
net.xmppcomponent_listener, mod_component: Removed useless undocumented option 'component_address'.
-rw-r--r--net/xmppcomponent_listener.lua5
-rw-r--r--plugins/mod_component.lua4
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