Update mod_logxml to work with ejabberd 15.06

This commit is contained in:
Holger Weiss 2015-06-25 21:34:12 +02:00
parent 315d66868f
commit 1b726e3d9c
1 changed files with 7 additions and 5 deletions

View File

@ -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,