# HG changeset patch # User Kim Alvefur # Date 1400740216 -7200 # Node ID 7ddb522d9b28e0f34f3aa2b0194b4d79f576d5ed # Parent 8791fa8a18c8475bce04f91f6e4303c5d75ff41b mod_smacks: Fix logging (Thanks Ge0rG) diff -r 8791fa8a18c8 -r 7ddb522d9b28 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Mon May 19 17:00:12 2014 +0200 +++ b/mod_smacks/mod_smacks.lua Thu May 22 08:30:16 2014 +0200 @@ -205,11 +205,11 @@ local handled_stanza_count = h-origin.last_acknowledged_stanza; local queue = origin.outgoing_stanza_queue; if handled_stanza_count > #queue then - session.log("warn", "The client says it handled %d new stanzas, but we only sent %d :)", + origin.log("warn", "The client says it handled %d new stanzas, but we only sent %d :)", handled_stanza_count, #queue); - session.log("debug", "Client h: %d, our h: %d", tonumber(stanza.attr.h), origin.last_acknowledged_stanza); + origin.log("debug", "Client h: %d, our h: %d", tonumber(stanza.attr.h), origin.last_acknowledged_stanza); for i=1,#queue do - session.log("debug", "Q item %d: %s", i, tostring(queue[i])); + origin.log("debug", "Q item %d: %s", i, tostring(queue[i])); end end for i=1,math_min(handled_stanza_count,#queue) do