25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Remove warning for undefined print_state/1 function for p1_fsm processes.

Include a identity function as implementation of print_state/1.
This commit is contained in:
Pablo Polvorin 2010-04-09 14:18:44 -03:00
parent 44abf1ff28
commit 3581b137e1
3 changed files with 27 additions and 1 deletions

View File

@ -52,6 +52,7 @@
handle_info/3, handle_info/3,
terminate/3, terminate/3,
code_change/4, code_change/4,
print_state/1,
test_get_addr_port/1, test_get_addr_port/1,
get_addr_port/1]). get_addr_port/1]).
@ -830,6 +831,13 @@ terminate(Reason, StateName, StateData) ->
end, end,
ok. 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 %%% Internal functions
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------

View File

@ -47,7 +47,8 @@
handle_sync_event/4, handle_sync_event/4,
code_change/4, code_change/4,
handle_info/3, handle_info/3,
terminate/3]). terminate/3,
print_state/1]).
-include_lib("exmpp/include/exmpp.hrl"). -include_lib("exmpp/include/exmpp.hrl").
@ -370,6 +371,14 @@ terminate(Reason, StateName, StateData) ->
(StateData#state.sockmod):close(StateData#state.socket), (StateData#state.sockmod):close(StateData#state.socket),
ok. 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 %%% Internal functions
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------

View File

@ -47,6 +47,7 @@
handle_sync_event/4, handle_sync_event/4,
handle_info/3, handle_info/3,
terminate/3, terminate/3,
print_state/1,
code_change/4]). code_change/4]).
%% gen_fsm states %% gen_fsm states
@ -288,6 +289,14 @@ terminate(_Reason, _StateName, State) ->
end, end,
ok. 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 %%% Internal functions
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------