mirror of
https://github.com/bjc/prosody.git
synced 2025-04-06 22:57:38 +03:00
Merge 0.6->0.7
This commit is contained in:
commit
cfb093a9f4
2 changed files with 4 additions and 2 deletions
|
@ -85,9 +85,10 @@ function console_listener.onincoming(conn, data)
|
||||||
|
|
||||||
session.env._ = data;
|
session.env._ = data;
|
||||||
|
|
||||||
local chunk, err = loadstring("return "..data);
|
local chunkname = "=console";
|
||||||
|
local chunk, err = loadstring("return "..data, chunkname);
|
||||||
if not chunk then
|
if not chunk then
|
||||||
chunk, err = loadstring(data);
|
chunk, err = loadstring(data, chunkname);
|
||||||
if not chunk then
|
if not chunk then
|
||||||
err = err:gsub("^%[string .-%]:%d+: ", "");
|
err = err:gsub("^%[string .-%]:%d+: ", "");
|
||||||
err = err:gsub("^:%d+: ", "");
|
err = err:gsub("^:%d+: ", "");
|
||||||
|
|
|
@ -82,6 +82,7 @@ local function write_pidfile()
|
||||||
end
|
end
|
||||||
pidfile = module:get_option("pidfile");
|
pidfile = module:get_option("pidfile");
|
||||||
if pidfile then
|
if pidfile then
|
||||||
|
local err;
|
||||||
local mode = stat(pidfile) and "r+" or "w+";
|
local mode = stat(pidfile) and "r+" or "w+";
|
||||||
pidfile_handle, err = io.open(pidfile, mode);
|
pidfile_handle, err = io.open(pidfile, mode);
|
||||||
if not pidfile_handle then
|
if not pidfile_handle then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue