Routine V3 merge.
This commit is contained in:
@@ -162,6 +162,7 @@ void LLMemory::logMemoryInfo(BOOL update)
|
|||||||
if(update)
|
if(update)
|
||||||
{
|
{
|
||||||
updateMemoryInfo() ;
|
updateMemoryInfo() ;
|
||||||
|
LLPrivateMemoryPoolManager::getInstance()->updateStatistics() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ;
|
llinfos << "Current allocated physical memory(KB): " << sAllocatedMemInKB << llendl ;
|
||||||
|
|||||||
@@ -1,31 +1,25 @@
|
|||||||
/**
|
/**
|
||||||
* @file lleconomy.cpp
|
* @file lleconomy.cpp
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -54,6 +48,31 @@ LLGlobalEconomy::LLGlobalEconomy()
|
|||||||
LLGlobalEconomy::~LLGlobalEconomy()
|
LLGlobalEconomy::~LLGlobalEconomy()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
void LLGlobalEconomy::addObserver(LLEconomyObserver* observer)
|
||||||
|
{
|
||||||
|
mObservers.push_back(observer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLGlobalEconomy::removeObserver(LLEconomyObserver* observer)
|
||||||
|
{
|
||||||
|
std::list<LLEconomyObserver*>::iterator it =
|
||||||
|
std::find(mObservers.begin(), mObservers.end(), observer);
|
||||||
|
if (it != mObservers.end())
|
||||||
|
{
|
||||||
|
mObservers.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLGlobalEconomy::notifyObservers()
|
||||||
|
{
|
||||||
|
for (std::list<LLEconomyObserver*>::iterator it = mObservers.begin();
|
||||||
|
it != mObservers.end();
|
||||||
|
++it)
|
||||||
|
{
|
||||||
|
(*it)->onEconomyDataChange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data)
|
void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data)
|
||||||
{
|
{
|
||||||
@@ -94,6 +113,8 @@ void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy*
|
|||||||
econ_data->setTeleportPriceExponent(f);
|
econ_data->setTeleportPriceExponent(f);
|
||||||
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i);
|
msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i);
|
||||||
econ_data->setPriceGroupCreate(i);
|
econ_data->setPriceGroupCreate(i);
|
||||||
|
|
||||||
|
econ_data->notifyObservers();
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const
|
S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const
|
||||||
|
|||||||
@@ -1,31 +1,25 @@
|
|||||||
/**
|
/**
|
||||||
* @file lleconomy.h
|
* @file lleconomy.h
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,6 +31,16 @@
|
|||||||
class LLMessageSystem;
|
class LLMessageSystem;
|
||||||
class LLVector3;
|
class LLVector3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register an observer to be notified of economy data updates coming from server.
|
||||||
|
*/
|
||||||
|
class LLEconomyObserver
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~LLEconomyObserver() {}
|
||||||
|
virtual void onEconomyDataChange() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
class LLGlobalEconomy
|
class LLGlobalEconomy
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -52,6 +56,10 @@ public:
|
|||||||
|
|
||||||
virtual void print();
|
virtual void print();
|
||||||
|
|
||||||
|
void addObserver(LLEconomyObserver* observer);
|
||||||
|
void removeObserver(LLEconomyObserver* observer);
|
||||||
|
void notifyObservers();
|
||||||
|
|
||||||
static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data);
|
static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data);
|
||||||
|
|
||||||
S32 calculateTeleportCost(F32 distance) const;
|
S32 calculateTeleportCost(F32 distance) const;
|
||||||
@@ -95,6 +103,8 @@ private:
|
|||||||
S32 mTeleportMinPrice;
|
S32 mTeleportMinPrice;
|
||||||
F32 mTeleportPriceExponent;
|
F32 mTeleportPriceExponent;
|
||||||
S32 mPriceGroupCreate;
|
S32 mPriceGroupCreate;
|
||||||
|
|
||||||
|
std::list<LLEconomyObserver*> mObservers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,8 +30,8 @@
|
|||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "linden_common.h"
|
||||||
|
|
||||||
#include "llsaleinfo.h"
|
#include "llsaleinfo.h"
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ LLHTTPAssetRequest::LLHTTPAssetRequest(LLHTTPAssetStorage *asp,
|
|||||||
: LLAssetRequest(uuid, type),
|
: LLAssetRequest(uuid, type),
|
||||||
mZInitialized(false)
|
mZInitialized(false)
|
||||||
{
|
{
|
||||||
|
memset(&mZStream, 0, sizeof(mZStream)); // we'll initialize this later, but for now zero the whole C-style struct to avoid debug/coverity noise
|
||||||
mAssetStoragep = asp;
|
mAssetStoragep = asp;
|
||||||
mCurlHandle = NULL;
|
mCurlHandle = NULL;
|
||||||
mCurlMultiHandle = curl_multi;
|
mCurlMultiHandle = curl_multi;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#define LL_HTTPCLIENTADAPTER_H
|
#define LL_HTTPCLIENTADAPTER_H
|
||||||
|
|
||||||
#include "llhttpclientinterface.h"
|
#include "llhttpclientinterface.h"
|
||||||
#include "llmemory.h" // LLSingleton<>
|
#include "llsingleton.h" // LLSingleton<>
|
||||||
|
|
||||||
class LLHTTPClientAdapter : public LLHTTPClientInterface, public LLSingleton<LLHTTPClientAdapter>
|
class LLHTTPClientAdapter : public LLHTTPClientInterface, public LLSingleton<LLHTTPClientAdapter>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-10-05
|
* @date 2005-10-05
|
||||||
* @brief Implementation of the http server classes
|
* @brief Implementation of the http server classes
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2005&license=viewergpl$
|
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2005-2009, Linden Research, Inc.
|
|
||||||
*
|
|
||||||
* Second Life Viewer Source Code
|
* Second Life Viewer Source Code
|
||||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
* Copyright (C) 2010, Linden Research, Inc.
|
||||||
* to you under the terms of the GNU General Public License, version 2.0
|
|
||||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
|
||||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
|
||||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
|
||||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
|
||||||
*
|
*
|
||||||
* There are special exceptions to the terms and conditions of the GPL as
|
* This library is free software; you can redistribute it and/or
|
||||||
* it is applied to this Source Code. View the full text of the exception
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
* License as published by the Free Software Foundation;
|
||||||
* online at
|
* version 2.1 of the License only.
|
||||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge
|
* This library is distributed in the hope that it will be useful,
|
||||||
* that you have read and understood your obligations described above,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* and agree to abide by those obligations.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
* License along with this library; if not, write to the Free Software
|
||||||
* COMPLETENESS OR PERFORMANCE.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||||
* $/LicenseInfo$
|
* $/LicenseInfo$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -972,7 +966,9 @@ private:
|
|||||||
// static
|
// static
|
||||||
LLHTTPNode& LLIOHTTPServer::create(LLPumpIO& pump, U16 port)
|
LLHTTPNode& LLIOHTTPServer::create(LLPumpIO& pump, U16 port)
|
||||||
{
|
{
|
||||||
LLSocket::ptr_t socket = LLSocket::create(LLSocket::STREAM_TCP, port);
|
LLSocket::ptr_t socket = LLSocket::create(
|
||||||
|
LLSocket::STREAM_TCP,
|
||||||
|
port);
|
||||||
if(!socket)
|
if(!socket)
|
||||||
{
|
{
|
||||||
llerrs << "Unable to initialize socket" << llendl;
|
llerrs << "Unable to initialize socket" << llendl;
|
||||||
|
|||||||
@@ -114,11 +114,21 @@ LLSocket::ptr_t LLSocket::create(EType type, U16 port)
|
|||||||
|
|
||||||
if(STREAM_TCP == type)
|
if(STREAM_TCP == type)
|
||||||
{
|
{
|
||||||
status = apr_socket_create(&rv->mSocket, APR_INET, SOCK_STREAM, APR_PROTO_TCP, rv->mPool());
|
status = apr_socket_create(
|
||||||
|
&rv->mSocket,
|
||||||
|
APR_INET,
|
||||||
|
SOCK_STREAM,
|
||||||
|
APR_PROTO_TCP,
|
||||||
|
rv->mPool());
|
||||||
}
|
}
|
||||||
else if(DATAGRAM_UDP == type)
|
else if(DATAGRAM_UDP == type)
|
||||||
{
|
{
|
||||||
status = apr_socket_create(&rv->mSocket, APR_INET, SOCK_DGRAM, APR_PROTO_UDP, rv->mPool());
|
status = apr_socket_create(
|
||||||
|
&rv->mSocket,
|
||||||
|
APR_INET,
|
||||||
|
SOCK_DGRAM,
|
||||||
|
APR_PROTO_UDP,
|
||||||
|
rv->mPool());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -239,15 +239,23 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
|
|||||||
// no delay, pull straight from net
|
// no delay, pull straight from net
|
||||||
if (LLSocks::isEnabled())
|
if (LLSocks::isEnabled())
|
||||||
{
|
{
|
||||||
proxywrap_t * header;
|
const U8 SOCKS_HEADER_SIZE = 10;
|
||||||
datap = datap-10;
|
U8 buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
|
||||||
header = (proxywrap_t *)datap;
|
packet_size = receive_packet(socket, static_cast<char*>(static_cast<void*>(buffer)));
|
||||||
packet_size = receive_packet(socket, datap);
|
|
||||||
mLastSender.setAddress(header->addr);
|
if (packet_size > SOCKS_HEADER_SIZE)
|
||||||
mLastSender.setPort(ntohs(header->port));
|
|
||||||
if (packet_size > 10)
|
|
||||||
{
|
{
|
||||||
packet_size -= 10;
|
// *FIX We are assuming ATYP is 0x01 (IPv4), not 0x03 (hostname) or 0x04 (IPv6)
|
||||||
|
memcpy(datap, buffer + SOCKS_HEADER_SIZE, packet_size - SOCKS_HEADER_SIZE);
|
||||||
|
proxywrap_t * header = static_cast<proxywrap_t*>(static_cast<void*>(buffer));
|
||||||
|
mLastSender.setAddress(header->addr);
|
||||||
|
mLastSender.setPort(ntohs(header->port));
|
||||||
|
|
||||||
|
packet_size -= SOCKS_HEADER_SIZE; // The unwrapped packet size
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
packet_size = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -285,7 +293,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
|
|||||||
|
|
||||||
if (!mUseOutThrottle)
|
if (!mUseOutThrottle)
|
||||||
{
|
{
|
||||||
return doSendPacket(h_socket, send_buffer, buf_size, host );
|
return sendPacketImpl(h_socket, send_buffer, buf_size, host );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -306,7 +314,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
|
|||||||
mOutBufferLength -= packetp->getSize();
|
mOutBufferLength -= packetp->getSize();
|
||||||
packet_size = packetp->getSize();
|
packet_size = packetp->getSize();
|
||||||
|
|
||||||
status = doSendPacket(h_socket, packetp->getData(), packet_size, packetp->getHost());
|
status = sendPacketImpl(h_socket, packetp->getData(), packet_size, packetp->getHost());
|
||||||
|
|
||||||
delete packetp;
|
delete packetp;
|
||||||
// Update the throttle
|
// Update the throttle
|
||||||
@@ -315,7 +323,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the queue's empty, we can just send this packet right away.
|
// If the queue's empty, we can just send this packet right away.
|
||||||
status = doSendPacket(h_socket, send_buffer, buf_size, host );
|
status = sendPacketImpl(h_socket, send_buffer, buf_size, host );
|
||||||
packet_size = buf_size;
|
packet_size = buf_size;
|
||||||
|
|
||||||
// Update the throttle
|
// Update the throttle
|
||||||
@@ -354,7 +362,7 @@ BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LL
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL LLPacketRing::doSendPacket(int h_socket, const char * send_buffer, S32 buf_size, LLHost host)
|
BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!LLSocks::isEnabled())
|
if (!LLSocks::isEnabled())
|
||||||
@@ -362,14 +370,21 @@ BOOL LLPacketRing::doSendPacket(int h_socket, const char * send_buffer, S32 buf_
|
|||||||
return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort());
|
return send_packet(h_socket, send_buffer, buf_size, host.getAddress(), host.getPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
proxywrap_t *socks_header = (proxywrap_t *)&mProxyWrappedSendBuffer;
|
const U8 SOCKS_HEADER_SIZE = 10;
|
||||||
|
char headered_send_buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
|
||||||
|
|
||||||
|
proxywrap_t *socks_header = static_cast<proxywrap_t*>(static_cast<void*>(&headered_send_buffer));
|
||||||
socks_header->rsv = 0;
|
socks_header->rsv = 0;
|
||||||
socks_header->addr = host.getAddress();
|
socks_header->addr = host.getAddress();
|
||||||
socks_header->port = htons(host.getPort());
|
socks_header->port = htons(host.getPort());
|
||||||
socks_header->atype = ADDRESS_IPV4;
|
socks_header->atype = ADDRESS_IPV4;
|
||||||
socks_header->frag = 0;
|
socks_header->frag = 0;
|
||||||
|
|
||||||
memcpy(mProxyWrappedSendBuffer+10, send_buffer, buf_size);
|
memcpy(headered_send_buffer + SOCKS_HEADER_SIZE, send_buffer, buf_size);
|
||||||
|
|
||||||
return send_packet(h_socket,(const char*) mProxyWrappedSendBuffer, buf_size+10, LLSocks::getInstance()->getUDPPproxy().getAddress(), LLSocks::getInstance()->getUDPPproxy().getPort());
|
return send_packet( h_socket,
|
||||||
|
headered_send_buffer,
|
||||||
|
buf_size + SOCKS_HEADER_SIZE,
|
||||||
|
LLSocks::getInstance()->getUDPPproxy().getAddress(),
|
||||||
|
LLSocks::getInstance()->getUDPPproxy().getPort());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ protected:
|
|||||||
LLHost mLastSender;
|
LLHost mLastSender;
|
||||||
LLHost mLastReceivingIF;
|
LLHost mLastReceivingIF;
|
||||||
|
|
||||||
BOOL doSendPacket(int h_socket, const char * send_buffer, S32 buf_size, LLHost host);
|
private:
|
||||||
U8 mProxyWrappedSendBuffer[NET_BUFFER_SIZE];
|
BOOL sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -297,9 +297,10 @@ S32 getElementSize(const LLSD& llsd)
|
|||||||
case LLSD::TypeMap:
|
case LLSD::TypeMap:
|
||||||
case LLSD::TypeArray:
|
case LLSD::TypeArray:
|
||||||
case LLSD::TypeUndefined:
|
case LLSD::TypeUndefined:
|
||||||
|
default: // TypeLLSDTypeEnd, TypeLLSDNumTypes, etc.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//virtual
|
//virtual
|
||||||
|
|||||||
@@ -556,11 +556,11 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count, bool faked_message, U8 fak
|
|||||||
S32 acks = 0;
|
S32 acks = 0;
|
||||||
S32 true_rcv_size = 0;
|
S32 true_rcv_size = 0;
|
||||||
|
|
||||||
U8* buffer = mTrueReceiveBuffer.buffer;
|
U8* buffer = mTrueReceiveBuffer;
|
||||||
|
|
||||||
if(!faked_message)
|
if(!faked_message)
|
||||||
{
|
{
|
||||||
mTrueReceiveSize = mPacketRing.receivePacket(mSocket, (char *)mTrueReceiveBuffer.buffer);
|
mTrueReceiveSize = mPacketRing.receivePacket(mSocket, (char *)mTrueReceiveBuffer);
|
||||||
receive_size = mTrueReceiveSize;
|
receive_size = mTrueReceiveSize;
|
||||||
mLastSender = mPacketRing.getLastSender();
|
mLastSender = mPacketRing.getLastSender();
|
||||||
mLastReceivingIF = mPacketRing.getLastReceivingInterface();
|
mLastReceivingIF = mPacketRing.getLastReceivingInterface();
|
||||||
@@ -635,7 +635,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count, bool faked_message, U8 fak
|
|||||||
for(S32 i = 0; i < acks; ++i)
|
for(S32 i = 0; i < acks; ++i)
|
||||||
{
|
{
|
||||||
true_rcv_size -= sizeof(TPACKETID);
|
true_rcv_size -= sizeof(TPACKETID);
|
||||||
memcpy(&mem_id, &buffer[true_rcv_size], /* Flawfinder: ignore*/
|
memcpy(&mem_id, &mTrueReceiveBuffer[true_rcv_size], /* Flawfinder: ignore*/
|
||||||
sizeof(TPACKETID));
|
sizeof(TPACKETID));
|
||||||
packet_id = ntohl(mem_id);
|
packet_id = ntohl(mem_id);
|
||||||
//LL_INFOS("Messaging") << "got ack: " << packet_id << llendl;
|
//LL_INFOS("Messaging") << "got ack: " << packet_id << llendl;
|
||||||
@@ -3405,7 +3405,7 @@ void LLMessageSystem::dumpPacketToLog()
|
|||||||
{
|
{
|
||||||
S32 offset = cur_line_pos * 3;
|
S32 offset = cur_line_pos * 3;
|
||||||
snprintf(line_buffer + offset, sizeof(line_buffer) - offset,
|
snprintf(line_buffer + offset, sizeof(line_buffer) - offset,
|
||||||
"%02x ", mTrueReceiveBuffer.buffer[i]); /* Flawfinder: ignore */
|
"%02x ", mTrueReceiveBuffer[i]); /* Flawfinder: ignore */
|
||||||
cur_line_pos++;
|
cur_line_pos++;
|
||||||
if (cur_line_pos >= 16)
|
if (cur_line_pos >= 16)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -778,18 +778,7 @@ private:
|
|||||||
LLMessagePollInfo *mPollInfop;
|
LLMessagePollInfo *mPollInfop;
|
||||||
|
|
||||||
U8 mEncodedRecvBuffer[MAX_BUFFER_SIZE];
|
U8 mEncodedRecvBuffer[MAX_BUFFER_SIZE];
|
||||||
|
U8 mTrueReceiveBuffer[MAX_BUFFER_SIZE];
|
||||||
// Push current alignment to stack and set alignment to 1 byte boundary
|
|
||||||
#pragma pack(push,1)
|
|
||||||
|
|
||||||
struct ReceiveBuffer_t
|
|
||||||
{
|
|
||||||
proxywrap_t header;
|
|
||||||
U8 buffer[MAX_BUFFER_SIZE];
|
|
||||||
} mTrueReceiveBuffer;
|
|
||||||
|
|
||||||
#pragma pack(pop) /* restore original alignment from stack */
|
|
||||||
|
|
||||||
S32 mTrueReceiveSize;
|
S32 mTrueReceiveSize;
|
||||||
|
|
||||||
// Must be valid during decode
|
// Must be valid during decode
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#include "llhudtext.h"
|
#include "llhudtext.h"
|
||||||
#include "llhudicon.h"
|
#include "llhudicon.h"
|
||||||
#include "llinventory.h"
|
#include "llinventory.h"
|
||||||
#include "llmemory.h"
|
#include "llrefcount.h"
|
||||||
#include "llmemtype.h"
|
#include "llmemtype.h"
|
||||||
#include "llprimitive.h"
|
#include "llprimitive.h"
|
||||||
#include "lluuid.h"
|
#include "lluuid.h"
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
#include "v3dmath.h"
|
#include "v3dmath.h"
|
||||||
#include "v3math.h"
|
#include "v3math.h"
|
||||||
#include "llvertexbuffer.h"
|
#include "llvertexbuffer.h"
|
||||||
|
#include "llbbox.h"
|
||||||
|
|
||||||
class LLAgent; // TODO: Get rid of this.
|
class LLAgent; // TODO: Get rid of this.
|
||||||
class LLAudioSource;
|
class LLAudioSource;
|
||||||
|
|||||||
Reference in New Issue
Block a user