aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-22 20:38:40 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-22 20:38:40 +0000
commit3c4f63db5184de978e545dc0ed437ffbf0a98a30 (patch)
tree17067aa8d9cd7771e4f24cd4cbd5731d6f707a52 /core
parentdd1c339b8dbe7d989b8df838e42377b85bc92bfc (diff)
downloadprosody-3c4f63db5184de978e545dc0ed437ffbf0a98a30.tar.gz
prosody-3c4f63db5184de978e545dc0ed437ffbf0a98a30.zip
s2smanager: send_to_host(): Return false on failure, and true otherwise
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua3
1 files changed, 3 insertions, 0 deletions
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;