diff --git a/src/mod_pubsub/pubsub_clean.erl b/src/mod_pubsub/pubsub_clean.erl index 2368b9f34..4b59e0821 100644 --- a/src/mod_pubsub/pubsub_clean.erl +++ b/src/mod_pubsub/pubsub_clean.erl @@ -25,7 +25,7 @@ purge() -> I=element(3,N), lists:foreach(fun(JID) -> case mnesia:dirty_read({pubsub_state, {JID, I}}) of - [{pubsub_state, K, _, _, [{subscribed,S}]}] -> mnesia:dirty_delete({pubsub_subscription, S}); + [{pubsub_state, K, _, _, _, [{subscribed,S}]}] -> mnesia:dirty_delete({pubsub_subscription, S}); _ -> ok end, mnesia:dirty_delete({pubsub_state, {JID, I}}) diff --git a/src/mod_pubsub/pubsub_debug.erl b/src/mod_pubsub/pubsub_debug.erl index 397adf857..791031e5e 100644 --- a/src/mod_pubsub/pubsub_debug.erl +++ b/src/mod_pubsub/pubsub_debug.erl @@ -33,7 +33,7 @@ item(ItemId, NodeId) -> [I] -> I; _ -> undefined end. -items(NodeId) -> mnesia:dirty_index_read(pubsub_item, NodeIdi, #pubsub_item.nodeidx). +items(NodeId) -> mnesia:dirty_index_read(pubsub_item, NodeId, #pubsub_item.nodeidx). itemid(I) -> element(1, I#pubsub_item.itemid). itemids(NodeId) -> [itemid(I) || I <- items(NodeId)]. items_by_id(ItemId) -> mnesia:dirty_match_object(#pubsub_item{itemid={ItemId, '_'}, _='_'}).