Software /
code /
prosody
Changeset
600:2255a2e84ddc
Automated merge with http://waqas.ath.cx:8000/
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 07 Dec 2008 19:18:50 +0000 |
parents | 599:30655c5cc531 (current diff) 598:2538912d94ba (diff) |
children | 601:6cb908ef01c8 |
files | |
diffstat | 5 files changed, 5 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/core/s2smanager.lua Mon Dec 08 00:18:01 2008 +0500 +++ b/core/s2smanager.lua Sun Dec 07 19:18:50 2008 +0000 @@ -43,7 +43,7 @@ local sha256_hash = require "util.hashes".sha256; -local dialback_secret = "This is very secret!!! Ha!"; +local dialback_secret = sha256_hash(tostring{} .. math.random() .. socket.gettime(), true); local dns = require "net.dns";
--- a/core/sessionmanager.lua Mon Dec 08 00:18:01 2008 +0500 +++ b/core/sessionmanager.lua Sun Dec 07 19:18:50 2008 +0000 @@ -69,7 +69,7 @@ local pres = st.presence{ type = "unavailable" }; if (not err) or err == "closed" then err = "connection closed"; end pres:tag("status"):text("Disconnected: "..err); - session.stanza_dispatch(pres); + session:dispatch_stanza(pres); end -- Remove session/resource from user's session list
--- a/net/xmppclient_listener.lua Mon Dec 08 00:18:01 2008 +0500 +++ b/net/xmppclient_listener.lua Sun Dec 07 19:18:50 2008 +0000 @@ -126,10 +126,7 @@ session_reset_stream(session); -- Initialise, ready for use - -- Debug version -- - --local function handleerr(err) print("Traceback:", err, debug.traceback()); end - --session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end - + session.stanza_dispatch = stream_callbacks.handlestanza; end if data then session.data(conn, data);
--- a/net/xmppserver_listener.lua Mon Dec 08 00:18:01 2008 +0500 +++ b/net/xmppserver_listener.lua Sun Dec 07 19:18:50 2008 +0000 @@ -129,9 +129,7 @@ session_reset_stream(session); -- Initialise, ready for use - -- Debug version -- --- local function handleerr(err) print("Traceback:", err, debug.traceback()); end --- session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end + session.stanza_dispatch = stream_callbacks.handlestanza; end if data then session.data(conn, data);
--- a/plugins/mod_posix.lua Mon Dec 08 00:18:01 2008 +0500 +++ b/plugins/mod_posix.lua Sun Dec 07 19:18:50 2008 +0000 @@ -35,15 +35,13 @@ log("info", "Daemonized to pid %d", ret); os.exit(0); else - log("info", "Successfully daemonized"); - if logwriter then local ok, ret = logger_set(logwriter); if not ok then log("error", "Couldn't set new log output: %s", ret); end end - + log("info", "Successfully daemonized"); end end module:add_event_hook("server-starting", daemonize_server);