From 32043a80eb212c7efe15f0691486cdd38fc1cce0 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 25 Jun 2015 21:34:12 +0200 Subject: [PATCH] Update mod_logxml to work with ejabberd 15.06 --- mod_logxml/src/mod_logxml.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mod_logxml/src/mod_logxml.erl b/mod_logxml/src/mod_logxml.erl index 53f5f8c..ac822c1 100644 --- a/mod_logxml/src/mod_logxml.erl +++ b/mod_logxml/src/mod_logxml.erl @@ -12,7 +12,7 @@ -behaviour(gen_mod). -export([start/2, init/7, stop/1, - send_packet/3, receive_packet/4]). + send_packet/4, receive_packet/5]). -include("ejabberd.hrl"). -include("jlib.hrl"). @@ -166,15 +166,17 @@ loop(Host, IoDevice, Filename, Logdir, CheckRKP, RotateO, PacketC, Gregorian_day, Timezone, ShowIP, FilterO) end. -send_packet(FromJID, ToJID, P) -> +send_packet(P, _C2SState, FromJID, ToJID) -> Host = FromJID#jid.lserver, Proc = gen_mod:get_module_proc(Host, ?PROCNAME), - Proc ! {addlog, {send, FromJID, ToJID, P}}. + Proc ! {addlog, {send, FromJID, ToJID, P}}, + P. -receive_packet(_JID, From, To, P) -> +receive_packet(P, _C2SState, _JID, From, To) -> Host = To#jid.lserver, Proc = gen_mod:get_module_proc(Host, ?PROCNAME), - Proc ! {addlog, {recv, From, To, P}}. + Proc ! {addlog, {recv, From, To, P}}, + P. add_log(Io, Timezone, ShowIP, {Orientation, From, To, Packet}, _OSD) -> %%{Orientation, Stanza, Direction} = OSD,