aboutsummaryrefslogtreecommitdiff
path: root/src/mod_push_mnesia.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_push_mnesia.erl')
-rw-r--r--src/mod_push_mnesia.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mod_push_mnesia.erl b/src/mod_push_mnesia.erl
index 309ff80e3..ea707dbf6 100644
--- a/src/mod_push_mnesia.erl
+++ b/src/mod_push_mnesia.erl
@@ -75,7 +75,7 @@ store_session(LUser, LServer, TS, PushJID, Node, XData) ->
{aborted, E} ->
?ERROR_MSG("Cannot store push session for ~s@~s: ~p",
[LUser, LServer, E]),
- error
+ {error, db_failure}
end.
lookup_session(LUser, LServer, PushJID, Node) ->
@@ -91,7 +91,7 @@ lookup_session(LUser, LServer, PushJID, Node) ->
case mnesia:dirty_select(push_session, MatchSpec) of
[#push_session{timestamp = TS, xdata = XData}] ->
{ok, {TS, PushLJID, Node, XData}};
- _ ->
+ [] ->
?DEBUG("No push session found for ~s@~s (~p, ~s)",
[LUser, LServer, PushJID, Node]),
error
@@ -108,7 +108,7 @@ lookup_session(LUser, LServer, TS) ->
case mnesia:dirty_select(push_session, MatchSpec) of
[#push_session{service = PushLJID, node = Node, xdata = XData}] ->
{ok, {TS, PushLJID, Node, XData}};
- _ ->
+ [] ->
?DEBUG("No push session found for ~s@~s (~p)",
[LUser, LServer, TS]),
error
@@ -164,7 +164,7 @@ delete_session(LUser, LServer, TS) ->
{aborted, E} ->
?ERROR_MSG("Cannot delete push session of ~s@~s: ~p",
[LUser, LServer, E]),
- error
+ {error, db_failure}
end.
delete_old_sessions(_LServer, Time) ->
@@ -181,7 +181,7 @@ delete_old_sessions(_LServer, Time) ->
ok;
{aborted, E} ->
?ERROR_MSG("Cannot delete old push sessions: ~p", [E]),
- error
+ {error, db_failure}
end.
%%--------------------------------------------------------------------