diff options
| author | Logan Dethrow <log@lindenlab.com> | 2011-07-28 13:47:20 -0400 | 
|---|---|---|
| committer | Logan Dethrow <log@lindenlab.com> | 2011-07-28 13:47:20 -0400 | 
| commit | f15d28a636da7b6d2784d9301e7a030b5bd38a8c (patch) | |
| tree | abd388bbf9dd24e067987ae6d46c7ff7794db2e1 /indra/llmessage | |
| parent | 814a2d24dca5181a31316a6f5e00e1a1cf55f23e (diff) | |
Proxy cleanup in llstartup.cpp and llproxy.cpp.
Diffstat (limited to 'indra/llmessage')
| -rw-r--r-- | indra/llmessage/llcurl.h | 2 | ||||
| -rw-r--r-- | indra/llmessage/llproxy.cpp | 45 | 
2 files changed, 7 insertions, 40 deletions
| diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 79f5eeb927..d60d3b6f40 100644 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h @@ -355,6 +355,8 @@ public:  	bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL);  	std::string getErrorString(); +	LLCurl::Easy* getEasy() const { return mEasy; } +  private:  	CURLMsg* info_read(S32* queue, LLCurl::TransferInfo* info); diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp index d34ad1a811..e1970f1368 100644 --- a/indra/llmessage/llproxy.cpp +++ b/indra/llmessage/llproxy.cpp @@ -278,50 +278,15 @@ void LLProxy::cleanupClass()  }  // Apply proxy settings to CuRL request if either type of HTTP proxy is enabled. -void LLProxy::applyProxySettings(LLCurl::Easy* handle) +void LLProxy::applyProxySettings(LLCurlEasyRequest* handle)  { -	if (sHTTPProxyEnabled) -	{ -		std::string address = mHTTPProxy.getIPString(); -		U16 port = mHTTPProxy.getPort(); -		handle->setoptString(CURLOPT_PROXY, address.c_str()); -		handle->setopt(CURLOPT_PROXYPORT, port); -		if (mProxyType == LLPROXY_SOCKS) -		{ -			handle->setopt(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); -			if (mAuthMethodSelected == METHOD_PASSWORD) -			{ -				handle->setoptString(CURLOPT_PROXYUSERPWD, getProxyUserPwdCURL()); -			} -		} -		else -		{ -			handle->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); -		} -	} +	applyProxySettings(handle->getEasy());  } -void LLProxy::applyProxySettings(LLCurlEasyRequest* handle) + +void LLProxy::applyProxySettings(LLCurl::Easy* handle)  { -	if (sHTTPProxyEnabled) -	{ -		std::string address = mHTTPProxy.getIPString(); -		U16 port = mHTTPProxy.getPort(); -		handle->setoptString(CURLOPT_PROXY, address.c_str()); -		handle->setopt(CURLOPT_PROXYPORT, port); -		if (mProxyType == LLPROXY_SOCKS) -		{ -			handle->setopt(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); -			if (mAuthMethodSelected == METHOD_PASSWORD) -			{ -				handle->setoptString(CURLOPT_PROXYUSERPWD, getProxyUserPwdCURL()); -			} -		} -		else -		{ -			handle->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP); -		} -	} +	applyProxySettings(handle->getCurlHandle());  }  void LLProxy::applyProxySettings(CURL* handle) | 
