aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_dialback.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2008-11-23 20:44:48 +0100
committerTobias Markmann <tm@ayena.de>2008-11-23 20:44:48 +0100
commit560094822d86f10450567785544cfcca61dd8a3b (patch)
treec2737280276b8ec3642cae5ae644e81da621be04 /plugins/mod_dialback.lua
parent3bc6fdb526dec6b56dab9208461d5b2f4db08006 (diff)
parent6db47b60f4574bc8e5a34eacac8a67ccd52107dd (diff)
downloadprosody-560094822d86f10450567785544cfcca61dd8a3b.tar.gz
prosody-560094822d86f10450567785544cfcca61dd8a3b.zip
Merging with main branch.
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r--plugins/mod_dialback.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index c17cbcaf..87ac303b 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -55,8 +55,12 @@ add_handler({ "s2sout_unauthed", "s2sout" }, "verify", xmlns_dialback,
log("warn", "dialback for "..(origin.dialback_verifying.from_host or "(unknown)").." failed");
valid = "invalid";
end
- origin.dialback_verifying.sends2s(format("<db:result from='%s' to='%s' id='%s' type='%s'>%s</db:result>",
- attr.from, attr.to, attr.id, valid, origin.dialback_verifying.dialback_key));
+ if not origin.dialback_verifying.sends2s then
+ log("warn", "Incoming s2s session %s was closed in the meantime, so we can't notify it of the db result", tostring(origin.dialback_verifying):match("%w+$"));
+ else
+ origin.dialback_verifying.sends2s(format("<db:result from='%s' to='%s' id='%s' type='%s'>%s</db:result>",
+ attr.to, attr.from, attr.id, valid, origin.dialback_verifying.dialback_key));
+ end
end
end);