From 3581b137e1e79ef200bd36356ede03880803a851 Mon Sep 17 00:00:00 2001 From: Pablo Polvorin Date: Fri, 9 Apr 2010 14:18:44 -0300 Subject: [PATCH] Remove warning for undefined print_state/1 function for p1_fsm processes. Include a identity function as implementation of print_state/1. --- src/ejabberd_s2s_out.erl | 8 ++++++++ src/ejabberd_service.erl | 11 ++++++++++- src/odbc/ejabberd_odbc.erl | 9 +++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/ejabberd_s2s_out.erl b/src/ejabberd_s2s_out.erl index 1b0b8a78b..131e6de2d 100644 --- a/src/ejabberd_s2s_out.erl +++ b/src/ejabberd_s2s_out.erl @@ -52,6 +52,7 @@ handle_info/3, terminate/3, code_change/4, + print_state/1, test_get_addr_port/1, get_addr_port/1]). @@ -830,6 +831,13 @@ terminate(Reason, StateName, StateData) -> end, ok. +%%---------------------------------------------------------------------- +%% Func: print_state/1 +%% Purpose: Prepare the state to be printed on error log +%% Returns: State to print +%%---------------------------------------------------------------------- +print_state(State) -> + State. %%%---------------------------------------------------------------------- %%% Internal functions %%%---------------------------------------------------------------------- diff --git a/src/ejabberd_service.erl b/src/ejabberd_service.erl index a3cff7553..5120eba65 100644 --- a/src/ejabberd_service.erl +++ b/src/ejabberd_service.erl @@ -47,7 +47,8 @@ handle_sync_event/4, code_change/4, handle_info/3, - terminate/3]). + terminate/3, + print_state/1]). -include_lib("exmpp/include/exmpp.hrl"). @@ -370,6 +371,14 @@ terminate(Reason, StateName, StateData) -> (StateData#state.sockmod):close(StateData#state.socket), ok. +%%---------------------------------------------------------------------- +%% Func: print_state/1 +%% Purpose: Prepare the state to be printed on error log +%% Returns: State to print +%%---------------------------------------------------------------------- +print_state(State) -> + State. + %%%---------------------------------------------------------------------- %%% Internal functions %%%---------------------------------------------------------------------- diff --git a/src/odbc/ejabberd_odbc.erl b/src/odbc/ejabberd_odbc.erl index 345949760..b5990f24f 100644 --- a/src/odbc/ejabberd_odbc.erl +++ b/src/odbc/ejabberd_odbc.erl @@ -47,6 +47,7 @@ handle_sync_event/4, handle_info/3, terminate/3, + print_state/1, code_change/4]). %% gen_fsm states @@ -288,6 +289,14 @@ terminate(_Reason, _StateName, State) -> end, ok. +%%---------------------------------------------------------------------- +%% Func: print_state/1 +%% Purpose: Prepare the state to be printed on error log +%% Returns: State to print +%%---------------------------------------------------------------------- +print_state(State) -> + State. + %%%---------------------------------------------------------------------- %%% Internal functions %%%----------------------------------------------------------------------