]> granicus.if.org Git - ejabberd/commitdiff
* src/ejabberd_sm.erl: Updated missed message passing from
authorAlexey Shchepin <alexey@process-one.net>
Tue, 14 Dec 2004 23:51:21 +0000 (23:51 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Tue, 14 Dec 2004 23:51:21 +0000 (23:51 +0000)
previous patch

SVN Revision: 293

ChangeLog
src/ejabberd_sm.erl

index c388cd053d5c4ff061f187404dfa89ad80ef0152..4924e32083e712f056ac5ddf54135221d57b63b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-14  Alexey Shchepin  <alexey@sevcom.net>
+
+       * src/ejabberd_sm.erl: Updated missed message passing from
+       previous patch
+
 2004-12-13  Alexey Shchepin  <alexey@sevcom.net>
 
        * src/odbc/pg.sql: DB creation script for postgres
index 30a494163d8ab61d59a5819a235689c076978d99..4bf59fb1202a24b221b9399c6886f37fe9bb2886 100644 (file)
@@ -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;