diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 4aa0657ee..49d430693 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -3679,7 +3679,7 @@ get_max_items_node(Host) -> %%%% last item cache handling is_last_item_cache_enabled({_, ServerHost, _}) -> - is_last_item_cache_enabled(ServerHost); + is_last_item_cache_enabled(binary_to_list(ServerHost)); is_last_item_cache_enabled(Host) -> case catch ets:lookup(gen_mod:get_module_proc(Host, config), last_item_cache) of [{last_item_cache, true}] -> true; @@ -3687,21 +3687,21 @@ is_last_item_cache_enabled(Host) -> end. set_cached_item({_, ServerHost, _}, NodeId, ItemId, Publisher, Payload) -> - set_cached_item(ServerHost, NodeId, ItemId, Publisher, Payload); + set_cached_item(binary_to_list(ServerHost), NodeId, ItemId, Publisher, Payload); set_cached_item(Host, NodeId, ItemId, Publisher, Payload) -> case is_last_item_cache_enabled(Host) of true -> mnesia:dirty_write({pubsub_last_item, NodeId, ItemId, {now(), jlib:short_prepd_bare_jid(Publisher)}, Payload}); _ -> ok end. unset_cached_item({_, ServerHost, _}, NodeId) -> - unset_cached_item(ServerHost, NodeId); + unset_cached_item(binary_to_list(ServerHost), NodeId); unset_cached_item(Host, NodeId) -> case is_last_item_cache_enabled(Host) of true -> mnesia:dirty_delete({pubsub_last_item, NodeId}); _ -> ok end. get_cached_item({_, ServerHost, _}, NodeId) -> - get_cached_item(ServerHost, NodeId); + get_cached_item(binary_to_list(ServerHost), NodeId); get_cached_item(Host, NodeId) -> case is_last_item_cache_enabled(Host) of true -> diff --git a/src/mod_pubsub/mod_pubsub_odbc.erl b/src/mod_pubsub/mod_pubsub_odbc.erl index 4966dd250..4e7031cff 100644 --- a/src/mod_pubsub/mod_pubsub_odbc.erl +++ b/src/mod_pubsub/mod_pubsub_odbc.erl @@ -3519,7 +3519,7 @@ get_max_items_node(Host) -> %%%% last item cache handling is_last_item_cache_enabled({_, ServerHost, _}) -> - is_last_item_cache_enabled(ServerHost); + is_last_item_cache_enabled(binary_to_list(ServerHost)); is_last_item_cache_enabled(Host) -> case catch ets:lookup(gen_mod:get_module_proc(Host, config), last_item_cache) of [{last_item_cache, true}] -> true; @@ -3527,21 +3527,21 @@ is_last_item_cache_enabled(Host) -> end. set_cached_item({_, ServerHost, _}, NodeId, ItemId, Publisher, Payload) -> - set_cached_item(ServerHost, NodeId, ItemId, Publisher, Payload); + set_cached_item(binary_to_list(ServerHost), NodeId, ItemId, Publisher, Payload); set_cached_item(Host, NodeId, ItemId, Publisher, Payload) -> case is_last_item_cache_enabled(Host) of true -> mnesia:dirty_write({pubsub_last_item, NodeId, ItemId, {now(), jlib:short_prepd_bare_jid(Publisher)}, Payload}); _ -> ok end. unset_cached_item({_, ServerHost, _}, NodeId) -> - unset_cached_item(ServerHost, NodeId); + unset_cached_item(binary_to_list(ServerHost), NodeId); unset_cached_item(Host, NodeId) -> case is_last_item_cache_enabled(Host) of true -> mnesia:dirty_delete({pubsub_last_item, NodeId}); _ -> ok end. get_cached_item({_, ServerHost, _}, NodeId) -> - get_cached_item(ServerHost, NodeId); + get_cached_item(binary_to_list(ServerHost), NodeId); get_cached_item(Host, NodeId) -> case is_last_item_cache_enabled(Host) of true -> diff --git a/src/mod_pubsub/pubsub_odbc.patch b/src/mod_pubsub/pubsub_odbc.patch index e1a9cf964..c3eff91e9 100644 --- a/src/mod_pubsub/pubsub_odbc.patch +++ b/src/mod_pubsub/pubsub_odbc.patch @@ -1,5 +1,5 @@ ---- mod_pubsub.erl 2010-05-28 11:26:21.000000000 +0200 -+++ mod_pubsub_odbc.erl 2010-05-28 11:31:43.000000000 +0200 +--- mod_pubsub.erl 2010-05-28 13:16:05.000000000 +0200 ++++ mod_pubsub_odbc.erl 2010-05-28 13:17:04.000000000 +0200 @@ -42,7 +42,7 @@ %%% 6.2.3.1, 6.2.3.5, and 6.3. For information on subscription leases see %%% XEP-0060 section 12.18.