# HG changeset patch # User Matthew Wild # Date 1427212666 0 # Node ID f93e1b2ec327253bb289a0e8f88a322b1ad8d520 # Parent 4b4852c4f96a6e48a58a5d0db9a1451bb3146280 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. diff -r 4b4852c4f96a -r f93e1b2ec327 core/sessionmanager.lua --- 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);