aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-03-24 15:57:46 +0000
committerMatthew Wild <mwild1@gmail.com>2015-03-24 15:57:46 +0000
commita5e6058fdad58e1dcd564fa04d4d5128a6dbc30c (patch)
treedc9c77de541285f53f494e637de8fbc677ce9977 /core
parent0e041ac943e80bece48ed5cb5788e201ca4de98a (diff)
downloadprosody-a5e6058fdad58e1dcd564fa04d4d5128a6dbc30c.tar.gz
prosody-a5e6058fdad58e1dcd564fa04d4d5128a6dbc30c.zip
sessionmanager: Return 'not-allowed' error instead of the non-existent 'already-bound' error when client tries to bind a resource twice on the same stream (thanks Flow) fixes issue #484.
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 98ead07f..4b014d18 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -113,7 +113,7 @@ end
-- returns nil, err_type, err, err_message on failure
function bind_resource(session, resource)
if not session.username then return nil, "auth", "not-authorized", "Cannot bind resource before authentication"; end
- if session.resource then return nil, "cancel", "already-bound", "Cannot bind multiple resources on a single connection"; end
+ if session.resource then return nil, "cancel", "not-allowed", "Cannot bind multiple resources on a single connection"; end
-- We don't support binding multiple resources
resource = resourceprep(resource);