Comparison

core/sessionmanager.lua @ 623:5af5a64a729f

Remove old debugging line from sessionmanager
author Matthew Wild <mwild1@gmail.com>
date Tue, 16 Dec 2008 02:30:24 +0000
parent 615:4ae3e81513f3
child 694:b97b05261156
comparison
equal deleted inserted replaced
622:96848cf7f28c 623:5af5a64a729f
111 function bind_resource(session, resource) 111 function bind_resource(session, resource)
112 if not session.username then return nil, "auth", "not-authorized", "Cannot bind resource before authentication"; end 112 if not session.username then return nil, "auth", "not-authorized", "Cannot bind resource before authentication"; end
113 if session.resource then return nil, "cancel", "already-bound", "Cannot bind multiple resources on a single connection"; end 113 if session.resource then return nil, "cancel", "already-bound", "Cannot bind multiple resources on a single connection"; end
114 -- We don't support binding multiple resources 114 -- We don't support binding multiple resources
115 115
116 session.conntimetotal = gettime()-session.conntime;
117
118 resource = resource or uuid_generate(); 116 resource = resource or uuid_generate();
119 --FIXME: Randomly-generated resources must be unique per-user, and never conflict with existing 117 --FIXME: Randomly-generated resources must be unique per-user, and never conflict with existing
120 118
121 if not hosts[session.host].sessions[session.username] then 119 if not hosts[session.host].sessions[session.username] then
122 hosts[session.host].sessions[session.username] = { sessions = {} }; 120 hosts[session.host].sessions[session.username] = { sessions = {} };