Remove warning for undefined print_state/1 function for p1_fsm processes (thanks Badlop).

Include a identity function as implementation of print_state/1.
This commit is contained in:
Pablo Polvorin 2010-04-09 14:25:00 -03:00
parent 41aa693896
commit 84c4d75735
3 changed files with 27 additions and 1 deletions

View File

@ -51,6 +51,7 @@
handle_sync_event/4,
handle_info/3,
terminate/3,
print_state/1,
code_change/4,
test_get_addr_port/1,
get_addr_port/1]).
@ -875,6 +876,14 @@ 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
%%%----------------------------------------------------------------------

View File

@ -47,7 +47,8 @@
handle_sync_event/4,
code_change/4,
handle_info/3,
terminate/3]).
terminate/3,
print_state/1]).
-include("ejabberd.hrl").
-include("jlib.hrl").
@ -374,6 +375,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
%%%----------------------------------------------------------------------

View File

@ -47,6 +47,7 @@
handle_sync_event/4,
handle_info/3,
terminate/3,
print_state/1,
code_change/4]).
%% gen_fsm states
@ -285,6 +286,13 @@ 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
%%%----------------------------------------------------------------------