From 4e7390dbf9737743951100238a77edcf3f22f1e1 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 7 May 2010 16:04:45 +0500 Subject: mod_posix: Fixed a global access. --- plugins/mod_posix.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index a5fd51ef..9155289d 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -79,6 +79,7 @@ local function write_pidfile() end pidfile = module:get_option("pidfile"); if pidfile then + local err; local mode = stat(pidfile) and "r+" or "w+"; pidfile_handle, err = io.open(pidfile, mode); if not pidfile_handle then -- cgit v1.2.3 From c43b31011fc3d488b33945f64c0362666ca96913 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 7 May 2010 16:10:04 +0500 Subject: mod_console: Set a chunk name for loadstring calls (nicer errors). --- plugins/mod_console.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index ab1d3453..a33302d9 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -84,9 +84,10 @@ function console_listener.listener(conn, data) session.env._ = data; - local chunk, err = loadstring("return "..data); + local chunkname = "=console"; + local chunk, err = loadstring("return "..data, chunkname); if not chunk then - chunk, err = loadstring(data); + chunk, err = loadstring(data, chunkname); if not chunk then err = err:gsub("^%[string .-%]:%d+: ", ""); err = err:gsub("^:%d+: ", ""); -- cgit v1.2.3