summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llpacketring.cpp4
-rw-r--r--indra/llmessage/llproxy.cpp12
-rw-r--r--indra/llmessage/llproxy.h2
3 files changed, 10 insertions, 8 deletions
diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp
index ba82957b47..7628984de4 100644
--- a/indra/llmessage/llpacketring.cpp
+++ b/indra/llmessage/llpacketring.cpp
@@ -225,7 +225,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
else
{
// no delay, pull straight from net
- if (LLProxy::isEnabled())
+ if (LLProxy::isSOCKSProxyEnabled())
{
U8 buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
packet_size = receive_packet(socket, reinterpret_cast<char *>(buffer));
@@ -348,7 +348,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host)
{
- if (!LLProxy::isEnabled())
+ if (!LLProxy::isSOCKSProxyEnabled())
{
return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort());
}
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;
}
}
diff --git a/indra/llmessage/llproxy.h b/indra/llmessage/llproxy.h
index 22954f2733..68c40561c8 100644
--- a/indra/llmessage/llproxy.h
+++ b/indra/llmessage/llproxy.h
@@ -191,7 +191,7 @@ public:
LLSocks5AuthType getSelectedAuthMethod() const;
// static check for enabled status for UDP packets
- static bool isEnabled() { return sUDPProxyEnabled; }
+ static bool isSOCKSProxyEnabled() { return sUDPProxyEnabled; }
// check for enabled status for HTTP packets
// mHTTPProxyEnabled is atomic, so no locking is required for thread safety.