Software /
code /
prosody
Diff
core/sessionmanager.lua @ 6599:f93e1b2ec327
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.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 24 Mar 2015 15:57:46 +0000 |
parent | 5459:3a821511b9ec |
child | 6602:61b6a4fc65f1 |
child | 7495:caee8a32983a |
line wrap: on
line diff
--- a/core/sessionmanager.lua Mon Mar 23 18:45:02 2015 +0100 +++ b/core/sessionmanager.lua Tue Mar 24 15:57:46 2015 +0000 @@ -113,7 +113,7 @@ -- 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);