]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_echo.erl: mod_echo does not reply to other components. This is to make...
authorMickaël Rémond <mickael.remond@process-one.net>
Wed, 11 Jul 2007 08:37:30 +0000 (08:37 +0000)
committerMickaël Rémond <mickael.remond@process-one.net>
Wed, 11 Jul 2007 08:37:30 +0000 (08:37 +0000)
* src/ejabberd.cfg: disable mod_echo in the example config file. mod_echo is mainly a development/test module.

SVN Revision: 810

ChangeLog
src/mod_echo.erl

index a6a9154299d6a10f07df30bbb449830e71fd198f..ed5c89eea1b72d7c9e529a8de3934cb014981fac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-11  Mickael Remond  <mickael.remond@process-one.net>
+
+       * src/mod_echo.erl: mod_echo does not reply to other
+       components. This is to make sure that a component will not
+       discover its own capabilities (EJAB-281).
+       * src/ejabberd.cfg: disable mod_echo in the example config
+       file. mod_echo is mainly a development/test module.
+
 2007-07-09  Mickael Remond  <mickael.remond@process-one.net>
 
        * src/odbc/mssql.sql: Nickname cannot be null in rosterusers table
index c2b466ee5610122191b05b0c60759dda54946c57..5d7474ac796aa05198173897150b00b6eabbac13 100644 (file)
@@ -100,7 +100,11 @@ handle_cast(_Msg, State) ->
 %% Description: Handling all non call/cast messages
 %%--------------------------------------------------------------------
 handle_info({route, From, To, Packet}, State) ->
-    ejabberd_router:route(To, From, Packet),
+       Packet2 = case From#jid.user of
+               "" -> jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST);
+               _ -> Packet
+       end,
+    ejabberd_router:route(To, From, Packet2),
     {noreply, State};
 handle_info(_Info, State) ->
     {noreply, State}.