From 3c4f63db5184de978e545dc0ed437ffbf0a98a30 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 22 Dec 2010 20:38:40 +0000 Subject: s2smanager: send_to_host(): Return false on failure, and true otherwise --- core/s2smanager.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/s2smanager.lua') diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 2f6c8478..7ba3f1d0 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -106,6 +106,7 @@ function send_to_host(from_host, to_host, data) 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 @@ function send_to_host(from_host, to_host, data) 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; -- cgit v1.2.3