1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Fix: Avoid dead-lock in case of config reload

This commit is contained in:
Philipp Schafft 2018-09-20 14:21:16 +00:00
parent 5df028691a
commit 53d8b7c35f

View File

@ -12,6 +12,7 @@
#include "curl.h"
#include "cfgfile.h"
#include "global.h"
#include "logging.h"
#define CATMODULE "curl"
@ -48,7 +49,6 @@ int icecast_curl_shutdown(void)
CURL *icecast_curl_new(const char *url, char * errors)
{
ice_config_t *config;
CURL *curl = curl_easy_init();
if (!curl)
@ -77,9 +77,7 @@ CURL *icecast_curl_new(const char *url, char * errors)
if (errors)
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errors);
config = config_get_config();
curl_easy_setopt(curl, CURLOPT_USERAGENT, config->server_id);
config_release_config();
curl_easy_setopt(curl, CURLOPT_USERAGENT, ICECAST_VERSION_STRING);
return curl;
}