Commit 53d8b7c3 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: Avoid dead-lock in case of config reload

parent 5df02869
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment