24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-14 23:44:18 +02:00

fir state initialization

This commit is contained in:
Christophe Romain 2011-03-18 18:59:44 +01:00
parent f05a4d1638
commit 3b7458bbc2

View File

@ -878,7 +878,7 @@ get_state(NodeIdx, JID) ->
StateId = {JID, NodeIdx},
case catch mnesia:read({pubsub_state, StateId}) of
[State] when is_record(State, pubsub_state) -> State;
_ -> #pubsub_state{stateid=StateId}
_ -> #pubsub_state{stateid=StateId, nodeidx=NodeIdx}
end.
%% @spec (State) -> ok | {error, Reason}