# HG changeset patch # User Waqas Hussain # Date 1273231264 -18000 # Node ID 0c7beabfed5b5f118530aab3f752b13cee8f4aab # Parent 948d511f479cf0ecaf20ad11f457b64d4ccdda58# Parent e095d2a98936e8dc69a9eeb981521bf5d3758608 Merge 0.7->trunk diff -r 948d511f479c -r 0c7beabfed5b plugins/mod_console.lua --- 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+: ", ""); diff -r 948d511f479c -r 0c7beabfed5b plugins/mod_posix.lua --- 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 diff -r 948d511f479c -r 0c7beabfed5b prosody --- 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");