diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-12-22 20:38:40 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-12-22 20:38:40 +0000 |
commit | abb088f7c4b9ab4371bc9eb22022a9e5a34e09cc (patch) | |
tree | c78f6fc8d6fe52167dc0240a828beecdb8f64b11 | |
parent | f050d463d41893bc552756723a937c05ff5988ed (diff) | |
download | prosody-abb088f7c4b9ab4371bc9eb22022a9e5a34e09cc.tar.gz prosody-abb088f7c4b9ab4371bc9eb22022a9e5a34e09cc.zip |
s2smanager: send_to_host(): Return false on failure, and true otherwise
-rw-r--r-- | core/s2smanager.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index c6e6df8e..4e6dba5b 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -105,6 +105,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 @@ -125,8 +126,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; |