mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
SNeutrinoSettings: convert more char[...] configuration values to std::string
Origin commit data
------------------
Commit: 004aa84e32
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-01-18 (Sat, 18 Jan 2014)
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