Mercurial > prosody-modules
comparison mod_smacks/mod_smacks.lua @ 588:8042558336b6
mod_smacks: Log message when client tries to resume unknown session
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 30 Jan 2012 04:20:24 +0000 |
parents | 322a14acd974 |
children | 57ac609444c4 |
comparison
equal
deleted
inserted
replaced
587:322a14acd974 | 588:8042558336b6 |
---|---|
215 | 215 |
216 module:hook_stanza(xmlns_sm, "resume", function (session, stanza) | 216 module:hook_stanza(xmlns_sm, "resume", function (session, stanza) |
217 local id = stanza.attr.previd; | 217 local id = stanza.attr.previd; |
218 local original_session = session_registry[id]; | 218 local original_session = session_registry[id]; |
219 if not original_session then | 219 if not original_session then |
220 session.log("debug", "Tried to resume non-existent session with id %s", id); | |
220 session.send(st.stanza("failed", sm_attr) | 221 session.send(st.stanza("failed", sm_attr) |
221 :tag("item-not-found", { xmlns = xmlns_errors }) | 222 :tag("item-not-found", { xmlns = xmlns_errors }) |
222 ); | 223 ); |
223 elseif session.username == original_session.username | 224 elseif session.username == original_session.username |
224 and session.host == original_session.host then | 225 and session.host == original_session.host then |