Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2015-10-07 01:06:58 +0300
committerChristophe Romain <christophe.romain@process-one.net>2015-10-07 15:18:38 +0300
commit6aeb9dcb38921249cdfe453baeadcd03298d5d6e (patch)
treedf5559ad1f52ec9ed536c8399fd5bde714985059 /src/ejabberd_local.erl
parent83dd79a6a78c8ac5c5a73143caa1a23c3a0a7f6e (diff)
cosmetic cleanup
Diffstat (limited to 'src/ejabberd_local.erl')
-rw-r--r--src/ejabberd_local.erl54
1 files changed, 9 insertions, 45 deletions
diff --git a/src/ejabberd_local.erl b/src/ejabberd_local.erl
index cec39ced2..afb499a07 100644
--- a/src/ejabberd_local.erl
+++ b/src/ejabberd_local.erl
@@ -175,13 +175,6 @@ bounce_resource_packet(From, To, Packet) ->
%% gen_server callbacks
%%====================================================================
-%%--------------------------------------------------------------------
-%% Function: init(Args) -> {ok, State} |
-%% {ok, State, Timeout} |
-%% ignore |
-%% {stop, Reason}
-%% Description: Initiates the server
-%%--------------------------------------------------------------------
init([]) ->
lists:foreach(fun (Host) ->
ejabberd_router:register_route(Host,
@@ -200,28 +193,7 @@ init([]) ->
mnesia:add_table_copy(iq_response, node(), ram_copies),
{ok, #state{}}.
-%%--------------------------------------------------------------------
-%% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
-%% {reply, Reply, State, Timeout} |
-%% {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, Reply, State} |
-%% {stop, Reason, State}
-%% Description: Handling call messages
-%%--------------------------------------------------------------------
handle_call(_Request, _From, State) ->
-%%--------------------------------------------------------------------
-%% Function: handle_cast(Msg, State) -> {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State}
-%% Description: Handling cast messages
-%%--------------------------------------------------------------------
-%%--------------------------------------------------------------------
-%% Function: handle_info(Info, State) -> {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State}
-%% Description: Handling all non call/cast messages
-%%--------------------------------------------------------------------
Reply = ok, {reply, Reply, State}.
handle_cast(_Msg, State) -> {noreply, State}.
@@ -272,26 +244,18 @@ handle_info(refresh_iq_handlers, State) ->
handle_info({timeout, _TRef, ID}, State) ->
process_iq_timeout(ID),
{noreply, State};
-%%--------------------------------------------------------------------
-%% Function: terminate(Reason, State) -> void()
-%% Description: This function is called by a gen_server when it is about to
-%% terminate. It should be the opposite of Module:init/1 and do any necessary
-%% cleaning up. When it returns, the gen_server terminates with Reason.
-%% The return value is ignored.
-%%--------------------------------------------------------------------
-%%--------------------------------------------------------------------
-%% Func: code_change(OldVsn, State, Extra) -> {ok, NewState}
-%% Description: Convert process state when code is changed
-%%--------------------------------------------------------------------
-%%--------------------------------------------------------------------
-%%% Internal functions
-%%--------------------------------------------------------------------
-handle_info(_Info, State) -> {noreply, State}.
+handle_info(_Info, State) ->
+ {noreply, State}.
-terminate(_Reason, _State) -> ok.
+terminate(_Reason, _State) ->
+ ok.
-code_change(_OldVsn, State, _Extra) -> {ok, State}.
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+%%--------------------------------------------------------------------
+%%% Internal functions
+%%--------------------------------------------------------------------
do_route(From, To, Packet) ->
?DEBUG("local route~n\tfrom ~p~n\tto ~p~n\tpacket "
"~P~n",