mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Fix: Corrected two possible dead-locks.
This commit is contained in:
parent
1e171a8e4e
commit
7b84c45a81
@ -1341,6 +1341,7 @@ static void _handle_authed_client(client_t *client, void *userdata, auth_result
|
|||||||
static void _handle_authentication_global(client_t *client, void *userdata, auth_result result)
|
static void _handle_authentication_global(client_t *client, void *userdata, auth_result result)
|
||||||
{
|
{
|
||||||
ice_config_t *config;
|
ice_config_t *config;
|
||||||
|
auth_stack_t *authstack;
|
||||||
|
|
||||||
auth_stack_release(client->authstack);
|
auth_stack_release(client->authstack);
|
||||||
client->authstack = NULL;
|
client->authstack = NULL;
|
||||||
@ -1353,8 +1354,11 @@ static void _handle_authentication_global(client_t *client, void *userdata, auth
|
|||||||
|
|
||||||
ICECAST_LOG_DEBUG("Trying global authenticators for client %p.", client);
|
ICECAST_LOG_DEBUG("Trying global authenticators for client %p.", client);
|
||||||
config = config_get_config();
|
config = config_get_config();
|
||||||
auth_stack_add_client(config->authstack, client, _handle_authed_client, userdata);
|
authstack = config->authstack;
|
||||||
|
auth_stack_addref(authstack);
|
||||||
config_release_config();
|
config_release_config();
|
||||||
|
auth_stack_add_client(authstack, client, _handle_authed_client, userdata);
|
||||||
|
auth_stack_release(authstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline mount_proxy * __find_non_admin_mount(ice_config_t *config, const char *name, mount_type type)
|
static inline mount_proxy * __find_non_admin_mount(ice_config_t *config, const char *name, mount_type type)
|
||||||
|
@ -843,6 +843,10 @@ static xmlNodePtr _dump_stats_to_doc (xmlNodePtr root, const char *show_mount, i
|
|||||||
xmlNodePtr ret = NULL;
|
xmlNodePtr ret = NULL;
|
||||||
ice_config_t *config;
|
ice_config_t *config;
|
||||||
|
|
||||||
|
config = config_get_config();
|
||||||
|
__add_authstack(config->authstack, root);
|
||||||
|
config_release_config();
|
||||||
|
|
||||||
thread_mutex_lock(&_stats_mutex);
|
thread_mutex_lock(&_stats_mutex);
|
||||||
/* general stats first */
|
/* general stats first */
|
||||||
avlnode = avl_get_first(_stats.global_tree);
|
avlnode = avl_get_first(_stats.global_tree);
|
||||||
@ -855,9 +859,6 @@ static xmlNodePtr _dump_stats_to_doc (xmlNodePtr root, const char *show_mount, i
|
|||||||
}
|
}
|
||||||
/* now per mount stats */
|
/* now per mount stats */
|
||||||
avlnode = avl_get_first(_stats.source_tree);
|
avlnode = avl_get_first(_stats.source_tree);
|
||||||
config = config_get_config();
|
|
||||||
__add_authstack(config->authstack, root);
|
|
||||||
config_release_config();
|
|
||||||
|
|
||||||
while (avlnode) {
|
while (avlnode) {
|
||||||
stats_source_t *source = (stats_source_t *)avlnode->key;
|
stats_source_t *source = (stats_source_t *)avlnode->key;
|
||||||
|
Loading…
Reference in New Issue
Block a user