mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
SNeutrinoSettings: convert more char[...] configuration values to std::string
This commit is contained in:
@@ -96,21 +96,18 @@ printf("url is %s\n", URL.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
#endif
|
||||
|
||||
if(strcmp(g_settings.softupdate_proxyserver, "")!=0)
|
||||
{//use proxyserver
|
||||
if (!g_settings.softupdate_proxyserver.empty()) {//use proxyserver
|
||||
#ifdef DEBUG
|
||||
printf("use proxyserver : %s\n", g_settings.softupdate_proxyserver);
|
||||
printf("use proxyserver : %s\n", g_settings.softupdate_proxyserver.c_str());
|
||||
#endif
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, g_settings.softupdate_proxyserver);
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, g_settings.softupdate_proxyserver.c_str());
|
||||
|
||||
if(strcmp(g_settings.softupdate_proxyusername,"")!=0)
|
||||
{//use auth
|
||||
if (!g_settings.softupdate_proxyusername.empty()) {//use auth
|
||||
//printf("use proxyauth\n");
|
||||
char tmp[200];
|
||||
strcpy(tmp, g_settings.softupdate_proxyusername);
|
||||
strcat(tmp, ":");
|
||||
strcat(tmp, g_settings.softupdate_proxypassword);
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, tmp);
|
||||
std::string tmp = g_settings.softupdate_proxyusername;
|
||||
tmp += ":";
|
||||
tmp += g_settings.softupdate_proxypassword;
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, tmp.c_str());
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
|
Reference in New Issue
Block a user