mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
fix get_item_name deadlock on transaction
SVN Revision: 1728
This commit is contained in:
parent
620cbc765c
commit
a800ac5a4e
@ -1,3 +1,8 @@
|
||||
2008-12-15 Christophe Romain <christophe.romain@process-one.net>
|
||||
|
||||
* src/mod_pubsub/mod_pubsub.erl: fix get_item_name deadlock on
|
||||
transaction
|
||||
|
||||
2008-12-12 Alexey Shchepin <alexey@process-one.net>
|
||||
|
||||
* src/ejabberd_c2s.erl: Bugfix in "from" attribute checking
|
||||
|
@ -393,9 +393,10 @@ disco_sm_items(Acc, From, To, Node, _Lang) ->
|
||||
fun(#pubsub_item{itemid = Id}) ->
|
||||
%% "jid" is required by XEP-0030, and
|
||||
%% "node" is forbidden by XEP-0060.
|
||||
{result, Name} = node_action(Host, Node, get_item_name, [Host, Node, Id]),
|
||||
{xmlelement, "item",
|
||||
[{"jid", jlib:jid_to_string(LJID)},
|
||||
{"name", get_item_name(Host, Node, Id)}],
|
||||
{"name", Name}],
|
||||
[]}
|
||||
end, AllItems),
|
||||
{result, NodeItems ++ Items}
|
||||
@ -803,8 +804,9 @@ iq_disco_items(Host, Item, From) ->
|
||||
Items = lists:map(
|
||||
fun(#pubsub_item{itemid = {RN, _}}) ->
|
||||
SN = node_to_string(Node) ++ "!" ++ RN,
|
||||
{result, Name} = node_call(Type, get_item_name, [Host, Node, RN]),
|
||||
{xmlelement, "item", [{"jid", Host}, {"node", SN},
|
||||
{"name", get_item_name(Host, Node, RN)}], []}
|
||||
{"name", Name}], []}
|
||||
end, NodeItems),
|
||||
{result, Nodes ++ Items}
|
||||
end,
|
||||
@ -2848,8 +2850,3 @@ uniqid() ->
|
||||
{T1, T2, T3} = now(),
|
||||
lists:flatten(io_lib:fwrite("~.16B~.16B~.16B", [T1, T2, T3])).
|
||||
|
||||
%% @doc Return the name of a given node if available.
|
||||
get_item_name(Host, Node, Id) ->
|
||||
{result, Name} = node_action(Host, Node, get_item_name, [Host, Node, Id]),
|
||||
Name.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user