Fix user-agent issue: Use char* pointer instead of address of the std::string class
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 14 Oct 2010 13:31:16 +0000 (15:31 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 14 Oct 2010 13:31:16 +0000 (15:31 +0200)
src/httphelper.cpp

index 3f33def..25130af 100644 (file)
@@ -192,7 +192,7 @@ CURL* HTTPHelper::init_curl(string& curl_writedata_buff,char* curl_err_buff)
     if ( CurlInitError == CURLE_OK)
         CurlInitError = curl_easy_setopt(curl_easy_handle,CURLOPT_WRITEDATA,&curl_writedata_buff);
     if ( CurlInitError == CURLE_OK)
-        CurlInitError = curl_easy_setopt(curl_easy_handle,CURLOPT_USERAGENT,&user_agent);
+        CurlInitError = curl_easy_setopt(curl_easy_handle,CURLOPT_USERAGENT,user_agent.c_str());
     if ( CurlInitError == CURLE_OK)
         CurlInitError = curl_easy_setopt(curl_easy_handle,CURLOPT_SSL_VERIFYHOST,0);
     if ( CurlInitError == CURLE_OK)