mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Fix: Avoid dead-lock in case of config reload
This commit is contained in:
parent
5df028691a
commit
53d8b7c35f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user