Software /
code /
prosody
Changeset
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 |
parents | 6598:4b4852c4f96a |
children | 6600:b1c84d220c40 |
files | core/sessionmanager.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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);