# HG changeset patch # User Matthew Wild <mwild1@gmail.com> # Date 1293050320 0 # Node ID 0e927d4644c32dae8078b1e3355650df95d94d2e # Parent a35fa3368626cc167e2152af834bea7b3e55c26f s2smanager: send_to_host(): Return false on failure, and true otherwise diff -r a35fa3368626 -r 0e927d4644c3 core/s2smanager.lua --- a/core/s2smanager.lua Wed Dec 22 16:46:19 2010 +0000 +++ b/core/s2smanager.lua Wed Dec 22 20:38:40 2010 +0000 @@ -105,6 +105,7 @@ log("error", "Trying to send a stanza to ourselves??") log("error", "Traceback: %s", get_traceback()); log("error", "Stanza: %s", tostring(data)); + return false; else (host.log or log)("debug", "going to send stanza to "..to_host.." from "..from_host); -- FIXME @@ -125,8 +126,10 @@ if (not host_session.connecting) and (not host_session.conn) then log("warn", "Connection to %s failed already, destroying session...", to_host); destroy_session(host_session); + return false; end end + return true; end local open_sessions = 0;