mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
* src/mod_echo.erl: Small change to avoid a compilation warning of
unused function SVN Revision: 1228
This commit is contained in:
parent
4be522ed0c
commit
17e751521f
@ -1,3 +1,8 @@
|
|||||||
|
2008-03-13 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
|
* src/mod_echo.erl: Small change to avoid a compilation warning of
|
||||||
|
unused function
|
||||||
|
|
||||||
2008-03-12 Badlop <badlop@process-one.net>
|
2008-03-12 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
* src/web/ejabberd_web_admin.erl (term_to_string): Show Erlang
|
* src/web/ejabberd_web_admin.erl (term_to_string): Show Erlang
|
||||||
|
@ -121,7 +121,7 @@ handle_info({route, From, To, Packet}, State) ->
|
|||||||
"" -> jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST);
|
"" -> jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST);
|
||||||
_ -> Packet
|
_ -> Packet
|
||||||
end,
|
end,
|
||||||
%%do_client_version(To, From),
|
do_client_version(disabled, To, From), % Put 'enabled' to enable it
|
||||||
ejabberd_router:route(To, From, Packet2),
|
ejabberd_router:route(To, From, Packet2),
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
handle_info(_Info, State) ->
|
handle_info(_Info, State) ->
|
||||||
@ -149,8 +149,9 @@ code_change(_OldVsn, State, _Extra) ->
|
|||||||
%% Example of routing XMPP packets using Erlang's message passing
|
%% Example of routing XMPP packets using Erlang's message passing
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
%% To enable this educational example, uncomment the call to the
|
%% To enable this educational example, edit the function handle_info:
|
||||||
%% function do_client_version in handle_info.
|
%% replace the argument 'disabled' with 'enabled' in the call to the
|
||||||
|
%% function do_client_version.
|
||||||
|
|
||||||
%% ejabberd provides a method to receive XMPP packets using Erlang's
|
%% ejabberd provides a method to receive XMPP packets using Erlang's
|
||||||
%% message passing mechanism.
|
%% message passing mechanism.
|
||||||
@ -167,7 +168,9 @@ code_change(_OldVsn, State, _Extra) ->
|
|||||||
%% using exactly the same JID. We add a (mostly) random resource to
|
%% using exactly the same JID. We add a (mostly) random resource to
|
||||||
%% try to guarantee that the received response matches the request sent.
|
%% try to guarantee that the received response matches the request sent.
|
||||||
%% Finally, the received response is printed in the ejabberd log file.
|
%% Finally, the received response is printed in the ejabberd log file.
|
||||||
do_client_version(From, To) ->
|
do_client_version(disabled, _From, _To) ->
|
||||||
|
ok;
|
||||||
|
do_client_version(enabled, From, To) ->
|
||||||
ToS = jlib:jid_to_string(To),
|
ToS = jlib:jid_to_string(To),
|
||||||
%% It is important to identify this process and packet
|
%% It is important to identify this process and packet
|
||||||
Random_resource = integer_to_list(random:uniform(100000)),
|
Random_resource = integer_to_list(random:uniform(100000)),
|
||||||
|
Loading…
Reference in New Issue
Block a user