From 7c900deff9549e2771ddead98d684a1439f74694 Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Tue, 14 Dec 2004 23:51:21 +0000 Subject: [PATCH] * src/ejabberd_sm.erl: Updated missed message passing from previous patch SVN Revision: 293 --- ChangeLog | 5 +++++ src/ejabberd_sm.erl | 24 ++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index c388cd053..4924e3208 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-14 Alexey Shchepin + + * src/ejabberd_sm.erl: Updated missed message passing from + previous patch + 2004-12-13 Alexey Shchepin * src/odbc/pg.sql: DB creation script for postgres diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl index 30a494163..4bf59fb12 100644 --- a/src/ejabberd_sm.erl +++ b/src/ejabberd_sm.erl @@ -197,11 +197,10 @@ do_route(From, To, Packet) -> fun({_, R}) -> if LFrom /= {LUser, LServer, R} -> - ejabberd_sm ! - {route, - From, - jlib:jid_replace_resource(To, R), - Packet}; + do_route( + From, + jlib:jid_replace_resource(To, R), + Packet); true -> ok end @@ -233,10 +232,9 @@ do_route(From, To, Packet) -> "broadcast" -> lists:foreach( fun(R) -> - ejabberd_sm ! {route, - From, - jlib:jid_replace_resource(To, R), - Packet} + do_route(From, + jlib:jid_replace_resource(To, R), + Packet) end, get_user_resources(User)); _ -> ok @@ -370,10 +368,8 @@ process_iq(From, To, Packet) -> ResIQ = Module:Function(From, To, IQ), if ResIQ /= ignore -> - ejabberd_router ! {route, - To, - From, - jlib:iq_to_xml(ResIQ)}; + ejabberd_router:route(To, From, + jlib:iq_to_xml(ResIQ)); true -> ok end; @@ -383,7 +379,7 @@ process_iq(From, To, Packet) -> [] -> Err = jlib:make_error_reply( Packet, ?ERR_FEATURE_NOT_IMPLEMENTED), - ejabberd_router ! {route, To, From, Err} + ejabberd_router:route(To, From, Err) end; reply -> ok;