Merge 0.6->0.7

Fri, 07 May 2010 16:17:48 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 07 May 2010 16:17:48 +0500
changeset 3028
e095d2a98936
parent 3025
f1e1b7629807 (current diff)
parent 3027
b5beb7b15ac4 (diff)
child 3029
0c7beabfed5b
child 3044
a6f89c72d305

Merge 0.6->0.7

plugins/mod_console.lua file | annotate | diff | comparison | revisions
plugins/mod_posix.lua file | annotate | diff | comparison | revisions
--- 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

mercurial