Software /
code /
prosody
Changeset
3029:0c7beabfed5b
Merge 0.7->trunk
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 07 May 2010 16:21:04 +0500 |
parents | 3022:948d511f479c (current diff) 3028:e095d2a98936 (diff) |
children | 3030:2be7801474fb |
files | plugins/mod_posix.lua prosody |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_console.lua Fri May 07 07:18:09 2010 +0500 +++ b/plugins/mod_console.lua Fri May 07 16:21:04 2010 +0500 @@ -58,6 +58,7 @@ local session = console:new_session(conn); sessions[conn] = session; printbanner(session); + session.send(string.char(0)); end function console_listener.onincoming(conn, data) @@ -84,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 07:18:09 2010 +0500 +++ b/plugins/mod_posix.lua Fri May 07 16:21:04 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
--- a/prosody Fri May 07 07:18:09 2010 +0500 +++ b/prosody Fri May 07 16:21:04 2010 +0500 @@ -144,6 +144,10 @@ debug.setupvalue(f, i, value); end end + function mt.__tostring(f) + local info = debug.getinfo(f); + return ("function(%s:%d)"):format(info.short_src:match("[^\\/]*$"), info.linedefined); + end debug.setmetatable(function() end, mt); end @@ -324,7 +328,7 @@ end function prepare_to_start() - log("info", "Prosody is using the %s backend for connection handling", server.get_backend()); + log("debug", "Prosody is using the %s backend for connection handling", server.get_backend()); -- Signal to modules that we are ready to start prosody.events.fire_event("server-starting");