sessionmanager: Return 'not-allowed' error instead of the non-existent 'already-bound...
authorMatthew Wild <mwild1@gmail.com>
Tue, 24 Mar 2015 15:57:46 +0000 (15:57 +0000)
committerMatthew Wild <mwild1@gmail.com>
Tue, 24 Mar 2015 15:57:46 +0000 (15:57 +0000)
core/sessionmanager.lua

index 98ead07fdb2dd50e2172403c6eeec8742db4be0f..4b014d18cd5aea4002bbee1e67985291e709a0bb 100644 (file)
@@ -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);