From 6aeb9dcb38921249cdfe453baeadcd03298d5d6e Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Wed, 7 Oct 2015 00:06:58 +0200 Subject: cosmetic cleanup --- src/ejabberd_local.erl | 54 +++++++++----------------------------------------- 1 file changed, 9 insertions(+), 45 deletions(-) (limited to 'src/ejabberd_local.erl') 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", -- cgit v1.2.3