diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-08-02 17:18:54 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-08-02 17:18:54 -0400 |
commit | d3b4cc34a8d388ab66ef2ca717ee0d814d87ff3d (patch) | |
tree | 587cbfbc0c992c971f81ebd0e50d8ce9c445a098 /indra/llmessage/llproxy.cpp | |
parent | 97bedac2a1274f26a6a346afccea7596f1d13923 (diff) |
LLProxy cleanup.
* Removed early returns in LLStartup::handleSocksProxy
* Corrected some cases that would result in handleSocksProxy not being called again during login if settings changed
* Allowed for short replies in tcp_handshake in LLProxy.cpp
* Renamed LLProxy::isEnabled() to LLProxy::isSocksProxyEnabled() to clarify its use.
Diffstat (limited to 'indra/llmessage/llproxy.cpp')
-rw-r--r-- | indra/llmessage/llproxy.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp index b224757673..d2e64e60ac 100644 --- a/indra/llmessage/llproxy.cpp +++ b/indra/llmessage/llproxy.cpp @@ -382,14 +382,15 @@ static S32 tcp_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outl handle->setBlocking(1000); rv = apr_socket_send(apr_socket, dataout, &outlen); - if (APR_SUCCESS != rv || expected_len != outlen) + if (APR_SUCCESS != rv) { - LL_WARNS("Proxy") << "Error sending data to proxy control channel" << LL_ENDL; + LL_WARNS("Proxy") << "Error sending data to proxy control channel, status: " << rv << LL_ENDL; ll_apr_warn_status(rv); } else if (expected_len != outlen) { - LL_WARNS("Proxy") << "Error sending data to proxy control channel" << LL_ENDL; + LL_WARNS("Proxy") << "Incorrect data length sent. Expected: " << expected_len << + " Sent: " << outlen << LL_ENDL; rv = -1; } @@ -402,9 +403,10 @@ static S32 tcp_handshake(LLSocket::ptr_t handle, char * dataout, apr_size_t outl LL_WARNS("Proxy") << "Error receiving data from proxy control channel, status: " << rv << LL_ENDL; ll_apr_warn_status(rv); } - else if (expected_len != maxinlen) + else if (expected_len < maxinlen) { - LL_WARNS("Proxy") << "Received incorrect amount of data in proxy control channel" << LL_ENDL; + LL_WARNS("Proxy") << "Incorrect data length received. Expected: " << expected_len << + " Received: " << maxinlen << LL_ENDL; rv = -1; } } |