Commit 53650e96 authored by Karl Heyes's avatar Karl Heyes
Browse files

allow touch frequency setting to be changed on any YP response. Also pass

user agent to YP server

svn path=/icecast/trunk/icecast/; revision=9488
parent e9adc91b
......@@ -128,6 +128,7 @@ static int handle_returned_header (void *ptr, size_t size, size_t nmemb, void *s
if (yp->sid)
sscanf (ptr, "SID: %[^\r\n]", yp->sid);
}
}
if (strncmp (ptr, "TouchFreq: ", 11) == 0)
{
unsigned secs;
......@@ -137,7 +138,6 @@ static int handle_returned_header (void *ptr, size_t size, size_t nmemb, void *s
DEBUG1 ("server touch interval is %u", secs);
yp->touch_interval = secs;
}
}
return (int)bytes;
}
......@@ -240,6 +240,7 @@ void yp_recheck_config (ice_config_t *config)
}
if (server->touch_interval < 30)
server->touch_interval = 30;
curl_easy_setopt (server->curl, CURLOPT_USERAGENT, ICECAST_VERSION_STRING);
curl_easy_setopt (server->curl, CURLOPT_URL, server->url);
curl_easy_setopt (server->curl, CURLOPT_HEADERFUNCTION, handle_returned_header);
curl_easy_setopt (server->curl, CURLOPT_WRITEFUNCTION, handle_returned_data);
......
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