mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
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:
parent
41aa693896
commit
84c4d75735
@ -51,6 +51,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,
|
||||||
test_get_addr_port/1,
|
test_get_addr_port/1,
|
||||||
get_addr_port/1]).
|
get_addr_port/1]).
|
||||||
@ -875,6 +876,14 @@ 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
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
|
@ -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("ejabberd.hrl").
|
-include("ejabberd.hrl").
|
||||||
-include("jlib.hrl").
|
-include("jlib.hrl").
|
||||||
@ -374,6 +375,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
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
|
@ -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
|
||||||
@ -285,6 +286,13 @@ 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
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user