Changeset

3028:e095d2a98936

Merge 0.6->0.7
author Waqas Hussain <waqas20@gmail.com>
date Fri, 07 May 2010 16:17:48 +0500
parents 3025:f1e1b7629807 (current diff) 3027:b5beb7b15ac4 (diff)
children 3029:0c7beabfed5b 3044:a6f89c72d305
files plugins/mod_console.lua plugins/mod_posix.lua
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_console.lua	Fri May 07 16:13:05 2010 +0500
+++ b/plugins/mod_console.lua	Fri May 07 16:17:48 2010 +0500
@@ -85,9 +85,10 @@
 
 		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+: ", "");
--- a/plugins/mod_posix.lua	Fri May 07 16:13:05 2010 +0500
+++ b/plugins/mod_posix.lua	Fri May 07 16:17:48 2010 +0500
@@ -82,6 +82,7 @@
 	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