25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Fix crash when user publishes an item (EJAB-1457)

This commit is contained in:
Badlop 2011-06-01 23:29:45 +02:00
parent 7248ee1dbc
commit 9c9f278a96

View File

@ -2420,8 +2420,8 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
DeliverPayloads = get_option(Options, deliver_payloads),
PersistItems = get_option(Options, persist_items),
MaxItems = case PersistItems of
0 -> 0;
1 -> max_items(Host, Options)
false -> 0;
true -> max_items(Host, Options)
end,
{PayloadCount, PayloadNS} = payload_els_ns(Payload),
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2