# HG changeset patch # User Matthew Wild # Date 1293050320 0 # Node ID 21391aa2d9bc1bc0bcd973b13b1db5bfcee23e5b # Parent 14239141764f35f52b9a2bdf2e147fbb7440be63 s2smanager: send_to_host(): Return false on failure, and true otherwise diff -r 14239141764f -r 21391aa2d9bc core/s2smanager.lua --- a/core/s2smanager.lua Wed Dec 22 17:23:55 2010 +0100 +++ b/core/s2smanager.lua Wed Dec 22 20:38:40 2010 +0000 @@ -106,6 +106,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 @@ -126,8 +127,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;