mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Cleanup: Move lock out of loop as unlock is also outside the loop
This commit is contained in:
parent
833d666803
commit
b2cd834db7
10
src/source.c
10
src/source.c
@ -389,13 +389,13 @@ void source_move_clients(source_t *source, source_t *dest)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* we need to move the client and pending trees - we must take the
|
||||||
|
* locks in this order to avoid deadlocks */
|
||||||
|
avl_tree_wlock(source->pending_tree);
|
||||||
|
avl_tree_wlock(source->client_tree);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* we need to move the client and pending trees - we must take the
|
|
||||||
* locks in this order to avoid deadlocks */
|
|
||||||
avl_tree_wlock(source->pending_tree);
|
|
||||||
avl_tree_wlock(source->client_tree);
|
|
||||||
|
|
||||||
if (source->on_demand == 0 && source->format == NULL)
|
if (source->on_demand == 0 && source->format == NULL)
|
||||||
{
|
{
|
||||||
ICECAST_LOG_INFO("source mount %s is not available", source->mount);
|
ICECAST_LOG_INFO("source mount %s is not available", source->mount);
|
||||||
|
Loading…
Reference in New Issue
Block a user