Changeset

7181:8af558965da3

util.session: Fix luacheck warnings
author Kim Alvefur <zash@zash.se>
date Mon, 22 Feb 2016 17:32:11 +0100
parents 7180:0d7f80263813
children 7182:858ccafbd823
files util/session.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/util/session.lua	Mon Feb 22 17:30:12 2016 +0100
+++ b/util/session.lua	Mon Feb 22 17:32:11 2016 +0100
@@ -9,13 +9,13 @@
 end
 
 local function set_id(session)
-	local id = typ .. tostring(session):match("%x+$"):lower();
+	local id = session.type .. tostring(session):match("%x+$"):lower();
 	session.id = id;
 	return session;
 end
 
 local function set_logger(session)
-	local log = logger.init(id);
+	local log = logger.init(session.id);
 	session.log = log;
 	return session;
 end
@@ -30,7 +30,7 @@
 	local conn = session.conn;
 	if not conn then
 		function session.send(data)
-			log("debug", "Discarding data sent to unconnected session: %s", tostring(data));
+			session.log("debug", "Discarding data sent to unconnected session: %s", tostring(data));
 			return false;
 		end
 		return session;