mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-16 17:41:20 +01:00
2021-02-23 Fred Gleason <fredg@paravelsystems.com>
* Removed the Qt3Support library from the build system. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -72,7 +72,6 @@ RDAudioStore::ErrorCode RDAudioStore::runStore(const QString &username,
|
||||
{
|
||||
long response_code;
|
||||
CURL *curl=NULL;
|
||||
char url[1024];
|
||||
CURLcode curl_err;
|
||||
struct curl_httppost *first=NULL;
|
||||
struct curl_httppost *last=NULL;
|
||||
@@ -82,29 +81,24 @@ RDAudioStore::ErrorCode RDAudioStore::runStore(const QString &username,
|
||||
//
|
||||
curl_formadd(&first,&last,CURLFORM_PTRNAME,"COMMAND",
|
||||
CURLFORM_COPYCONTENTS,
|
||||
(const char *)QString().sprintf("%u",RDXPORT_COMMAND_AUDIOSTORE),
|
||||
QString().sprintf("%u",RDXPORT_COMMAND_AUDIOSTORE).toUtf8().constData(),
|
||||
CURLFORM_END);
|
||||
curl_formadd(&first,&last,CURLFORM_PTRNAME,"LOGIN_NAME",
|
||||
CURLFORM_COPYCONTENTS,(const char *)username.utf8(),CURLFORM_END);
|
||||
CURLFORM_COPYCONTENTS,username.toUtf8().constData(),CURLFORM_END);
|
||||
curl_formadd(&first,&last,CURLFORM_PTRNAME,"PASSWORD",
|
||||
CURLFORM_COPYCONTENTS,(const char *)password.utf8(),CURLFORM_END);
|
||||
CURLFORM_COPYCONTENTS,(const char *)password.toUtf8(),CURLFORM_END);
|
||||
if((curl=curl_easy_init())==NULL) {
|
||||
curl_formfree(first);
|
||||
return RDAudioStore::ErrorInternal;
|
||||
}
|
||||
|
||||
//
|
||||
// Write out URL as a C string before passing to curl_easy_setopt(),
|
||||
// otherwise some versions of LibCurl will throw a 'bad/illegal format'
|
||||
// error.
|
||||
//
|
||||
strncpy(url,conv_station->webServiceUrl(conv_config),1024);
|
||||
curl_easy_setopt(curl,CURLOPT_URL,url);
|
||||
curl_easy_setopt(curl,CURLOPT_URL,conv_station->webServiceUrl(conv_config).
|
||||
toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_WRITEFUNCTION,RDAudioStoreCallback);
|
||||
curl_easy_setopt(curl,CURLOPT_WRITEDATA,&conv_xml);
|
||||
curl_easy_setopt(curl,CURLOPT_HTTPPOST,first);
|
||||
curl_easy_setopt(curl,CURLOPT_USERAGENT,
|
||||
(const char *)conv_config->userAgent());
|
||||
curl_easy_setopt(curl,CURLOPT_USERAGENT,conv_config->userAgent().
|
||||
toUtf8().constData());
|
||||
curl_easy_setopt(curl,CURLOPT_TIMEOUT,RD_CURL_TIMEOUT);
|
||||
|
||||
switch(curl_err=curl_easy_perform(curl)) {
|
||||
|
||||
Reference in New Issue
Block a user