Mercurial > prosody-hg
comparison plugins/mod_dialback.lua @ 4993:5243b74a4cbb
Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 23 Jul 2012 17:32:33 +0100 |
| parents | 7a4f00168260 |
| children | 017e864b459d |
comparison
equal
deleted
inserted
replaced
| 4992:e79e4d1f75de | 4993:5243b74a4cbb |
|---|---|
| 100 local origin, stanza = event.origin, event.stanza; | 100 local origin, stanza = event.origin, event.stanza; |
| 101 | 101 |
| 102 if origin.type == "s2sout_unauthed" or origin.type == "s2sout" then | 102 if origin.type == "s2sout_unauthed" or origin.type == "s2sout" then |
| 103 local attr = stanza.attr; | 103 local attr = stanza.attr; |
| 104 local dialback_verifying = dialback_requests[attr.from.."/"..(attr.id or "")]; | 104 local dialback_verifying = dialback_requests[attr.from.."/"..(attr.id or "")]; |
| 105 module:log("debug", tostring(dialback_verifying).." "..attr.from.." "..origin.to_host); | |
| 106 if dialback_verifying and attr.from == origin.to_host then | 105 if dialback_verifying and attr.from == origin.to_host then |
| 107 local valid; | 106 local valid; |
| 108 if attr.type == "valid" then | 107 if attr.type == "valid" then |
| 109 s2s_make_authenticated(dialback_verifying, attr.from); | 108 s2s_make_authenticated(dialback_verifying, attr.from); |
| 110 valid = "valid"; | 109 valid = "valid"; |
| 111 else | 110 else |
| 112 -- Warn the original connection that is was not verified successfully | 111 -- Warn the original connection that is was not verified successfully |
| 113 log("warn", "authoritative server for "..(attr.from or "(unknown)").." denied the key"); | 112 log("warn", "authoritative server for %s denied the key", attr.from or "(unknown)"); |
| 114 valid = "invalid"; | 113 valid = "invalid"; |
| 115 end | 114 end |
| 116 if not dialback_verifying.sends2s then | 115 if not dialback_verifying.sends2s then |
| 117 log("warn", "Incoming s2s session %s was closed in the meantime, so we can't notify it of the db result", tostring(dialback_verifying):match("%w+$")); | 116 log("warn", "Incoming s2s session %s was closed in the meantime, so we can't notify it of the db result", tostring(dialback_verifying):match("%w+$")); |
| 118 else | 117 else |
