Comparison

plugins/mod_dialback.lua @ 403:da92afa267cf

Merging with main branch.
author Tobias Markmann <tm@ayena.de>
date Sun, 23 Nov 2008 20:44:48 +0100
parent 352:a73a5afd7da3
child 438:193f9dd64f17
comparison
equal deleted inserted replaced
402:50f1c09541cd 403:da92afa267cf
53 else 53 else
54 -- Warn the original connection that is was not verified successfully 54 -- Warn the original connection that is was not verified successfully
55 log("warn", "dialback for "..(origin.dialback_verifying.from_host or "(unknown)").." failed"); 55 log("warn", "dialback for "..(origin.dialback_verifying.from_host or "(unknown)").." failed");
56 valid = "invalid"; 56 valid = "invalid";
57 end 57 end
58 origin.dialback_verifying.sends2s(format("<db:result from='%s' to='%s' id='%s' type='%s'>%s</db:result>", 58 if not origin.dialback_verifying.sends2s then
59 attr.from, attr.to, attr.id, valid, origin.dialback_verifying.dialback_key)); 59 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+$"));
60 else
61 origin.dialback_verifying.sends2s(format("<db:result from='%s' to='%s' id='%s' type='%s'>%s</db:result>",
62 attr.to, attr.from, attr.id, valid, origin.dialback_verifying.dialback_key));
63 end
60 end 64 end
61 end); 65 end);
62 66
63 add_handler({ "s2sout_unauthed", "s2sout" }, "result", xmlns_dialback, 67 add_handler({ "s2sout_unauthed", "s2sout" }, "result", xmlns_dialback,
64 function (origin, stanza) 68 function (origin, stanza)