Wholesale update of llmessage to V3.2
Note that this removes message logger for now.
This commit is contained in:
@@ -115,7 +115,7 @@ void LLQueuedThread::shutdown()
|
|||||||
|
|
||||||
// MAIN THREAD
|
// MAIN THREAD
|
||||||
// virtual
|
// virtual
|
||||||
S32 LLQueuedThread::update(U32 max_time_ms)
|
S32 LLQueuedThread::update(F32 max_time_ms)
|
||||||
{
|
{
|
||||||
if (!mStarted)
|
if (!mStarted)
|
||||||
{
|
{
|
||||||
@@ -128,7 +128,7 @@ S32 LLQueuedThread::update(U32 max_time_ms)
|
|||||||
return updateQueue(max_time_ms);
|
return updateQueue(max_time_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 LLQueuedThread::updateQueue(U32 max_time_ms)
|
S32 LLQueuedThread::updateQueue(F32 max_time_ms)
|
||||||
{
|
{
|
||||||
F64 max_time = (F64)max_time_ms * .001;
|
F64 max_time = (F64)max_time_ms * .001;
|
||||||
LLTimer timer;
|
LLTimer timer;
|
||||||
|
|||||||
@@ -178,8 +178,8 @@ protected:
|
|||||||
public:
|
public:
|
||||||
bool waitForResult(handle_t handle, bool auto_complete = true);
|
bool waitForResult(handle_t handle, bool auto_complete = true);
|
||||||
|
|
||||||
virtual S32 update(U32 max_time_ms);
|
virtual S32 update(F32 max_time_ms);
|
||||||
S32 updateQueue(U32 max_time_ms);
|
S32 updateQueue(F32 max_time_ms);
|
||||||
|
|
||||||
void waitOnPending();
|
void waitOnPending();
|
||||||
void printQueueStats();
|
void printQueueStats();
|
||||||
|
|||||||
@@ -434,6 +434,15 @@ void LLMutexBase::unlock()
|
|||||||
|
|
||||||
apr_thread_mutex_unlock(mAPRMutexp);
|
apr_thread_mutex_unlock(mAPRMutexp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LLMutexBase::isSelfLocked()
|
||||||
|
{
|
||||||
|
#if LL_DARWIN
|
||||||
|
return mLockingThread == LLThread::currentID();
|
||||||
|
#else
|
||||||
|
return mLockingThread == local_thread_ID;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ public:
|
|||||||
// non-blocking, but does do a lock/unlock so not free
|
// non-blocking, but does do a lock/unlock so not free
|
||||||
bool isLocked() { bool is_not_locked = tryLock(); if (is_not_locked) unlock(); return !is_not_locked; }
|
bool isLocked() { bool is_not_locked = tryLock(); if (is_not_locked) unlock(); return !is_not_locked; }
|
||||||
// get ID of locking thread
|
// get ID of locking thread
|
||||||
|
bool isSelfLocked(); //return true if locked in a same thread
|
||||||
U32 lockingThread() const { return mLockingThread; }
|
U32 lockingThread() const { return mLockingThread; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -269,11 +270,11 @@ public:
|
|||||||
LLMutexLock(LLMutexBase* mutex)
|
LLMutexLock(LLMutexBase* mutex)
|
||||||
{
|
{
|
||||||
mMutex = mutex;
|
mMutex = mutex;
|
||||||
mMutex->lock();
|
if(mMutex) mMutex->lock();
|
||||||
}
|
}
|
||||||
~LLMutexLock()
|
~LLMutexLock()
|
||||||
{
|
{
|
||||||
mMutex->unlock();
|
if(mMutex) mMutex->unlock();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
LLMutexBase* mMutex;
|
LLMutexBase* mMutex;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ void LLWorkerThread::clearDeleteList()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
S32 LLWorkerThread::update(U32 max_time_ms)
|
S32 LLWorkerThread::update(F32 max_time_ms)
|
||||||
{
|
{
|
||||||
S32 res = LLQueuedThread::update(max_time_ms);
|
S32 res = LLQueuedThread::update(max_time_ms);
|
||||||
// Delete scheduled workers
|
// Delete scheduled workers
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public:
|
|||||||
LLWorkerThread(const std::string& name, bool threaded = true, bool should_pause = false);
|
LLWorkerThread(const std::string& name, bool threaded = true, bool should_pause = false);
|
||||||
~LLWorkerThread();
|
~LLWorkerThread();
|
||||||
|
|
||||||
/*virtual*/ S32 update(U32 max_time_ms);
|
/*virtual*/ S32 update(F32 max_time_ms);
|
||||||
|
|
||||||
handle_t addWorkRequest(LLWorkerClass* workerclass, S32 param, U32 priority = PRIORITY_NORMAL);
|
handle_t addWorkRequest(LLWorkerClass* workerclass, S32 param, U32 priority = PRIORITY_NORMAL);
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ LLImageDecodeThread::~LLImageDecodeThread()
|
|||||||
|
|
||||||
// MAIN THREAD
|
// MAIN THREAD
|
||||||
// virtual
|
// virtual
|
||||||
S32 LLImageDecodeThread::update(U32 max_time_ms)
|
S32 LLImageDecodeThread::update(F32 max_time_ms)
|
||||||
{
|
{
|
||||||
LLMutexLock lock(&mCreationMutex);
|
LLMutexLock lock(&mCreationMutex);
|
||||||
for (creation_list_t::iterator iter = mCreationList.begin();
|
for (creation_list_t::iterator iter = mCreationList.begin();
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
handle_t decodeImage(LLImageFormatted* image,
|
handle_t decodeImage(LLImageFormatted* image,
|
||||||
U32 priority, S32 discard, BOOL needs_aux,
|
U32 priority, S32 discard, BOOL needs_aux,
|
||||||
Responder* responder);
|
Responder* responder);
|
||||||
S32 update(U32 max_time_ms);
|
S32 update(F32 max_time_ms);
|
||||||
|
|
||||||
// Used by unit tests to check the consistency of the thread instance
|
// Used by unit tests to check the consistency of the thread instance
|
||||||
S32 tut_size();
|
S32 tut_size();
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ include(LLCommon)
|
|||||||
include(LLMath)
|
include(LLMath)
|
||||||
include(LLMessage)
|
include(LLMessage)
|
||||||
include(LLVFS)
|
include(LLVFS)
|
||||||
include(LLAddBuildTest)
|
|
||||||
include(Tut)
|
|
||||||
|
|
||||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
@@ -21,6 +19,7 @@ include_directories(
|
|||||||
|
|
||||||
set(llmessage_SOURCE_FILES
|
set(llmessage_SOURCE_FILES
|
||||||
llares.cpp
|
llares.cpp
|
||||||
|
llareslistener.cpp
|
||||||
llassetstorage.cpp
|
llassetstorage.cpp
|
||||||
llavatarnamecache.cpp
|
llavatarnamecache.cpp
|
||||||
llblowfishcipher.cpp
|
llblowfishcipher.cpp
|
||||||
@@ -49,7 +48,6 @@ set(llmessage_SOURCE_FILES
|
|||||||
llmail.cpp
|
llmail.cpp
|
||||||
llmessagebuilder.cpp
|
llmessagebuilder.cpp
|
||||||
llmessageconfig.cpp
|
llmessageconfig.cpp
|
||||||
llmessagelog.cpp
|
|
||||||
llmessagereader.cpp
|
llmessagereader.cpp
|
||||||
llmessagetemplate.cpp
|
llmessagetemplate.cpp
|
||||||
llmessagetemplateparser.cpp
|
llmessagetemplateparser.cpp
|
||||||
@@ -61,6 +59,7 @@ set(llmessage_SOURCE_FILES
|
|||||||
llpacketbuffer.cpp
|
llpacketbuffer.cpp
|
||||||
llpacketring.cpp
|
llpacketring.cpp
|
||||||
llpartdata.cpp
|
llpartdata.cpp
|
||||||
|
llproxy.cpp
|
||||||
llpumpio.cpp
|
llpumpio.cpp
|
||||||
llregionpresenceverifier.cpp
|
llregionpresenceverifier.cpp
|
||||||
llsdappservices.cpp
|
llsdappservices.cpp
|
||||||
@@ -100,7 +99,6 @@ set(llmessage_SOURCE_FILES
|
|||||||
patch_code.cpp
|
patch_code.cpp
|
||||||
patch_dct.cpp
|
patch_dct.cpp
|
||||||
patch_idct.cpp
|
patch_idct.cpp
|
||||||
llsocks5.cpp
|
|
||||||
sound_ids.cpp
|
sound_ids.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -108,6 +106,7 @@ set(llmessage_HEADER_FILES
|
|||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
|
|
||||||
llares.h
|
llares.h
|
||||||
|
llareslistener.h
|
||||||
llassetstorage.h
|
llassetstorage.h
|
||||||
llavatarnamecache.h
|
llavatarnamecache.h
|
||||||
llblowfishcipher.h
|
llblowfishcipher.h
|
||||||
@@ -144,7 +143,6 @@ set(llmessage_HEADER_FILES
|
|||||||
llmail.h
|
llmail.h
|
||||||
llmessagebuilder.h
|
llmessagebuilder.h
|
||||||
llmessageconfig.h
|
llmessageconfig.h
|
||||||
llmessagelog.h
|
|
||||||
llmessagereader.h
|
llmessagereader.h
|
||||||
llmessagetemplate.h
|
llmessagetemplate.h
|
||||||
llmessagetemplateparser.h
|
llmessagetemplateparser.h
|
||||||
@@ -158,6 +156,7 @@ set(llmessage_HEADER_FILES
|
|||||||
llpacketring.h
|
llpacketring.h
|
||||||
llpartdata.h
|
llpartdata.h
|
||||||
llpumpio.h
|
llpumpio.h
|
||||||
|
llproxy.h
|
||||||
llqueryflags.h
|
llqueryflags.h
|
||||||
llregionflags.h
|
llregionflags.h
|
||||||
llregionhandle.h
|
llregionhandle.h
|
||||||
@@ -202,7 +201,6 @@ set(llmessage_HEADER_FILES
|
|||||||
patch_code.h
|
patch_code.h
|
||||||
patch_dct.h
|
patch_dct.h
|
||||||
sound_ids.h
|
sound_ids.h
|
||||||
llsocks5.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(${llmessage_HEADER_FILES}
|
set_source_files_properties(${llmessage_HEADER_FILES}
|
||||||
@@ -213,21 +211,52 @@ list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES})
|
|||||||
add_library (llmessage ${llmessage_SOURCE_FILES})
|
add_library (llmessage ${llmessage_SOURCE_FILES})
|
||||||
add_dependencies(llmessage prepare)
|
add_dependencies(llmessage prepare)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
llmessage
|
llmessage
|
||||||
${CURL_LIBRARIES}
|
${CURL_LIBRARIES}
|
||||||
${CARES_LIBRARIES}
|
${CARES_LIBRARIES}
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${CRYPTO_LIBRARIES}
|
${CRYPTO_LIBRARIES}
|
||||||
${XMLRPCEPI_LIBRARIES}
|
${XMLRPCEPI_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
|
# tests
|
||||||
|
if (LL_TESTS)
|
||||||
|
include(GoogleMock)
|
||||||
|
include(LLAddBuildTest)
|
||||||
|
include(Python)
|
||||||
|
include(Tut)
|
||||||
|
|
||||||
|
SET(llmessage_TEST_SOURCE_FILES
|
||||||
|
# llhttpclientadapter.cpp
|
||||||
|
llmime.cpp
|
||||||
|
llnamevalue.cpp
|
||||||
|
lltrustedmessageservice.cpp
|
||||||
|
lltemplatemessagedispatcher.cpp
|
||||||
|
llregionpresenceverifier.cpp
|
||||||
|
)
|
||||||
|
LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
|
||||||
|
|
||||||
|
# set(TEST_DEBUG on)
|
||||||
|
set(test_libs
|
||||||
|
${LLMESSAGE_LIBRARIES}
|
||||||
|
${WINDOWS_LIBRARIES}
|
||||||
|
${LLVFS_LIBRARIES}
|
||||||
|
${LLMATH_LIBRARIES}
|
||||||
|
${LLCOMMON_LIBRARIES}
|
||||||
|
${GOOGLEMOCK_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (LL_TESTS)
|
LL_ADD_INTEGRATION_TEST(
|
||||||
# When building the viewer the tests links against the shared objects.
|
llsdmessage
|
||||||
# These can not be found when we try to run the tests, so we had to disable them, for the viewer build.
|
"llsdmessage.cpp"
|
||||||
# TODO: Can someone with viewer knowledge figure out how to make these find the correct so.
|
"${test_libs}"
|
||||||
#ADD_BUILD_TEST(llhttpclientadapter llmessage)
|
${PYTHON_EXECUTABLE}
|
||||||
ADD_BUILD_TEST(llhttpclientadapter llmessage)
|
"${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py"
|
||||||
ADD_BUILD_TEST(lltrustedmessageservice llmessage)
|
)
|
||||||
ADD_BUILD_TEST(lltemplatemessagedispatcher llmessage)
|
|
||||||
ENDIF (LL_TESTS)
|
LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}")
|
||||||
|
LL_ADD_INTEGRATION_TEST(llhost "" "${test_libs}")
|
||||||
|
LL_ADD_INTEGRATION_TEST(llpartdata "" "${test_libs}")
|
||||||
|
LL_ADD_INTEGRATION_TEST(llxfer_file "" "${test_libs}")
|
||||||
|
endif (LL_TESTS)
|
||||||
|
|
||||||
|
|||||||
@@ -4,36 +4,29 @@
|
|||||||
* @date 2007-08-15
|
* @date 2007-08-15
|
||||||
* @brief Wrapper for asynchronous DNS lookups.
|
* @brief Wrapper for asynchronous DNS lookups.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
#define CARES_STATICLIB
|
|
||||||
#include "llares.h"
|
#include "llares.h"
|
||||||
#include "llscopedvolatileaprpool.h"
|
#include "llscopedvolatileaprpool.h"
|
||||||
|
|
||||||
@@ -45,9 +38,11 @@
|
|||||||
#include "apr_poll.h"
|
#include "apr_poll.h"
|
||||||
|
|
||||||
#include "llapr.h"
|
#include "llapr.h"
|
||||||
|
#include "llareslistener.h"
|
||||||
|
#include "llscopedvolatileaprpool.h"
|
||||||
|
|
||||||
#if defined(LL_WINDOWS)
|
#if defined(LL_WINDOWS)
|
||||||
|
#pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally
|
||||||
# define ns_c_in 1
|
# define ns_c_in 1
|
||||||
# define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
# define NS_HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
||||||
# define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
# define NS_QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
||||||
@@ -105,9 +100,11 @@ void LLAres::QueryResponder::queryError(int code)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LLAres::LLAres() :
|
LLAres::LLAres() :
|
||||||
chan_(NULL), mInitSuccess(false)
|
chan_(NULL),
|
||||||
|
mInitSuccess(false),
|
||||||
|
mListener(new LLAresListener(this))
|
||||||
{
|
{
|
||||||
if (ares_library_init(ARES_LIB_INIT_ALL) != ARES_SUCCESS ||
|
if (ares_library_init( ARES_LIB_INIT_ALL ) != ARES_SUCCESS ||
|
||||||
ares_init(&chan_) != ARES_SUCCESS)
|
ares_init(&chan_) != ARES_SUCCESS)
|
||||||
{
|
{
|
||||||
llwarns << "Could not succesfully initialize ares!" << llendl;
|
llwarns << "Could not succesfully initialize ares!" << llendl;
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2007-08-15
|
* @date 2007-08-15
|
||||||
* @brief Wrapper for asynchronous DNS lookups.
|
* @brief Wrapper for asynchronous DNS lookups.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -55,7 +49,10 @@
|
|||||||
#include "llrefcount.h"
|
#include "llrefcount.h"
|
||||||
#include "lluri.h"
|
#include "lluri.h"
|
||||||
|
|
||||||
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
class LLQueryResponder;
|
class LLQueryResponder;
|
||||||
|
class LLAresListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Supported DNS RR types.
|
* @brief Supported DNS RR types.
|
||||||
@@ -450,6 +447,9 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
ares_channel chan_;
|
ares_channel chan_;
|
||||||
bool mInitSuccess;
|
bool mInitSuccess;
|
||||||
|
// boost::scoped_ptr would actually fit the requirement better, but it
|
||||||
|
// can't handle incomplete types as boost::shared_ptr can.
|
||||||
|
boost::shared_ptr<LLAresListener> mListener;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llassetstorage.cpp
|
* @file llassetstorage.cpp
|
||||||
* @brief Implementation of the base asset storage system.
|
* @brief Implementation of the base asset storage system.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -155,8 +149,8 @@ void LLAssetInfo::setFromNameValue( const LLNameValue& nv )
|
|||||||
setName( buf );
|
setName( buf );
|
||||||
buf.assign( str, pos2, std::string::npos );
|
buf.assign( str, pos2, std::string::npos );
|
||||||
setDescription( buf );
|
setDescription( buf );
|
||||||
llinfos << "uuid: " << mUuid << llendl;
|
LL_DEBUGS("AssetStorage") << "uuid: " << mUuid << llendl;
|
||||||
llinfos << "creator: " << mCreatorID << llendl;
|
LL_DEBUGS("AssetStorage") << "creator: " << mCreatorID << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
@@ -440,9 +434,9 @@ bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAsse
|
|||||||
// IW - uuid is passed by value to avoid side effects, please don't re-add &
|
// IW - uuid is passed by value to avoid side effects, please don't re-add &
|
||||||
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, BOOL is_priority)
|
void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, BOOL is_priority)
|
||||||
{
|
{
|
||||||
lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
|
LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl;
|
||||||
|
|
||||||
llinfos << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
|
LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
|
||||||
|
|
||||||
if (user_data)
|
if (user_data)
|
||||||
{
|
{
|
||||||
@@ -452,7 +446,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
|||||||
|
|
||||||
if (mShutDown)
|
if (mShutDown)
|
||||||
{
|
{
|
||||||
llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
|
LL_DEBUGS("AssetStorage") << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
|
||||||
|
|
||||||
if (callback)
|
if (callback)
|
||||||
{
|
{
|
||||||
@@ -470,7 +464,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <edit> */
|
/* <edit> */
|
||||||
if(std::find(mBlackListedAsset.begin(),mBlackListedAsset.end(),uuid) != mBlackListedAsset.end())
|
if(std::find(mBlackListedAsset.begin(),mBlackListedAsset.end(),uuid) != mBlackListedAsset.end())
|
||||||
{
|
{
|
||||||
@@ -482,15 +476,14 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* </edit> */
|
/* </edit> */
|
||||||
|
|
||||||
// Try static VFS first.
|
// Try static VFS first.
|
||||||
if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data))
|
if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data))
|
||||||
{
|
{
|
||||||
llinfos << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl;
|
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in static VFS" << llendl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL exists = mVFS->getExists(uuid, type);
|
BOOL exists = mVFS->getExists(uuid, type);
|
||||||
LLVFile file(mVFS, uuid, type);
|
LLVFile file(mVFS, uuid, type);
|
||||||
U32 size = exists ? file.getSize() : 0;
|
U32 size = exists ? file.getSize() : 0;
|
||||||
@@ -505,7 +498,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
|||||||
callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
|
callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
|
||||||
}
|
}
|
||||||
|
|
||||||
llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
|
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -539,7 +532,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
|
|||||||
}
|
}
|
||||||
if (duplicate)
|
if (duplicate)
|
||||||
{
|
{
|
||||||
llinfos << "Adding additional non-duplicate request for asset " << uuid
|
LL_DEBUGS("AssetStorage") << "Adding additional non-duplicate request for asset " << uuid
|
||||||
<< "." << LLAssetType::lookup(type) << llendl;
|
<< "." << LLAssetType::lookup(type) << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,9 +596,9 @@ void LLAssetStorage::downloadCompleteCallback(
|
|||||||
LLAssetType::EType file_type,
|
LLAssetType::EType file_type,
|
||||||
void* user_data, LLExtStat ext_status)
|
void* user_data, LLExtStat ext_status)
|
||||||
{
|
{
|
||||||
llinfos << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl;
|
LL_DEBUGS("AssetStorage") << "ASSET_TRACE asset " << file_id << " downloadCompleteCallback" << llendl;
|
||||||
|
|
||||||
lldebugs << "LLAssetStorage::downloadCompleteCallback() for " << file_id
|
LL_DEBUGS("AssetStorage") << "LLAssetStorage::downloadCompleteCallback() for " << file_id
|
||||||
<< "," << LLAssetType::lookup(file_type) << llendl;
|
<< "," << LLAssetType::lookup(file_type) << llendl;
|
||||||
LLAssetRequest* req = (LLAssetRequest*)user_data;
|
LLAssetRequest* req = (LLAssetRequest*)user_data;
|
||||||
if(!req)
|
if(!req)
|
||||||
@@ -750,7 +743,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen
|
|||||||
tpvf.setAsset(asset_id, atype);
|
tpvf.setAsset(asset_id, atype);
|
||||||
tpvf.setCallback(downloadEstateAssetCompleteCallback, req);
|
tpvf.setCallback(downloadEstateAssetCompleteCallback, req);
|
||||||
|
|
||||||
llinfos << "Starting transfer for " << asset_id << llendl;
|
LL_DEBUGS("AssetStorage") << "Starting transfer for " << asset_id << llendl;
|
||||||
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
|
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
|
||||||
ttcp->requestTransfer(spe, tpvf, 100.f + (is_priority ? 1.f : 0.f));
|
ttcp->requestTransfer(spe, tpvf, 100.f + (is_priority ? 1.f : 0.f));
|
||||||
}
|
}
|
||||||
@@ -890,7 +883,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age
|
|||||||
tpvf.setAsset(asset_id, atype);
|
tpvf.setAsset(asset_id, atype);
|
||||||
tpvf.setCallback(downloadInvItemCompleteCallback, req);
|
tpvf.setCallback(downloadInvItemCompleteCallback, req);
|
||||||
|
|
||||||
llinfos << "Starting transfer for inventory asset "
|
LL_DEBUGS("AssetStorage") << "Starting transfer for inventory asset "
|
||||||
<< item_id << " owned by " << owner_id << "," << task_id
|
<< item_id << " owned by " << owner_id << "," << task_id
|
||||||
<< llendl;
|
<< llendl;
|
||||||
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
|
LLTransferTargetChannel *ttcp = gTransferManager.getTargetChannel(source_host, LLTCT_ASSET);
|
||||||
@@ -1230,7 +1223,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
|
|||||||
request_list_t* requests = getRequestList(rt);
|
request_list_t* requests = getRequestList(rt);
|
||||||
if (deletePendingRequestImpl(requests, asset_type, asset_id))
|
if (deletePendingRequestImpl(requests, asset_type, asset_id))
|
||||||
{
|
{
|
||||||
llinfos << "Asset " << getRequestName(rt) << " request for "
|
LL_DEBUGS("AssetStorage") << "Asset " << getRequestName(rt) << " request for "
|
||||||
<< asset_id << "." << LLAssetType::lookup(asset_type)
|
<< asset_id << "." << LLAssetType::lookup(asset_type)
|
||||||
<< " removed from pending queue." << llendl;
|
<< " removed from pending queue." << llendl;
|
||||||
return true;
|
return true;
|
||||||
@@ -1326,7 +1319,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo
|
|||||||
user_data == ((LLLegacyAssetRequest *)tmp->mUserData)->mUserData)
|
user_data == ((LLLegacyAssetRequest *)tmp->mUserData)->mUserData)
|
||||||
{
|
{
|
||||||
// this is a duplicate from the same subsystem - throw it away
|
// this is a duplicate from the same subsystem - throw it away
|
||||||
llinfos << "Discarding duplicate request for UUID " << uuid << llendl;
|
LL_DEBUGS("AssetStorage") << "Discarding duplicate request for UUID " << uuid << llendl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1509,7 +1502,7 @@ void LLAssetStorage::reportMetric( const LLUUID& asset_id, const LLAssetType::ET
|
|||||||
{
|
{
|
||||||
if( !metric_recipient )
|
if( !metric_recipient )
|
||||||
{
|
{
|
||||||
llinfos << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl;
|
LL_DEBUGS("AssetStorage") << "Couldn't store LLAssetStoreage::reportMetric - no metrics_recipient" << llendl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief definition of LLAssetStorage class which allows simple
|
* @brief definition of LLAssetStorage class which allows simple
|
||||||
* up/downloads of uuid,type asets
|
* up/downloads of uuid,type asets
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -262,7 +256,7 @@ public:
|
|||||||
// note that your callback may get called BEFORE the function returns
|
// note that your callback may get called BEFORE the function returns
|
||||||
|
|
||||||
virtual void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE);
|
virtual void getAssetData(const LLUUID uuid, LLAssetType::EType atype, LLGetAssetCallback cb, void *user_data, BOOL is_priority = FALSE);
|
||||||
|
|
||||||
std::vector<LLUUID> mBlackListedAsset;
|
std::vector<LLUUID> mBlackListedAsset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llblowfishcipher.cpp
|
* @file llblowfishcipher.cpp
|
||||||
* @brief Wrapper around OpenSSL Blowfish encryption algorithm.
|
* @brief Wrapper around OpenSSL Blowfish encryption algorithm.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -5,31 +5,25 @@
|
|||||||
* two UUIDs and a timestamp (16x2 + 4 = 36 bytes) with only 40 bytes of
|
* two UUIDs and a timestamp (16x2 + 4 = 36 bytes) with only 40 bytes of
|
||||||
* output. AES has a block size of 32 bytes, so this would require 64 bytes.
|
* output. AES has a block size of 32 bytes, so this would require 64 bytes.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-09-20
|
* @date 2005-09-20
|
||||||
* @brief Implementation of the segments, buffers, and buffer arrays.
|
* @brief Implementation of the segments, buffers, and buffer arrays.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,7 +32,9 @@
|
|||||||
#include "llmath.h"
|
#include "llmath.h"
|
||||||
#include "llmemtype.h"
|
#include "llmemtype.h"
|
||||||
#include "llstl.h"
|
#include "llstl.h"
|
||||||
#include <iterator> //VS2010
|
#include "llthread.h"
|
||||||
|
|
||||||
|
#define ASSERT_LLBUFFERARRAY_MUTEX_LOCKED llassert(!mMutexp || mMutexp->isSelfLocked());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LLSegment
|
* LLSegment
|
||||||
@@ -231,7 +227,8 @@ void LLHeapBuffer::allocate(S32 size)
|
|||||||
* LLBufferArray
|
* LLBufferArray
|
||||||
*/
|
*/
|
||||||
LLBufferArray::LLBufferArray() :
|
LLBufferArray::LLBufferArray() :
|
||||||
mNextBaseChannel(0)
|
mNextBaseChannel(0),
|
||||||
|
mMutexp(NULL)
|
||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
}
|
}
|
||||||
@@ -240,6 +237,8 @@ LLBufferArray::~LLBufferArray()
|
|||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
|
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
|
||||||
|
|
||||||
|
delete mMutexp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
@@ -250,14 +249,57 @@ LLChannelDescriptors LLBufferArray::makeChannelConsumer(
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLBufferArray::lock()
|
||||||
|
{
|
||||||
|
if(mMutexp)
|
||||||
|
{
|
||||||
|
mMutexp->lock() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLBufferArray::unlock()
|
||||||
|
{
|
||||||
|
if(mMutexp)
|
||||||
|
{
|
||||||
|
mMutexp->unlock() ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LLMutex* LLBufferArray::getMutex()
|
||||||
|
{
|
||||||
|
return mMutexp ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLBufferArray::setThreaded(bool threaded)
|
||||||
|
{
|
||||||
|
if(threaded)
|
||||||
|
{
|
||||||
|
if(!mMutexp)
|
||||||
|
{
|
||||||
|
mMutexp = new LLMutex();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(mMutexp)
|
||||||
|
{
|
||||||
|
delete mMutexp ;
|
||||||
|
mMutexp = NULL ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LLChannelDescriptors LLBufferArray::nextChannel()
|
LLChannelDescriptors LLBufferArray::nextChannel()
|
||||||
{
|
{
|
||||||
LLChannelDescriptors rv(mNextBaseChannel++);
|
LLChannelDescriptors rv(mNextBaseChannel++);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
S32 LLBufferArray::capacity() const
|
S32 LLBufferArray::capacity() const
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
|
|
||||||
S32 total = 0;
|
S32 total = 0;
|
||||||
const_buffer_iterator_t iter = mBuffers.begin();
|
const_buffer_iterator_t iter = mBuffers.begin();
|
||||||
const_buffer_iterator_t end = mBuffers.end();
|
const_buffer_iterator_t end = mBuffers.end();
|
||||||
@@ -270,6 +312,8 @@ S32 LLBufferArray::capacity() const
|
|||||||
|
|
||||||
bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
|
bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
|
||||||
{
|
{
|
||||||
|
LLMutexLock lock(mMutexp) ;
|
||||||
|
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
std::vector<LLSegment> segments;
|
std::vector<LLSegment> segments;
|
||||||
if(copyIntoBuffers(channel, src, len, segments))
|
if(copyIntoBuffers(channel, src, len, segments))
|
||||||
@@ -280,8 +324,11 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
|
bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
|
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
std::vector<LLSegment> segments;
|
std::vector<LLSegment> segments;
|
||||||
if(copyIntoBuffers(channel, src, len, segments))
|
if(copyIntoBuffers(channel, src, len, segments))
|
||||||
@@ -300,6 +347,8 @@ bool LLBufferArray::insertAfter(
|
|||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
std::vector<LLSegment> segments;
|
std::vector<LLSegment> segments;
|
||||||
|
|
||||||
|
LLMutexLock lock(mMutexp) ;
|
||||||
if(mSegments.end() != segment)
|
if(mSegments.end() != segment)
|
||||||
{
|
{
|
||||||
++segment;
|
++segment;
|
||||||
@@ -312,8 +361,11 @@ bool LLBufferArray::insertAfter(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
|
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
segment_iterator_t end = mSegments.end();
|
segment_iterator_t end = mSegments.end();
|
||||||
segment_iterator_t it = getSegment(address);
|
segment_iterator_t it = getSegment(address);
|
||||||
@@ -342,20 +394,26 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::segment_iterator_t LLBufferArray::beginSegment()
|
LLBufferArray::segment_iterator_t LLBufferArray::beginSegment()
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
return mSegments.begin();
|
return mSegments.begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::segment_iterator_t LLBufferArray::endSegment()
|
LLBufferArray::segment_iterator_t LLBufferArray::endSegment()
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
return mSegments.end();
|
return mSegments.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
||||||
U8* address,
|
U8* address,
|
||||||
LLSegment& segment)
|
LLSegment& segment)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
segment_iterator_t rv = mSegments.begin();
|
segment_iterator_t rv = mSegments.begin();
|
||||||
segment_iterator_t end = mSegments.end();
|
segment_iterator_t end = mSegments.end();
|
||||||
@@ -402,8 +460,10 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address)
|
LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
segment_iterator_t end = mSegments.end();
|
segment_iterator_t end = mSegments.end();
|
||||||
if(!address)
|
if(!address)
|
||||||
{
|
{
|
||||||
@@ -421,9 +481,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::getSegment(U8* address)
|
|||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::const_segment_iterator_t LLBufferArray::getSegment(
|
LLBufferArray::const_segment_iterator_t LLBufferArray::getSegment(
|
||||||
U8* address) const
|
U8* address) const
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
const_segment_iterator_t end = mSegments.end();
|
const_segment_iterator_t end = mSegments.end();
|
||||||
if(!address)
|
if(!address)
|
||||||
{
|
{
|
||||||
@@ -473,6 +535,8 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const
|
|||||||
S32 count = 0;
|
S32 count = 0;
|
||||||
S32 offset = 0;
|
S32 offset = 0;
|
||||||
const_segment_iterator_t it;
|
const_segment_iterator_t it;
|
||||||
|
|
||||||
|
LLMutexLock lock(mMutexp) ;
|
||||||
const_segment_iterator_t end = mSegments.end();
|
const_segment_iterator_t end = mSegments.end();
|
||||||
if(start)
|
if(start)
|
||||||
{
|
{
|
||||||
@@ -524,6 +588,8 @@ U8* LLBufferArray::readAfter(
|
|||||||
len = 0;
|
len = 0;
|
||||||
S32 bytes_to_copy = 0;
|
S32 bytes_to_copy = 0;
|
||||||
const_segment_iterator_t it;
|
const_segment_iterator_t it;
|
||||||
|
|
||||||
|
LLMutexLock lock(mMutexp) ;
|
||||||
const_segment_iterator_t end = mSegments.end();
|
const_segment_iterator_t end = mSegments.end();
|
||||||
if(start)
|
if(start)
|
||||||
{
|
{
|
||||||
@@ -575,6 +641,7 @@ U8* LLBufferArray::seek(
|
|||||||
U8* start,
|
U8* start,
|
||||||
S32 delta) const
|
S32 delta) const
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
const_segment_iterator_t it;
|
const_segment_iterator_t it;
|
||||||
const_segment_iterator_t end = mSegments.end();
|
const_segment_iterator_t end = mSegments.end();
|
||||||
@@ -716,9 +783,14 @@ U8* LLBufferArray::seek(
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//test use only
|
||||||
bool LLBufferArray::takeContents(LLBufferArray& source)
|
bool LLBufferArray::takeContents(LLBufferArray& source)
|
||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
|
|
||||||
|
LLMutexLock lock(mMutexp);
|
||||||
|
source.lock();
|
||||||
|
|
||||||
std::copy(
|
std::copy(
|
||||||
source.mBuffers.begin(),
|
source.mBuffers.begin(),
|
||||||
source.mBuffers.end(),
|
source.mBuffers.end(),
|
||||||
@@ -730,13 +802,17 @@ bool LLBufferArray::takeContents(LLBufferArray& source)
|
|||||||
std::back_insert_iterator<segment_list_t>(mSegments));
|
std::back_insert_iterator<segment_list_t>(mSegments));
|
||||||
source.mSegments.clear();
|
source.mSegments.clear();
|
||||||
source.mNextBaseChannel = 0;
|
source.mNextBaseChannel = 0;
|
||||||
|
source.unlock();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
||||||
S32 channel,
|
S32 channel,
|
||||||
S32 len)
|
S32 len)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
// start at the end of the buffers, because it is the most likely
|
// start at the end of the buffers, because it is the most likely
|
||||||
// to have free space.
|
// to have free space.
|
||||||
@@ -772,8 +848,10 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
|
|||||||
return send;
|
return send;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
|
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
|
|
||||||
// Find out which buffer contains the segment, and if it is found,
|
// Find out which buffer contains the segment, and if it is found,
|
||||||
@@ -799,13 +877,14 @@ bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//mMutexp should be locked before calling this.
|
||||||
bool LLBufferArray::copyIntoBuffers(
|
bool LLBufferArray::copyIntoBuffers(
|
||||||
S32 channel,
|
S32 channel,
|
||||||
const U8* src,
|
const U8* src,
|
||||||
S32 len,
|
S32 len,
|
||||||
std::vector<LLSegment>& segments)
|
std::vector<LLSegment>& segments)
|
||||||
{
|
{
|
||||||
|
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
|
||||||
if(!src || !len) return false;
|
if(!src || !len) return false;
|
||||||
S32 copied = 0;
|
S32 copied = 0;
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-09-20
|
* @date 2005-09-20
|
||||||
* @brief Declaration of buffer and buffer arrays primarily used in I/O.
|
* @brief Declaration of buffer and buffer arrays primarily used in I/O.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -45,6 +39,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
class LLMutex;
|
||||||
/**
|
/**
|
||||||
* @class LLChannelDescriptors
|
* @class LLChannelDescriptors
|
||||||
* @brief A way simple interface to accesss channels inside a buffer
|
* @brief A way simple interface to accesss channels inside a buffer
|
||||||
@@ -570,6 +565,29 @@ public:
|
|||||||
* @return Returns true on success.
|
* @return Returns true on success.
|
||||||
*/
|
*/
|
||||||
bool eraseSegment(const segment_iterator_t& iter);
|
bool eraseSegment(const segment_iterator_t& iter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Lock the mutex if it exists
|
||||||
|
* This method locks mMutexp to make accessing LLBufferArray thread-safe
|
||||||
|
*/
|
||||||
|
void lock();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Unlock the mutex if it exists
|
||||||
|
*/
|
||||||
|
void unlock();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return mMutexp
|
||||||
|
*/
|
||||||
|
LLMutex* getMutex();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set LLBufferArray to be shared across threads or not
|
||||||
|
* This method is to create mMutexp if is threaded.
|
||||||
|
* @param threaded Indicates this LLBufferArray instance is shared across threads if true.
|
||||||
|
*/
|
||||||
|
void setThreaded(bool threaded);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -601,6 +619,7 @@ protected:
|
|||||||
S32 mNextBaseChannel;
|
S32 mNextBaseChannel;
|
||||||
buffer_list_t mBuffers;
|
buffer_list_t mBuffers;
|
||||||
segment_list_t mSegments;
|
segment_list_t mSegments;
|
||||||
|
LLMutex* mMutexp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LL_LLBUFFER_H
|
#endif // LL_LLBUFFER_H
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-10-10
|
* @date 2005-10-10
|
||||||
* @brief Implementation of the buffer iostream classes
|
* @brief Implementation of the buffer iostream 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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,6 +31,7 @@
|
|||||||
|
|
||||||
#include "llbuffer.h"
|
#include "llbuffer.h"
|
||||||
#include "llmemtype.h"
|
#include "llmemtype.h"
|
||||||
|
#include "llthread.h"
|
||||||
|
|
||||||
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
|
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
|
||||||
|
|
||||||
@@ -68,6 +63,7 @@ int LLBufferStreamBuf::underflow()
|
|||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLMutexLock lock(mBuffer->getMutex());
|
||||||
LLBufferArray::segment_iterator_t iter;
|
LLBufferArray::segment_iterator_t iter;
|
||||||
LLBufferArray::segment_iterator_t end = mBuffer->endSegment();
|
LLBufferArray::segment_iterator_t end = mBuffer->endSegment();
|
||||||
U8* last_pos = (U8*)gptr();
|
U8* last_pos = (U8*)gptr();
|
||||||
@@ -155,6 +151,7 @@ int LLBufferStreamBuf::overflow(int c)
|
|||||||
// since we got here, we have a buffer, and we have a character to
|
// since we got here, we have a buffer, and we have a character to
|
||||||
// put on it.
|
// put on it.
|
||||||
LLBufferArray::segment_iterator_t it;
|
LLBufferArray::segment_iterator_t it;
|
||||||
|
LLMutexLock lock(mBuffer->getMutex());
|
||||||
it = mBuffer->makeSegment(mChannels.out(), DEFAULT_OUTPUT_SEGMENT_SIZE);
|
it = mBuffer->makeSegment(mChannels.out(), DEFAULT_OUTPUT_SEGMENT_SIZE);
|
||||||
if(it != mBuffer->endSegment())
|
if(it != mBuffer->endSegment())
|
||||||
{
|
{
|
||||||
@@ -216,6 +213,7 @@ int LLBufferStreamBuf::sync()
|
|||||||
|
|
||||||
// *NOTE: I bet we could just --address if address is not NULL.
|
// *NOTE: I bet we could just --address if address is not NULL.
|
||||||
// Need to think about that.
|
// Need to think about that.
|
||||||
|
LLMutexLock lock(mBuffer->getMutex());
|
||||||
address = mBuffer->seek(mChannels.out(), address, -1);
|
address = mBuffer->seek(mChannels.out(), address, -1);
|
||||||
if(address)
|
if(address)
|
||||||
{
|
{
|
||||||
@@ -279,6 +277,8 @@ streampos LLBufferStreamBuf::seekoff(
|
|||||||
// NULL is fine
|
// NULL is fine
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLMutexLock lock(mBuffer->getMutex());
|
||||||
address = mBuffer->seek(mChannels.in(), base_addr, off);
|
address = mBuffer->seek(mChannels.in(), base_addr, off);
|
||||||
if(address)
|
if(address)
|
||||||
{
|
{
|
||||||
@@ -310,6 +310,8 @@ streampos LLBufferStreamBuf::seekoff(
|
|||||||
// NULL is fine
|
// NULL is fine
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLMutexLock lock(mBuffer->getMutex());
|
||||||
address = mBuffer->seek(mChannels.out(), base_addr, off);
|
address = mBuffer->seek(mChannels.out(), base_addr, off);
|
||||||
if(address)
|
if(address)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-10-10
|
* @date 2005-10-10
|
||||||
* @brief Classes to treat an LLBufferArray as a c++ iostream.
|
* @brief Classes to treat an LLBufferArray as a c++ iostream.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llcachename.cpp
|
* @file llcachename.cpp
|
||||||
* @brief A hierarchical cache of first and last names queried based on UUID.
|
* @brief A hierarchical cache of first and last names queried based on UUID.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -77,6 +71,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
bool mIsGroup;
|
bool mIsGroup;
|
||||||
U32 mCreateTime; // unix time_t
|
U32 mCreateTime; // unix time_t
|
||||||
|
// IDEVO TODO collapse names to one field, which will eliminate
|
||||||
|
// many string compares on "Resident"
|
||||||
std::string mFirstName;
|
std::string mFirstName;
|
||||||
std::string mLastName;
|
std::string mLastName;
|
||||||
std::string mGroupName;
|
std::string mGroupName;
|
||||||
@@ -310,85 +306,6 @@ boost::signals2::connection LLCacheName::addObserver(const LLCacheNameCallback&
|
|||||||
return impl.mSignal.connect(callback);
|
return impl.mSignal.connect(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void LLCacheName::importFile(LLFILE* fp)
|
|
||||||
{
|
|
||||||
S32 count = 0;
|
|
||||||
|
|
||||||
const S32 BUFFER_SIZE = 1024;
|
|
||||||
char buffer[BUFFER_SIZE]; /*Flawfinder: ignore*/
|
|
||||||
|
|
||||||
// *NOTE: These buffer sizes are hardcoded into sscanf() below
|
|
||||||
char id_string[MAX_STRING]; /*Flawfinder: ignore*/
|
|
||||||
char firstname[MAX_STRING]; /*Flawfinder: ignore*/
|
|
||||||
char lastname[MAX_STRING]; /*Flawfinder: ignore*/
|
|
||||||
U32 create_time;
|
|
||||||
|
|
||||||
// This is OK if the first line is actually a name. We just don't load it.
|
|
||||||
char* valid = fgets(buffer, BUFFER_SIZE, fp);
|
|
||||||
if (!valid) return;
|
|
||||||
|
|
||||||
// *NOTE: This buffer size is hardcoded into sscanf() below
|
|
||||||
char version_string[BUFFER_SIZE]; /*Flawfinder: ignore*/
|
|
||||||
S32 version = 0;
|
|
||||||
S32 match = sscanf( /* Flawfinder: ignore */
|
|
||||||
buffer,
|
|
||||||
"%1023s %d",
|
|
||||||
version_string, &version);
|
|
||||||
if ( match != 2
|
|
||||||
|| strcmp(version_string, "version")
|
|
||||||
|| version != CN_FILE_VERSION)
|
|
||||||
{
|
|
||||||
llwarns << "Ignoring old cache name file format" << llendl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We'll expire entries more than a week old
|
|
||||||
U32 now = (U32)time(NULL);
|
|
||||||
const U32 SECS_PER_DAY = 60 * 60 * 24;
|
|
||||||
U32 delete_before_time = now - (7 * SECS_PER_DAY);
|
|
||||||
|
|
||||||
while(!feof(fp))
|
|
||||||
{
|
|
||||||
valid = fgets(buffer, BUFFER_SIZE, fp);
|
|
||||||
if (!valid) break;
|
|
||||||
|
|
||||||
match = sscanf( /* Flawfinder: ignore */
|
|
||||||
buffer,
|
|
||||||
"%254s %u %254s %254s",
|
|
||||||
id_string,
|
|
||||||
&create_time,
|
|
||||||
firstname,
|
|
||||||
lastname);
|
|
||||||
if (4 != match) continue;
|
|
||||||
|
|
||||||
LLUUID id(id_string);
|
|
||||||
if (id.isNull()) continue;
|
|
||||||
|
|
||||||
// undo trivial XOR
|
|
||||||
S32 i;
|
|
||||||
for (i = 0; i < UUID_BYTES; i++)
|
|
||||||
{
|
|
||||||
id.mData[i] ^= 0x33;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't load entries that are more than a week old
|
|
||||||
if (create_time < delete_before_time) continue;
|
|
||||||
|
|
||||||
LLCacheNameEntry* entry = new LLCacheNameEntry();
|
|
||||||
entry->mIsGroup = false;
|
|
||||||
entry->mCreateTime = create_time;
|
|
||||||
entry->mFirstName = firstname;
|
|
||||||
entry->mLastName = lastname;
|
|
||||||
impl.mCache[id] = entry;
|
|
||||||
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
|
|
||||||
llinfos << "LLCacheName loaded " << count << " names" << llendl;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool LLCacheName::importFile(std::istream& istr)
|
bool LLCacheName::importFile(std::istream& istr)
|
||||||
{
|
{
|
||||||
LLSD data;
|
LLSD data;
|
||||||
@@ -467,6 +384,7 @@ void LLCacheName::exportFile(std::ostream& ostr)
|
|||||||
// store it
|
// store it
|
||||||
LLUUID id = iter->first;
|
LLUUID id = iter->first;
|
||||||
std::string id_str = id.asString();
|
std::string id_str = id.asString();
|
||||||
|
// IDEVO TODO: Should we store SLIDs with last name "Resident" or not?
|
||||||
if(!entry->mFirstName.empty() && !entry->mLastName.empty())
|
if(!entry->mFirstName.empty() && !entry->mLastName.empty())
|
||||||
{
|
{
|
||||||
data[AGENTS][id_str][FIRST] = entry->mFirstName;
|
data[AGENTS][id_str][FIRST] = entry->mFirstName;
|
||||||
@@ -751,7 +669,7 @@ bool LLCacheName::getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_g
|
|||||||
fullname = "";
|
fullname = "";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
|
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
|
||||||
if (entry)
|
if (entry)
|
||||||
{
|
{
|
||||||
@@ -770,6 +688,8 @@ bool LLCacheName::getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_g
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
|
|
||||||
void LLCacheName::processPending()
|
void LLCacheName::processPending()
|
||||||
{
|
{
|
||||||
LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
|
LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
|
||||||
@@ -1127,4 +1047,3 @@ void LLCacheName::Impl::handleUUIDGroupNameReply(LLMessageSystem* msg, void** us
|
|||||||
{
|
{
|
||||||
((LLCacheName::Impl*)userData)->processUUIDReply(msg, true);
|
((LLCacheName::Impl*)userData)->processUUIDReply(msg, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llcachename.h
|
* @file llcachename.h
|
||||||
* @brief A cache of names from UUIDs.
|
* @brief A cache of names from UUIDs.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -70,11 +64,6 @@ public:
|
|||||||
|
|
||||||
boost::signals2::connection addObserver(const LLCacheNameCallback& callback);
|
boost::signals2::connection addObserver(const LLCacheNameCallback& callback);
|
||||||
|
|
||||||
// janky old format. Remove after a while. Phoenix. 2008-01-30
|
|
||||||
#if 0
|
|
||||||
void importFile(LLFILE* fp);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// storing cache on disk; for viewer, in name.cache
|
// storing cache on disk; for viewer, in name.cache
|
||||||
bool importFile(std::istream& istr);
|
bool importFile(std::istream& istr);
|
||||||
void exportFile(std::ostream& ostr);
|
void exportFile(std::ostream& ostr);
|
||||||
@@ -118,10 +107,10 @@ public:
|
|||||||
// otherwise, will request the data, and will call the callback when
|
// otherwise, will request the data, and will call the callback when
|
||||||
// available. There is no garuntee the callback will ever be called.
|
// available. There is no garuntee the callback will ever be called.
|
||||||
boost::signals2::connection get(const LLUUID& id, bool is_group, const LLCacheNameCallback& callback);
|
boost::signals2::connection get(const LLUUID& id, bool is_group, const LLCacheNameCallback& callback);
|
||||||
|
|
||||||
//<edit>
|
//<edit>
|
||||||
bool getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_group);
|
bool getIfThere(const LLUUID& id, std::string& fullname, BOOL& is_group);
|
||||||
//</edit>
|
//</edit>
|
||||||
|
|
||||||
// Convenience method for looking up a group name, so you can
|
// Convenience method for looking up a group name, so you can
|
||||||
// tell the difference between avatar lookup and group lookup
|
// tell the difference between avatar lookup and group lookup
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-08-04
|
* @date 2005-08-04
|
||||||
* @brief Implementaiton of the chain factory.
|
* @brief Implementaiton of the chain factory.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-08-04
|
* @date 2005-08-04
|
||||||
* @brief This class declares the interface for constructing io chains.
|
* @brief This class declares the interface for constructing io chains.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llcipher.h
|
* @file llcipher.h
|
||||||
* @brief Abstract base class for encryption ciphers.
|
* @brief Abstract base class for encryption ciphers.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llcircuit.cpp
|
* @file llcircuit.cpp
|
||||||
* @brief Class to track UDP endpoints for the message system.
|
* @brief Class to track UDP endpoints for the message system.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -1234,17 +1228,6 @@ void LLCircuit::getCircuitRange(
|
|||||||
first = mCircuitData.upper_bound(key);
|
first = mCircuitData.upper_bound(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
// <edit>
|
|
||||||
std::vector<LLCircuitData*> LLCircuit::getCircuitDataList()
|
|
||||||
{
|
|
||||||
std::vector<LLCircuitData*> list;
|
|
||||||
circuit_data_map::iterator end = mCircuitData.end();
|
|
||||||
for(circuit_data_map::iterator iter = mCircuitData.begin(); iter != end; ++iter)
|
|
||||||
list.push_back((*iter).second);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
TPACKETID LLCircuitData::nextPacketOutID()
|
TPACKETID LLCircuitData::nextPacketOutID()
|
||||||
{
|
{
|
||||||
mPacketsOut++;
|
mPacketsOut++;
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief Provides a method for tracking network circuit information
|
* @brief Provides a method for tracking network circuit information
|
||||||
* for the UDP message system
|
* for the UDP message system
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -128,7 +122,7 @@ public:
|
|||||||
U32 getPacketsLost() const;
|
U32 getPacketsLost() const;
|
||||||
TPACKETID getPacketOutID() const;
|
TPACKETID getPacketOutID() const;
|
||||||
BOOL getTrusted() const;
|
BOOL getTrusted() const;
|
||||||
F32 getAgeInSeconds() const;
|
F32 getAgeInSeconds() const;
|
||||||
S32 getUnackedPacketCount() const { return mUnackedPacketCount; }
|
S32 getUnackedPacketCount() const { return mUnackedPacketCount; }
|
||||||
S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; }
|
S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; }
|
||||||
F64 getNextPingSendTime() const { return mNextPingSendTime; }
|
F64 getNextPingSendTime() const { return mNextPingSendTime; }
|
||||||
@@ -333,10 +327,6 @@ public:
|
|||||||
const LLHost& key,
|
const LLHost& key,
|
||||||
circuit_data_map::iterator& first,
|
circuit_data_map::iterator& first,
|
||||||
circuit_data_map::iterator& end);
|
circuit_data_map::iterator& end);
|
||||||
|
|
||||||
// <edit>
|
|
||||||
std::vector<LLCircuitData*> getCircuitDataList();
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
// Lists that optimize how many circuits we need to traverse a frame
|
// Lists that optimize how many circuits we need to traverse a frame
|
||||||
// HACK - this should become protected eventually, but stupid !@$@# message system/circuit classes are jumbling things up.
|
// HACK - this should become protected eventually, but stupid !@$@# message system/circuit classes are jumbling things up.
|
||||||
|
|||||||
@@ -2,41 +2,35 @@
|
|||||||
* @file llclassifiedflags.cpp
|
* @file llclassifiedflags.cpp
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// *****************************************************************************
|
//*****************************************************************************
|
||||||
// llclassifiedflags.cpp
|
// llclassifiedflags.cpp
|
||||||
//
|
//
|
||||||
// Some exported symbols and functions for dealing with classified flags.
|
// Some exported symbols and functions for dealing with classified flags.
|
||||||
//
|
//
|
||||||
// Copyright 2005, Linden Research, Inc
|
// Copyright 2005, Linden Research, Inc
|
||||||
// *****************************************************************************
|
//*****************************************************************************
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llclassifiedflags.h
|
* @file llclassifiedflags.h
|
||||||
* @brief Flags used in the classifieds.
|
* @brief Flags used in the classifieds.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,31 +4,25 @@
|
|||||||
* @date 2006-10-15
|
* @date 2006-10-15
|
||||||
* @brief A wrapper around libcurl.
|
* @brief A wrapper around libcurl.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -48,8 +42,11 @@
|
|||||||
#include "lliopipe.h"
|
#include "lliopipe.h"
|
||||||
#include "llsd.h"
|
#include "llsd.h"
|
||||||
#include "llthread.h"
|
#include "llthread.h"
|
||||||
|
#include "llqueuedthread.h"
|
||||||
|
#include "llframetimer.h"
|
||||||
|
|
||||||
class LLMutex;
|
class LLMutex;
|
||||||
|
class LLCurlThread;
|
||||||
|
|
||||||
// For whatever reason, this is not typedef'd in curl.h
|
// For whatever reason, this is not typedef'd in curl.h
|
||||||
typedef size_t (*curl_header_callback)(void *ptr, size_t size, size_t nmemb, void *stream);
|
typedef size_t (*curl_header_callback)(void *ptr, size_t size, size_t nmemb, void *stream);
|
||||||
@@ -62,8 +59,6 @@ public:
|
|||||||
class Easy;
|
class Easy;
|
||||||
class Multi;
|
class Multi;
|
||||||
|
|
||||||
static bool sMultiThreaded;
|
|
||||||
|
|
||||||
struct TransferInfo
|
struct TransferInfo
|
||||||
{
|
{
|
||||||
TransferInfo() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
|
TransferInfo() : mSizeDownload(0.0), mTotalTime(0.0), mSpeedDownload(0.0) {}
|
||||||
@@ -130,6 +125,7 @@ public:
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public: /* but not really -- don't touch this */
|
public: /* but not really -- don't touch this */
|
||||||
U32 mReferenceCount;
|
U32 mReferenceCount;
|
||||||
|
|
||||||
@@ -167,7 +163,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* @ brief Initialize LLCurl class
|
* @ brief Initialize LLCurl class
|
||||||
*/
|
*/
|
||||||
static void initClass(bool multi_threaded = false);
|
static void initClass(F32 curl_reuest_timeout = 120.f, S32 max_number_handles = 256, bool multi_threaded = false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ brief Cleanup LLCurl class
|
* @ brief Cleanup LLCurl class
|
||||||
@@ -186,10 +182,25 @@ public:
|
|||||||
static void ssl_locking_callback(int mode, int type, const char *file, int line);
|
static void ssl_locking_callback(int mode, int type, const char *file, int line);
|
||||||
static unsigned long ssl_thread_id(void);
|
static unsigned long ssl_thread_id(void);
|
||||||
|
|
||||||
|
static LLCurlThread* getCurlThread() { return sCurlThread ;}
|
||||||
|
|
||||||
|
static CURLM* newMultiHandle() ;
|
||||||
|
static CURLMcode deleteMultiHandle(CURLM* handle) ;
|
||||||
|
static CURL* newEasyHandle() ;
|
||||||
|
static void deleteEasyHandle(CURL* handle) ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::string sCAPath;
|
static std::string sCAPath;
|
||||||
static std::string sCAFile;
|
static std::string sCAFile;
|
||||||
static const unsigned int MAX_REDIRECTS;
|
static const unsigned int MAX_REDIRECTS;
|
||||||
|
static LLCurlThread* sCurlThread;
|
||||||
|
|
||||||
|
static LLMutex* sHandleMutexp ;
|
||||||
|
static S32 sTotalHandles ;
|
||||||
|
static S32 sMaxHandles;
|
||||||
|
public:
|
||||||
|
static bool sNotQuitting;
|
||||||
|
static F32 sCurlRequestTimeOut;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLCurl::Easy
|
class LLCurl::Easy
|
||||||
@@ -198,7 +209,7 @@ class LLCurl::Easy
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Easy();
|
Easy();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static Easy* getEasy();
|
static Easy* getEasy();
|
||||||
~Easy();
|
~Easy();
|
||||||
@@ -207,41 +218,41 @@ public:
|
|||||||
|
|
||||||
void setErrorBuffer();
|
void setErrorBuffer();
|
||||||
void setCA();
|
void setCA();
|
||||||
|
|
||||||
void setopt(CURLoption option, S32 value);
|
void setopt(CURLoption option, S32 value);
|
||||||
// These assume the setter does not free value!
|
// These assume the setter does not free value!
|
||||||
void setopt(CURLoption option, void* value);
|
void setopt(CURLoption option, void* value);
|
||||||
void setopt(CURLoption option, char* value);
|
void setopt(CURLoption option, char* value);
|
||||||
// Copies the string so that it is gauranteed to stick around
|
// Copies the string so that it is guaranteed to stick around
|
||||||
void setoptString(CURLoption option, const std::string& value);
|
void setoptString(CURLoption option, const std::string& value);
|
||||||
|
|
||||||
void slist_append(const char* str);
|
void slist_append(const char* str);
|
||||||
void setHeaders();
|
void setHeaders();
|
||||||
|
|
||||||
U32 report(CURLcode);
|
U32 report(CURLcode);
|
||||||
void getTransferInfo(LLCurl::TransferInfo* info);
|
void getTransferInfo(LLCurl::TransferInfo* info);
|
||||||
|
|
||||||
void prepRequest(const std::string& url, const std::vector<std::string>& headers, ResponderPtr, S32 time_out = 0, bool post = false);
|
void prepRequest(const std::string& url, const std::vector<std::string>& headers, LLCurl::ResponderPtr, S32 time_out = 0, bool post = false);
|
||||||
|
|
||||||
const char* getErrorBuffer();
|
const char* getErrorBuffer();
|
||||||
|
|
||||||
std::stringstream& getInput() { return mInput; }
|
std::stringstream& getInput() { return mInput; }
|
||||||
std::stringstream& getHeaderOutput() { return mHeaderOutput; }
|
std::stringstream& getHeaderOutput() { return mHeaderOutput; }
|
||||||
LLIOPipe::buffer_ptr_t& getOutput() { return mOutput; }
|
LLIOPipe::buffer_ptr_t& getOutput() { return mOutput; }
|
||||||
const LLChannelDescriptors& getChannels() { return mChannels; }
|
const LLChannelDescriptors& getChannels() { return mChannels; }
|
||||||
|
|
||||||
void resetState();
|
void resetState();
|
||||||
|
|
||||||
static CURL* allocEasyHandle();
|
static CURL* allocEasyHandle();
|
||||||
static void releaseEasyHandle(CURL* handle);
|
static void releaseEasyHandle(CURL* handle);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class LLCurl;
|
friend class LLCurl;
|
||||||
friend class LLCurl::Multi;
|
friend class LLCurl::Multi;
|
||||||
|
|
||||||
CURL* mCurlEasyHandle;
|
CURL* mCurlEasyHandle;
|
||||||
struct curl_slist* mHeaders;
|
struct curl_slist* mHeaders;
|
||||||
|
|
||||||
std::stringstream mRequest;
|
std::stringstream mRequest;
|
||||||
LLChannelDescriptors mChannels;
|
LLChannelDescriptors mChannels;
|
||||||
LLIOPipe::buffer_ptr_t mOutput;
|
LLIOPipe::buffer_ptr_t mOutput;
|
||||||
@@ -251,65 +262,121 @@ private:
|
|||||||
|
|
||||||
// Note: char*'s not strings since we pass pointers to curl
|
// Note: char*'s not strings since we pass pointers to curl
|
||||||
std::vector<char*> mStrings;
|
std::vector<char*> mStrings;
|
||||||
|
|
||||||
ResponderPtr mResponder;
|
LLCurl::ResponderPtr mResponder;
|
||||||
|
|
||||||
static std::set<CURL*> sFreeHandles;
|
static std::set<CURL*> sFreeHandles;
|
||||||
static std::set<CURL*> sActiveHandles;
|
static std::set<CURL*> sActiveHandles;
|
||||||
static LLMutex* sHandleMutex;
|
static LLMutex* sHandleMutexp ;
|
||||||
static LLMutex* sMultiMutex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLCurl::Multi : public LLThread
|
class LLCurl::Multi
|
||||||
{
|
{
|
||||||
LOG_CLASS(Multi);
|
LOG_CLASS(Multi);
|
||||||
|
|
||||||
|
friend class LLCurlThread ;
|
||||||
|
|
||||||
|
private:
|
||||||
|
~Multi();
|
||||||
|
|
||||||
|
void markDead() ;
|
||||||
|
bool doPerform();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
PERFORM_STATE_READY=0,
|
STATE_READY=0,
|
||||||
PERFORM_STATE_PERFORMING=1,
|
STATE_PERFORMING=1,
|
||||||
PERFORM_STATE_COMPLETED=2
|
STATE_COMPLETED=2
|
||||||
} ePerformState;
|
} ePerformState;
|
||||||
|
|
||||||
Multi();
|
Multi(F32 idle_time_out = 0.f);
|
||||||
~Multi();
|
|
||||||
|
|
||||||
Easy* allocEasy();
|
LLCurl::Easy* allocEasy();
|
||||||
bool addEasy(Easy* easy);
|
bool addEasy(LLCurl::Easy* easy);
|
||||||
|
void removeEasy(LLCurl::Easy* easy);
|
||||||
|
|
||||||
void removeEasy(Easy* easy);
|
void lock() ;
|
||||||
|
void unlock() ;
|
||||||
|
|
||||||
|
void setState(ePerformState state) ;
|
||||||
|
ePerformState getState() ;
|
||||||
|
|
||||||
|
bool isCompleted() ;
|
||||||
|
bool isValid() {return mCurlMultiHandle != NULL ;}
|
||||||
|
bool isDead() {return mDead;}
|
||||||
|
|
||||||
|
bool waitToComplete() ;
|
||||||
|
|
||||||
S32 process();
|
S32 process();
|
||||||
void perform();
|
|
||||||
void doPerform();
|
|
||||||
|
|
||||||
virtual void run();
|
|
||||||
|
|
||||||
CURLMsg* info_read(S32* msgs_in_queue);
|
CURLMsg* info_read(S32* msgs_in_queue);
|
||||||
|
|
||||||
S32 mQueued;
|
S32 mQueued;
|
||||||
S32 mErrorCount;
|
S32 mErrorCount;
|
||||||
|
|
||||||
S32 mPerformState;
|
|
||||||
|
|
||||||
LLCondition* mSignal;
|
|
||||||
bool mQuitting;
|
|
||||||
bool mThreaded;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void easyFree(Easy*);
|
void easyFree(LLCurl::Easy*);
|
||||||
|
void cleanup() ;
|
||||||
|
|
||||||
CURLM* mCurlMultiHandle;
|
CURLM* mCurlMultiHandle;
|
||||||
|
|
||||||
typedef std::set<Easy*> easy_active_list_t;
|
typedef std::set<LLCurl::Easy*> easy_active_list_t;
|
||||||
easy_active_list_t mEasyActiveList;
|
easy_active_list_t mEasyActiveList;
|
||||||
typedef std::map<CURL*, Easy*> easy_active_map_t;
|
typedef std::map<CURL*, LLCurl::Easy*> easy_active_map_t;
|
||||||
easy_active_map_t mEasyActiveMap;
|
easy_active_map_t mEasyActiveMap;
|
||||||
typedef std::set<Easy*> easy_free_list_t;
|
typedef std::set<LLCurl::Easy*> easy_free_list_t;
|
||||||
easy_free_list_t mEasyFreeList;
|
easy_free_list_t mEasyFreeList;
|
||||||
|
|
||||||
|
LLQueuedThread::handle_t mHandle ;
|
||||||
|
ePerformState mState;
|
||||||
|
|
||||||
|
BOOL mDead ;
|
||||||
|
LLMutex* mMutexp ;
|
||||||
|
LLMutex* mDeletionMutexp ;
|
||||||
|
LLMutex* mEasyMutexp ;
|
||||||
|
LLFrameTimer mIdleTimer ;
|
||||||
|
F32 mIdleTimeOut;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LLCurlThread : public LLQueuedThread
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
class CurlRequest : public LLQueuedThread::QueuedRequest
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual ~CurlRequest(); // use deleteRequest()
|
||||||
|
|
||||||
|
public:
|
||||||
|
CurlRequest(handle_t handle, LLCurl::Multi* multi, LLCurlThread* curl_thread);
|
||||||
|
|
||||||
|
/*virtual*/ bool processRequest();
|
||||||
|
/*virtual*/ void finishRequest(bool completed);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// input
|
||||||
|
LLCurl::Multi* mMulti;
|
||||||
|
LLCurlThread* mCurlThread;
|
||||||
|
};
|
||||||
|
friend class CurlRequest;
|
||||||
|
|
||||||
|
public:
|
||||||
|
LLCurlThread(bool threaded = true) ;
|
||||||
|
virtual ~LLCurlThread() ;
|
||||||
|
|
||||||
|
S32 update(F32 max_time_ms);
|
||||||
|
|
||||||
|
void addMulti(LLCurl::Multi* multi) ;
|
||||||
|
void killMulti(LLCurl::Multi* multi) ;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool doMultiPerform(LLCurl::Multi* multi) ;
|
||||||
|
void deleteMulti(LLCurl::Multi* multi) ;
|
||||||
|
void cleanupMulti(LLCurl::Multi* multi) ;
|
||||||
|
} ;
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
void intrusive_ptr_add_ref(LLCurl::Responder* p);
|
void intrusive_ptr_add_ref(LLCurl::Responder* p);
|
||||||
@@ -344,7 +411,6 @@ private:
|
|||||||
LLCurl::Multi* mActiveMulti;
|
LLCurl::Multi* mActiveMulti;
|
||||||
S32 mActiveRequestCount;
|
S32 mActiveRequestCount;
|
||||||
BOOL mProcessing;
|
BOOL mProcessing;
|
||||||
U32 mThreadID; // debug
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLCurlEasyRequest
|
class LLCurlEasyRequest
|
||||||
@@ -362,9 +428,11 @@ public:
|
|||||||
void slist_append(const char* str);
|
void slist_append(const char* str);
|
||||||
void sendRequest(const std::string& url);
|
void sendRequest(const std::string& url);
|
||||||
void requestComplete();
|
void requestComplete();
|
||||||
void perform();
|
|
||||||
bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL);
|
bool getResult(CURLcode* result, LLCurl::TransferInfo* info = NULL);
|
||||||
std::string getErrorString();
|
std::string getErrorString();
|
||||||
|
bool isCompleted() {return mMulti->isCompleted() ;}
|
||||||
|
bool wait() { return mMulti->waitToComplete(); }
|
||||||
|
bool isValid() {return mMulti && mMulti->isValid(); }
|
||||||
|
|
||||||
LLCurl::Easy* getEasy() const { return mEasy; }
|
LLCurl::Easy* getEasy() const { return mEasy; }
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lldatapacker.cpp
|
* @file lldatapacker.cpp
|
||||||
* @brief Data packer implementation.
|
* @brief Data packer implementation.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lldatapacker.h
|
* @file lldatapacker.h
|
||||||
* @brief Data packer declaration for tightly storing binary data.
|
* @brief Data packer declaration for tightly storing binary data.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -179,12 +173,10 @@ public:
|
|||||||
void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; }
|
void freeBuffer() { delete [] mBufferp; mBufferp = mCurBufferp = NULL; mBufferSize = 0; mWriteEnabled = FALSE; }
|
||||||
void assignBuffer(U8 *bufferp, S32 size)
|
void assignBuffer(U8 *bufferp, S32 size)
|
||||||
{
|
{
|
||||||
//No no no no no! This breaks the paradigm of callers handling buffer allocation/deallocation
|
if(mBufferp && mBufferp != bufferp)
|
||||||
//Also, buffers can be on stack! Calling delete[] on such a buffer would be VERY bad.
|
|
||||||
/*if(mBufferp && mBufferp != bufferp)
|
|
||||||
{
|
{
|
||||||
freeBuffer() ;
|
freeBuffer() ;
|
||||||
}*/
|
}
|
||||||
mBufferp = bufferp;
|
mBufferp = bufferp;
|
||||||
mCurBufferp = bufferp;
|
mCurBufferp = bufferp;
|
||||||
mBufferSize = size;
|
mBufferSize = size;
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lldbstrings.h
|
* @file lldbstrings.h
|
||||||
* @brief Database String Lengths.
|
* @brief Database String Lengths.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lldispatcher.cpp
|
* @file lldispatcher.cpp
|
||||||
* @brief Implementation of the dispatcher object.
|
* @brief Implementation of the dispatcher object.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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,7 +31,6 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "llstl.h"
|
#include "llstl.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include <iterator> //VS2010
|
|
||||||
|
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
/// Class lldispatcher
|
/// Class lldispatcher
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lldispatcher.h
|
* @file lldispatcher.h
|
||||||
* @brief LLDispatcher class header file.
|
* @brief LLDispatcher class header file.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file lleventflags.h
|
* @file lleventflags.h
|
||||||
* @brief Flags for events.
|
* @brief Flags for events.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @author Phoenix
|
* @author Phoenix
|
||||||
* @date 2005-04-26
|
* @date 2005-04-26
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -86,13 +80,12 @@
|
|||||||
|
|
||||||
#include "llbuffer.h"
|
#include "llbuffer.h"
|
||||||
#include "llbufferstream.h"
|
#include "llbufferstream.h"
|
||||||
|
#include "llfasttimer.h"
|
||||||
#include "llmemorystream.h"
|
#include "llmemorystream.h"
|
||||||
#include "llsd.h"
|
#include "llsd.h"
|
||||||
#include "llsdserialize.h"
|
#include "llsdserialize.h"
|
||||||
#include "lluuid.h"
|
#include "lluuid.h"
|
||||||
|
|
||||||
#include "llfasttimer.h"
|
|
||||||
|
|
||||||
// spammy mode
|
// spammy mode
|
||||||
//#define LL_SPEW_STREAM_OUT_DEBUGGING 1
|
//#define LL_SPEW_STREAM_OUT_DEBUGGING 1
|
||||||
|
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @author Phoenix
|
* @author Phoenix
|
||||||
* @date 2005-04-26
|
* @date 2005-04-26
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llfollowcamparams.h
|
* @file llfollowcamparams.h
|
||||||
* @brief Follow camera parameters.
|
* @brief Follow camera parameters.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhost.cpp
|
* @file llhost.cpp
|
||||||
* @brief Encapsulates an IP address and a port.
|
* @brief Encapsulates an IP address and a port.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2000&license=viewergpl$
|
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2000-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief a LLHost uniquely defines a host (Simulator, Proxy or other)
|
* @brief a LLHost uniquely defines a host (Simulator, Proxy or other)
|
||||||
* across the network
|
* across the network
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2000&license=viewergpl$
|
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2000-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief Subclass capable of loading asset data to/from an external
|
* @brief Subclass capable of loading asset data to/from an external
|
||||||
* source. Currently, a web server accessed via curl
|
* source. Currently, a web server accessed via curl
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -39,6 +33,7 @@
|
|||||||
|
|
||||||
#include "indra_constants.h"
|
#include "indra_constants.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
#include "llproxy.h"
|
||||||
#include "llvfile.h"
|
#include "llvfile.h"
|
||||||
#include "llvfs.h"
|
#include "llvfs.h"
|
||||||
|
|
||||||
@@ -126,7 +121,7 @@ LLHTTPAssetRequest::LLHTTPAssetRequest(LLHTTPAssetStorage *asp,
|
|||||||
const std::string& url,
|
const std::string& url,
|
||||||
CURLM *curl_multi)
|
CURLM *curl_multi)
|
||||||
: 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
|
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;
|
||||||
@@ -237,7 +232,12 @@ LLSD LLHTTPAssetRequest::getFullDetails() const
|
|||||||
void LLHTTPAssetRequest::setupCurlHandle()
|
void LLHTTPAssetRequest::setupCurlHandle()
|
||||||
{
|
{
|
||||||
// *NOTE: Similar code exists in mapserver/llcurlutil.cpp JC
|
// *NOTE: Similar code exists in mapserver/llcurlutil.cpp JC
|
||||||
mCurlHandle = curl_easy_init();
|
mCurlHandle = LLCurl::newEasyHandle();
|
||||||
|
llassert_always(mCurlHandle != NULL) ;
|
||||||
|
|
||||||
|
// Apply proxy settings if configured to do so
|
||||||
|
LLProxy::getInstance()->applyProxySettings(mCurlHandle);
|
||||||
|
|
||||||
curl_easy_setopt(mCurlHandle, CURLOPT_NOSIGNAL, 1);
|
curl_easy_setopt(mCurlHandle, CURLOPT_NOSIGNAL, 1);
|
||||||
curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1);
|
curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1);
|
||||||
curl_easy_setopt(mCurlHandle, CURLOPT_URL, mURLBuffer.c_str());
|
curl_easy_setopt(mCurlHandle, CURLOPT_URL, mURLBuffer.c_str());
|
||||||
@@ -279,7 +279,7 @@ void LLHTTPAssetRequest::setupCurlHandle()
|
|||||||
|
|
||||||
void LLHTTPAssetRequest::cleanupCurlHandle()
|
void LLHTTPAssetRequest::cleanupCurlHandle()
|
||||||
{
|
{
|
||||||
curl_easy_cleanup(mCurlHandle);
|
LLCurl::deleteEasyHandle(mCurlHandle);
|
||||||
if (mAssetStoragep)
|
if (mAssetStoragep)
|
||||||
{
|
{
|
||||||
// Terminating a request. Thus upload or download is no longer pending.
|
// Terminating a request. Thus upload or download is no longer pending.
|
||||||
@@ -430,12 +430,13 @@ void LLHTTPAssetStorage::_init(const std::string& web_host, const std::string& l
|
|||||||
|
|
||||||
// curl_global_init moved to LLCurl::initClass()
|
// curl_global_init moved to LLCurl::initClass()
|
||||||
|
|
||||||
mCurlMultiHandle = curl_multi_init();
|
mCurlMultiHandle = LLCurl::newMultiHandle() ;
|
||||||
|
llassert_always(mCurlMultiHandle != NULL) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLHTTPAssetStorage::~LLHTTPAssetStorage()
|
LLHTTPAssetStorage::~LLHTTPAssetStorage()
|
||||||
{
|
{
|
||||||
curl_multi_cleanup(mCurlMultiHandle);
|
LLCurl::deleteMultiHandle(mCurlMultiHandle);
|
||||||
mCurlMultiHandle = NULL;
|
mCurlMultiHandle = NULL;
|
||||||
|
|
||||||
// curl_global_cleanup moved to LLCurl::initClass()
|
// curl_global_cleanup moved to LLCurl::initClass()
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpassetstorage.h
|
* @file llhttpassetstorage.h
|
||||||
* @brief Class for loading asset data to/from an external source over http.
|
* @brief Class for loading asset data to/from an external source over http.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,36 +2,30 @@
|
|||||||
* @file llhttpclient.cpp
|
* @file llhttpclient.cpp
|
||||||
* @brief Implementation of classes for making HTTP requests.
|
* @brief Implementation of classes for making HTTP requests.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
|
#include <openssl/x509_vfy.h>
|
||||||
#include "llhttpclient.h"
|
#include "llhttpclient.h"
|
||||||
|
|
||||||
#include "llassetstorage.h"
|
#include "llassetstorage.h"
|
||||||
@@ -46,7 +40,10 @@
|
|||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
|
|
||||||
const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f;
|
const F32 HTTP_REQUEST_EXPIRY_SECS = 60.0f;
|
||||||
|
LLURLRequest::SSLCertVerifyCallback LLHTTPClient::mCertVerifyCallback = NULL;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Responder class moved to LLCurl
|
// Responder class moved to LLCurl
|
||||||
@@ -163,7 +160,7 @@ namespace
|
|||||||
fstream.seekg(0, std::ios::end);
|
fstream.seekg(0, std::ios::end);
|
||||||
U32 fileSize = fstream.tellg();
|
U32 fileSize = fstream.tellg();
|
||||||
fstream.seekg(0, std::ios::beg);
|
fstream.seekg(0, std::ios::beg);
|
||||||
std::vector<char> fileBuffer(fileSize); //Mem leak fix'd
|
std::vector<char> fileBuffer(fileSize);
|
||||||
fstream.read(&fileBuffer[0], fileSize);
|
fstream.read(&fileBuffer[0], fileSize);
|
||||||
ostream.write(&fileBuffer[0], fileSize);
|
ostream.write(&fileBuffer[0], fileSize);
|
||||||
fstream.close();
|
fstream.close();
|
||||||
@@ -192,9 +189,11 @@ namespace
|
|||||||
|
|
||||||
LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ);
|
LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ);
|
||||||
S32 fileSize = vfile.getSize();
|
S32 fileSize = vfile.getSize();
|
||||||
std::vector<U8> fileBuffer(fileSize);
|
U8* fileBuffer;
|
||||||
vfile.read(&fileBuffer[0], fileSize);
|
fileBuffer = new U8 [fileSize];
|
||||||
ostream.write((char*)&fileBuffer[0], fileSize);
|
vfile.read(fileBuffer, fileSize);
|
||||||
|
ostream.write((char*)fileBuffer, fileSize);
|
||||||
|
delete [] fileBuffer;
|
||||||
eos = true;
|
eos = true;
|
||||||
return STATUS_DONE;
|
return STATUS_DONE;
|
||||||
}
|
}
|
||||||
@@ -207,13 +206,19 @@ namespace
|
|||||||
LLPumpIO* theClientPump = NULL;
|
LLPumpIO* theClientPump = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLHTTPClient::setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback callback)
|
||||||
|
{
|
||||||
|
LLHTTPClient::mCertVerifyCallback = callback;
|
||||||
|
}
|
||||||
|
|
||||||
static void request(
|
static void request(
|
||||||
const std::string& url,
|
const std::string& url,
|
||||||
LLURLRequest::ERequestAction method,
|
LLURLRequest::ERequestAction method,
|
||||||
Injector* body_injector,
|
Injector* body_injector,
|
||||||
LLCurl::ResponderPtr responder,
|
LLCurl::ResponderPtr responder,
|
||||||
const F32 timeout = HTTP_REQUEST_EXPIRY_SECS,
|
const F32 timeout = HTTP_REQUEST_EXPIRY_SECS,
|
||||||
const LLSD& headers = LLSD())
|
const LLSD& headers = LLSD()
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (!LLHTTPClient::hasPump())
|
if (!LLHTTPClient::hasPump())
|
||||||
{
|
{
|
||||||
@@ -223,11 +228,26 @@ static void request(
|
|||||||
LLPumpIO::chain_t chain;
|
LLPumpIO::chain_t chain;
|
||||||
|
|
||||||
LLURLRequest* req = new LLURLRequest(method, url);
|
LLURLRequest* req = new LLURLRequest(method, url);
|
||||||
req->checkRootCertificate(true);
|
if(!req->isValid())//failed
|
||||||
|
{
|
||||||
|
delete req ;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req);
|
||||||
|
|
||||||
|
|
||||||
|
lldebugs << LLURLRequest::actionAsVerb(method) << " " << url << " "
|
||||||
|
<< headers << llendl;
|
||||||
|
|
||||||
|
// Insert custom headers if the caller sent any
|
||||||
|
if (headers.isMap())
|
||||||
|
{
|
||||||
|
if (headers.has("Cookie"))
|
||||||
|
{
|
||||||
|
req->allowCookies();
|
||||||
|
}
|
||||||
|
|
||||||
// Insert custom headers is the caller sent any
|
|
||||||
if (headers.isMap())
|
|
||||||
{
|
|
||||||
LLSD::map_const_iterator iter = headers.beginMap();
|
LLSD::map_const_iterator iter = headers.beginMap();
|
||||||
LLSD::map_const_iterator end = headers.endMap();
|
LLSD::map_const_iterator end = headers.endMap();
|
||||||
|
|
||||||
@@ -409,11 +429,16 @@ static LLSD blocking_request(
|
|||||||
{
|
{
|
||||||
lldebugs << "blockingRequest of " << url << llendl;
|
lldebugs << "blockingRequest of " << url << llendl;
|
||||||
char curl_error_buffer[CURL_ERROR_SIZE] = "\0";
|
char curl_error_buffer[CURL_ERROR_SIZE] = "\0";
|
||||||
CURL* curlp = curl_easy_init();
|
CURL* curlp = LLCurl::newEasyHandle();
|
||||||
|
llassert_always(curlp != NULL) ;
|
||||||
|
|
||||||
LLHTTPBuffer http_buffer;
|
LLHTTPBuffer http_buffer;
|
||||||
std::string body_str;
|
std::string body_str;
|
||||||
|
|
||||||
// other request method checks root cert first, we skip?
|
// other request method checks root cert first, we skip?
|
||||||
|
|
||||||
|
// Apply configured proxy settings
|
||||||
|
LLProxy::getInstance()->applyProxySettings(curlp);
|
||||||
|
|
||||||
// * Set curl handle options
|
// * Set curl handle options
|
||||||
curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts
|
curl_easy_setopt(curlp, CURLOPT_NOSIGNAL, 1); // don't use SIGALRM for timeouts
|
||||||
@@ -422,7 +447,7 @@ static LLSD blocking_request(
|
|||||||
curl_easy_setopt(curlp, CURLOPT_WRITEDATA, &http_buffer);
|
curl_easy_setopt(curlp, CURLOPT_WRITEDATA, &http_buffer);
|
||||||
curl_easy_setopt(curlp, CURLOPT_URL, url.c_str());
|
curl_easy_setopt(curlp, CURLOPT_URL, url.c_str());
|
||||||
curl_easy_setopt(curlp, CURLOPT_ERRORBUFFER, curl_error_buffer);
|
curl_easy_setopt(curlp, CURLOPT_ERRORBUFFER, curl_error_buffer);
|
||||||
|
|
||||||
// * Setup headers (don't forget to free them after the call!)
|
// * Setup headers (don't forget to free them after the call!)
|
||||||
curl_slist* headers_list = NULL;
|
curl_slist* headers_list = NULL;
|
||||||
if (headers.isMap())
|
if (headers.isMap())
|
||||||
@@ -500,7 +525,7 @@ static LLSD blocking_request(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// * Cleanup
|
// * Cleanup
|
||||||
curl_easy_cleanup(curlp);
|
LLCurl::deleteEasyHandle(curlp);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -600,7 +625,8 @@ bool LLHTTPClient::hasPump()
|
|||||||
return theClientPump != NULL;
|
return theClientPump != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLPumpIO &LLHTTPClient::getPump()
|
//static
|
||||||
|
LLPumpIO& LLHTTPClient::getPump()
|
||||||
{
|
{
|
||||||
return *theClientPump;
|
return *theClientPump;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpclient.h
|
* @file llhttpclient.h
|
||||||
* @brief Declaration of classes for making HTTP client requests.
|
* @brief Declaration of classes for making HTTP client requests.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -40,7 +34,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/intrusive_ptr.hpp>
|
#include <boost/intrusive_ptr.hpp>
|
||||||
|
#include <openssl/x509_vfy.h>
|
||||||
|
#include "llurlrequest.h"
|
||||||
#include "llassettype.h"
|
#include "llassettype.h"
|
||||||
#include "llcurl.h"
|
#include "llcurl.h"
|
||||||
#include "lliopipe.h"
|
#include "lliopipe.h"
|
||||||
@@ -61,6 +56,7 @@ public:
|
|||||||
typedef LLCurl::Responder Responder;
|
typedef LLCurl::Responder Responder;
|
||||||
typedef LLCurl::ResponderPtr ResponderPtr;
|
typedef LLCurl::ResponderPtr ResponderPtr;
|
||||||
|
|
||||||
|
|
||||||
/** @name non-blocking API */
|
/** @name non-blocking API */
|
||||||
//@{
|
//@{
|
||||||
static void head(
|
static void head(
|
||||||
@@ -158,6 +154,12 @@ public:
|
|||||||
///< for testing
|
///< for testing
|
||||||
static LLPumpIO &getPump();
|
static LLPumpIO &getPump();
|
||||||
///< Hippo special
|
///< Hippo special
|
||||||
|
|
||||||
|
static void setCertVerifyCallback(LLURLRequest::SSLCertVerifyCallback callback);
|
||||||
|
static LLURLRequest::SSLCertVerifyCallback getCertVerifyCallback() { return mCertVerifyCallback; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static LLURLRequest::SSLCertVerifyCallback mCertVerifyCallback;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LL_LLHTTPCLIENT_H
|
#endif // LL_LLHTTPCLIENT_H
|
||||||
|
|||||||
@@ -1,32 +1,26 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file llhttpclientadapter.cpp
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2009&license=viewergpl$
|
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,26 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file llhttpclientadepter.h
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2008-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,26 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file llhttpclientinterface.h
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2008-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpnode.cpp
|
* @file llhttpnode.cpp
|
||||||
* @brief Implementation of classes for generic HTTP/LSL/REST handling.
|
* @brief Implementation of classes for generic HTTP/LSL/REST handling.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpnode.h
|
* @file llhttpnode.h
|
||||||
* @brief Declaration of classes for generic HTTP/LSL/REST handling.
|
* @brief Declaration of classes for generic HTTP/LSL/REST handling.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -293,6 +287,7 @@ public:
|
|||||||
|
|
||||||
void result(const LLSD& result);
|
void result(const LLSD& result);
|
||||||
void extendedResult(S32 code, const std::string& body, const LLSD& headers);
|
void extendedResult(S32 code, const std::string& body, const LLSD& headers);
|
||||||
|
|
||||||
void status(S32 code, const std::string& message);
|
void status(S32 code, const std::string& message);
|
||||||
|
|
||||||
void print(std::ostream& out) const;
|
void print(std::ostream& out) const;
|
||||||
@@ -304,7 +299,7 @@ protected:
|
|||||||
~LLSimpleResponse();
|
~LLSimpleResponse();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LLSimpleResponse() : mCode(0) {} // Must be accessed through LLPointer.
|
LLSimpleResponse() : mCode(0) {} // Must be accessed through LLPointer.
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& out, const LLSimpleResponse& resp);
|
std::ostream& operator<<(std::ostream& out, const LLSimpleResponse& resp);
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpnodeadapter.h
|
* @file llhttpnodeadapter.h
|
||||||
* @brief Declaration of llhttpnode adapter classes
|
* @brief Declaration of llhttpnode adapter classes
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2009&license=viewergpl$
|
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpsender.cpp
|
* @file llhttpsender.cpp
|
||||||
* @brief Abstracts details of sending messages via HTTP.
|
* @brief Abstracts details of sending messages via HTTP.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llhttpsender.h
|
* @file llhttpsender.h
|
||||||
* @brief Abstracts details of sending messages via HTTP.
|
* @brief Abstracts details of sending messages via HTTP.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-08-29
|
* @date 2005-08-29
|
||||||
* @brief Constants and functions used in IM.
|
* @brief Constants and functions used in IM.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llinstantmessage.h
|
* @file llinstantmessage.h
|
||||||
* @brief Constants and declarations used by instant messages.
|
* @brief Constants and declarations used by instant messages.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -75,6 +69,7 @@ enum EInstantMessage
|
|||||||
// Group vote
|
// Group vote
|
||||||
// Name is name of person who called vote.
|
// Name is name of person who called vote.
|
||||||
// ID is vote ID used for internal tracking
|
// ID is vote ID used for internal tracking
|
||||||
|
// TODO: _DEPRECATED suffix as part of vote removal - DEV-24856
|
||||||
IM_GROUP_VOTE = 7,
|
IM_GROUP_VOTE = 7,
|
||||||
|
|
||||||
// Group message
|
// Group message
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llinvite.h
|
* @file llinvite.h
|
||||||
* @brief Constants used for inviting users to join groups.
|
* @brief Constants used for inviting users to join groups.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-05-04
|
* @date 2005-05-04
|
||||||
* @brief Definition of buffer based implementations of IO Pipes.
|
* @brief Definition of buffer based implementations of IO Pipes.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-05-04
|
* @date 2005-05-04
|
||||||
* @brief Declaration of buffers for use in IO Pipes.
|
* @brief Declaration of buffers for use in IO Pipes.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "llapr.h"
|
#include "llapr.h"
|
||||||
#include "llbuffer.h"
|
#include "llbuffer.h"
|
||||||
#include "llbufferstream.h"
|
#include "llbufferstream.h"
|
||||||
|
#include "llfasttimer.h"
|
||||||
#include "llhttpnode.h"
|
#include "llhttpnode.h"
|
||||||
#include "lliopipe.h"
|
#include "lliopipe.h"
|
||||||
#include "lliosocket.h"
|
#include "lliosocket.h"
|
||||||
@@ -45,7 +46,6 @@
|
|||||||
#include "llstat.h"
|
#include "llstat.h"
|
||||||
#include "llstl.h"
|
#include "llstl.h"
|
||||||
#include "lltimer.h"
|
#include "lltimer.h"
|
||||||
#include "llfasttimer.h"
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@@ -819,6 +819,8 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
|
|||||||
|
|
||||||
// Copy everything after mLast read to the out.
|
// Copy everything after mLast read to the out.
|
||||||
LLBufferArray::segment_iterator_t seg_iter;
|
LLBufferArray::segment_iterator_t seg_iter;
|
||||||
|
|
||||||
|
buffer->lock();
|
||||||
seg_iter = buffer->splitAfter(mLastRead);
|
seg_iter = buffer->splitAfter(mLastRead);
|
||||||
if(seg_iter != buffer->endSegment())
|
if(seg_iter != buffer->endSegment())
|
||||||
{
|
{
|
||||||
@@ -839,7 +841,7 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
buffer->unlock();
|
||||||
//
|
//
|
||||||
// *FIX: get rid of extra bytes off the end
|
// *FIX: get rid of extra bytes off the end
|
||||||
//
|
//
|
||||||
@@ -966,9 +968,7 @@ private:
|
|||||||
// static
|
// static
|
||||||
LLHTTPNode& LLIOHTTPServer::create(LLPumpIO& pump, U16 port)
|
LLHTTPNode& LLIOHTTPServer::create(LLPumpIO& pump, U16 port)
|
||||||
{
|
{
|
||||||
LLSocket::ptr_t socket = LLSocket::create(
|
LLSocket::ptr_t socket = LLSocket::create(LLSocket::STREAM_TCP, port);
|
||||||
LLSocket::STREAM_TCP,
|
|
||||||
port);
|
|
||||||
if(!socket)
|
if(!socket)
|
||||||
{
|
{
|
||||||
llerrs << "Unable to initialize socket" << llendl;
|
llerrs << "Unable to initialize socket" << llendl;
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief Declaration of function for creating an HTTP wire server
|
* @brief Declaration of function for creating an HTTP wire server
|
||||||
* @see LLIOServerSocket, LLPumpIO
|
* @see LLIOServerSocket, LLPumpIO
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2004-11-19
|
* @date 2004-11-19
|
||||||
* @brief Implementation of the LLIOPipe class
|
* @brief Implementation of the LLIOPipe class
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -81,6 +75,12 @@ LLIOPipe::~LLIOPipe()
|
|||||||
//lldebugs << "destroying LLIOPipe" << llendl;
|
//lldebugs << "destroying LLIOPipe" << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//virtual
|
||||||
|
bool LLIOPipe::isValid()
|
||||||
|
{
|
||||||
|
return true ;
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
std::string LLIOPipe::lookupStatusString(EStatus status)
|
std::string LLIOPipe::lookupStatusString(EStatus status)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2004-11-18
|
* @date 2004-11-18
|
||||||
* @brief Declaration of base IO class
|
* @brief Declaration of base IO class
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -237,6 +231,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual ~LLIOPipe();
|
virtual ~LLIOPipe();
|
||||||
|
|
||||||
|
virtual bool isValid() ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Base Constructor.
|
* @brief Base Constructor.
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-07-31
|
* @date 2005-07-31
|
||||||
* @brief Sockets declarations for use with the io pipes
|
* @brief Sockets declarations for use with the io pipes
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,11 +32,11 @@
|
|||||||
#include "llapr.h"
|
#include "llapr.h"
|
||||||
|
|
||||||
#include "llbuffer.h"
|
#include "llbuffer.h"
|
||||||
|
#include "llfasttimer.h"
|
||||||
#include "llhost.h"
|
#include "llhost.h"
|
||||||
#include "llmemtype.h"
|
#include "llmemtype.h"
|
||||||
#include "llpumpio.h"
|
#include "llpumpio.h"
|
||||||
#include "llthread.h"
|
#include "llthread.h"
|
||||||
#include "llfasttimer.h"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// constants
|
// constants
|
||||||
@@ -114,21 +108,11 @@ LLSocket::ptr_t LLSocket::create(EType type, U16 port)
|
|||||||
|
|
||||||
if(STREAM_TCP == type)
|
if(STREAM_TCP == type)
|
||||||
{
|
{
|
||||||
status = apr_socket_create(
|
status = apr_socket_create(&rv->mSocket, APR_INET, SOCK_STREAM, APR_PROTO_TCP, rv->mPool());
|
||||||
&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(
|
status = apr_socket_create(&rv->mSocket, APR_INET, SOCK_DGRAM, APR_PROTO_UDP, rv->mPool());
|
||||||
&rv->mSocket,
|
|
||||||
APR_INET,
|
|
||||||
SOCK_DGRAM,
|
|
||||||
APR_PROTO_UDP,
|
|
||||||
rv->mPool());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -216,6 +200,7 @@ LLSocket::ptr_t LLSocket::create(apr_status_t& status, LLSocket::ptr_t& listen_s
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool LLSocket::blockingConnect(const LLHost& host)
|
bool LLSocket::blockingConnect(const LLHost& host)
|
||||||
{
|
{
|
||||||
if(!mSocket) return false;
|
if(!mSocket) return false;
|
||||||
@@ -244,7 +229,6 @@ LLSocket::LLSocket() :
|
|||||||
mPool(LLThread::tldata().mRootPool),
|
mPool(LLThread::tldata().mRootPool),
|
||||||
mPort(PORT_INVALID)
|
mPort(PORT_INVALID)
|
||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_TCP);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLSocket::~LLSocket()
|
LLSocket::~LLSocket()
|
||||||
@@ -445,6 +429,7 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
|
|||||||
// efficient - not only because writev() is better, but also
|
// efficient - not only because writev() is better, but also
|
||||||
// because we won't have to do as much work to find the start
|
// because we won't have to do as much work to find the start
|
||||||
// address.
|
// address.
|
||||||
|
buffer->lock();
|
||||||
LLBufferArray::segment_iterator_t it;
|
LLBufferArray::segment_iterator_t it;
|
||||||
LLBufferArray::segment_iterator_t end = buffer->endSegment();
|
LLBufferArray::segment_iterator_t end = buffer->endSegment();
|
||||||
LLSegment segment;
|
LLSegment segment;
|
||||||
@@ -524,6 +509,8 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
buffer->unlock();
|
||||||
|
|
||||||
PUMP_DEBUG;
|
PUMP_DEBUG;
|
||||||
if(done && eos)
|
if(done && eos)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-07-31
|
* @date 2005-07-31
|
||||||
* @brief Declaration of files used for handling sockets and associated pipes
|
* @brief Declaration of files used for handling sockets and associated pipes
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -138,13 +132,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
apr_socket_t* getSocket() const { return mSocket; }
|
apr_socket_t* getSocket() const { return mSocket; }
|
||||||
|
|
||||||
protected:
|
|
||||||
/**
|
|
||||||
* @brief Protected constructor since should only make sockets
|
|
||||||
* with one of the two <code>create()</code> calls.
|
|
||||||
*/
|
|
||||||
LLSocket(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set default socket options, with SO_NONBLOCK = 0 and a timeout in us.
|
* @brief Set default socket options, with SO_NONBLOCK = 0 and a timeout in us.
|
||||||
* @param timeout Number of microseconds to wait on this socket. Any
|
* @param timeout Number of microseconds to wait on this socket. Any
|
||||||
@@ -157,6 +144,13 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void setNonBlocking();
|
void setNonBlocking();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/**
|
||||||
|
* @brief Protected constructor since should only make sockets
|
||||||
|
* with one of the two <code>create()</code> calls.
|
||||||
|
*/
|
||||||
|
LLSocket(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Do not call this directly.
|
* @brief Do not call this directly.
|
||||||
|
|||||||
@@ -4,37 +4,31 @@
|
|||||||
* @date 2005-10-05
|
* @date 2005-10-05
|
||||||
* @brief Utility functionality for the io pipes.
|
* @brief Utility functionality for the io pipes.
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "linden_common.h"
|
#include "linden_common.h"
|
||||||
#include "llioutil.h"
|
|
||||||
#include "llfasttimer.h"
|
#include "llfasttimer.h"
|
||||||
|
#include "llioutil.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LLIOFlush
|
* LLIOFlush
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2005-10-05
|
* @date 2005-10-05
|
||||||
* @brief Helper classes for dealing with IOPipes
|
* @brief Helper classes for dealing with IOPipes
|
||||||
*
|
*
|
||||||
* $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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llloginflags.h
|
* @file llloginflags.h
|
||||||
* @brief Login flag constants.
|
* @brief Login flag constants.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmail.cpp
|
* @file llmail.cpp
|
||||||
* @brief smtp helper functions.
|
* @brief smtp helper functions.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmail.h
|
* @file llmail.h
|
||||||
* @brief smtp helper functions.
|
* @brief smtp helper functions.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagebuilder.cpp
|
* @file llmessagebuilder.cpp
|
||||||
* @brief LLMessageBuilder class implementation
|
* @brief LLMessageBuilder class implementation
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagebuilder.h
|
* @file llmessagebuilder.h
|
||||||
* @brief Declaration of LLMessageBuilder class.
|
* @brief Declaration of LLMessageBuilder class.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessageconfig.cpp
|
* @file llmessageconfig.cpp
|
||||||
* @brief Live file handling for messaging
|
* @brief Live file handling for messaging
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2000&license=viewergpl$
|
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2000-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessageconfig.h
|
* @file llmessageconfig.h
|
||||||
* @brief Live file handling for messaging
|
* @brief Live file handling for messaging
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2000&license=viewergpl$
|
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2000-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
// <edit>
|
|
||||||
#include "llmessagelog.h"
|
|
||||||
|
|
||||||
LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, U8* data, S32 data_size)
|
|
||||||
: mType(type),
|
|
||||||
mFromHost(from_host),
|
|
||||||
mToHost(to_host),
|
|
||||||
mDataSize(data_size)
|
|
||||||
{
|
|
||||||
if(data)
|
|
||||||
{
|
|
||||||
mData.resize(data_size);
|
|
||||||
memcpy(&(mData[0]), data, data_size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LLMessageLogEntry::LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, std::vector<U8> data, S32 data_size)
|
|
||||||
: mType(type),
|
|
||||||
mFromHost(from_host),
|
|
||||||
mToHost(to_host),
|
|
||||||
mDataSize(data_size),
|
|
||||||
mData(data)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
LLMessageLogEntry::~LLMessageLogEntry()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
U32 LLMessageLog::sMaxSize = 4096; // testzone fixme todo boom
|
|
||||||
std::deque<LLMessageLogEntry> LLMessageLog::sDeque;
|
|
||||||
void (*(LLMessageLog::sCallback))(LLMessageLogEntry);
|
|
||||||
void LLMessageLog::setMaxSize(U32 size)
|
|
||||||
{
|
|
||||||
sMaxSize = size;
|
|
||||||
while(sDeque.size() > sMaxSize)
|
|
||||||
sDeque.pop_front();
|
|
||||||
}
|
|
||||||
void LLMessageLog::setCallback(void (*callback)(LLMessageLogEntry))
|
|
||||||
{
|
|
||||||
sCallback = callback;
|
|
||||||
}
|
|
||||||
void LLMessageLog::log(LLHost from_host, LLHost to_host, U8* data, S32 data_size)
|
|
||||||
{
|
|
||||||
LLMessageLogEntry entry = LLMessageLogEntry(LLMessageLogEntry::TEMPLATE, from_host, to_host, data, data_size);
|
|
||||||
if(!entry.mDataSize || !entry.mData.size()) return;
|
|
||||||
if(sCallback) sCallback(entry);
|
|
||||||
if(!sMaxSize) return;
|
|
||||||
sDeque.push_back(entry);
|
|
||||||
if(sDeque.size() > sMaxSize)
|
|
||||||
sDeque.pop_front();
|
|
||||||
}
|
|
||||||
std::deque<LLMessageLogEntry> LLMessageLog::getDeque()
|
|
||||||
{
|
|
||||||
return sDeque;
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
// <edit>
|
|
||||||
#ifndef LL_LLMESSAGELOG_H
|
|
||||||
#define LL_LLMESSAGELOG_H
|
|
||||||
#include "stdtypes.h"
|
|
||||||
#include "llhost.h"
|
|
||||||
#include <queue>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
class LLMessageSystem;
|
|
||||||
class LLMessageLogEntry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
enum EType
|
|
||||||
{
|
|
||||||
TEMPLATE,
|
|
||||||
HTTP_REQUEST,
|
|
||||||
HTTP_RESPONSE
|
|
||||||
};
|
|
||||||
LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, U8* data, S32 data_size);
|
|
||||||
LLMessageLogEntry(EType type, LLHost from_host, LLHost to_host, std::vector<U8> data, S32 data_size);
|
|
||||||
~LLMessageLogEntry();
|
|
||||||
EType mType;
|
|
||||||
LLHost mFromHost;
|
|
||||||
LLHost mToHost;
|
|
||||||
S32 mDataSize;
|
|
||||||
std::vector<U8> mData;
|
|
||||||
};
|
|
||||||
class LLMessageLog
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static void setMaxSize(U32 size);
|
|
||||||
static void setCallback(void (*callback)(LLMessageLogEntry));
|
|
||||||
static void log(LLHost from_host, LLHost to_host, U8* data, S32 data_size);
|
|
||||||
static std::deque<LLMessageLogEntry> getDeque();
|
|
||||||
private:
|
|
||||||
static U32 sMaxSize;
|
|
||||||
static void (*sCallback)(LLMessageLogEntry);
|
|
||||||
static std::deque<LLMessageLogEntry> sDeque;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
// </edit>
|
|
||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagereader.cpp
|
* @file llmessagereader.cpp
|
||||||
* @brief LLMessageReader class implementation
|
* @brief LLMessageReader class implementation
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagereader.h
|
* @file llmessagereader.h
|
||||||
* @brief Declaration of LLMessageReader class.
|
* @brief Declaration of LLMessageReader class.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,26 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file llmessagesenderinterface.h
|
||||||
* @brief
|
* @brief
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2008-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagetemplate.cpp
|
* @file llmessagetemplate.cpp
|
||||||
* @brief Implementation of message template classes.
|
* @brief Implementation of message template classes.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagetemplate.h
|
* @file llmessagetemplate.h
|
||||||
* @brief Declaration of the message template classes.
|
* @brief Declaration of the message template classes.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagetemplateparser.cpp
|
* @file llmessagetemplateparser.cpp
|
||||||
* @brief LLMessageTemplateParser implementation
|
* @brief LLMessageTemplateParser implementation
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagetemplateparser.h
|
* @file llmessagetemplateparser.h
|
||||||
* @brief Classes to parse message template.
|
* @brief Classes to parse message template.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2000&license=viewergpl$
|
* $LicenseInfo:firstyear=2000&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2000-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagethrottle.cpp
|
* @file llmessagethrottle.cpp
|
||||||
* @brief LLMessageThrottle class used for throttling messages.
|
* @brief LLMessageThrottle class used for throttling messages.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmessagethrottle.h
|
* @file llmessagethrottle.h
|
||||||
* @brief LLMessageThrottle class used for throttling messages.
|
* @brief LLMessageThrottle class used for throttling messages.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2006-12-20
|
* @date 2006-12-20
|
||||||
* @brief Implementation of mime tools.
|
* @brief Implementation of mime tools.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2006-12-20
|
* @date 2006-12-20
|
||||||
* @brief Declaration of mime tools.
|
* @brief Declaration of mime tools.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2006&license=viewergpl$
|
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2006-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llmsgvariabletype.h
|
* @file llmsgvariabletype.h
|
||||||
* @brief Declaration of the EMsgVariableType enumeration.
|
* @brief Declaration of the EMsgVariableType enumeration.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llnamevalue.cpp
|
* @file llnamevalue.cpp
|
||||||
* @brief class for defining name value pairs.
|
* @brief class for defining name value pairs.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llnamevalue.h
|
* @file llnamevalue.h
|
||||||
* @brief class for defining name value pairs.
|
* @brief class for defining name value pairs.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llnullcipher.cpp
|
* @file llnullcipher.cpp
|
||||||
* @brief Implementation of a cipher which does not encrypt.
|
* @brief Implementation of a cipher which does not encrypt.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,25 @@
|
|||||||
/**
|
/**
|
||||||
* @file llnullcipher.h
|
* @file llnullcipher.h
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2007-05-09
|
* @date 2007-05-09
|
||||||
* @brief Implementation of the LLReliablePacket.
|
* @brief Implementation of the LLReliablePacket.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2007&license=viewergpl$
|
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2007-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llpacketack.h
|
* @file llpacketack.h
|
||||||
* @brief Reliable UDP helpers for the message system.
|
* @brief Reliable UDP helpers for the message system.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llpacketbuffer.cpp
|
* @file llpacketbuffer.cpp
|
||||||
* @brief implementation of LLPacketBuffer class for a packet.
|
* @brief implementation of LLPacketBuffer class for a packet.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -49,7 +43,7 @@ LLPacketBuffer::LLPacketBuffer(const LLHost &host, const char *datap, const S32
|
|||||||
{
|
{
|
||||||
llerrs << "Sending packet > " << NET_BUFFER_SIZE << " of size " << size << llendl;
|
llerrs << "Sending packet > " << NET_BUFFER_SIZE << " of size " << size << llendl;
|
||||||
}
|
}
|
||||||
else // we previously relied on llerrs being fatal to not get here...
|
else
|
||||||
{
|
{
|
||||||
if (datap != NULL)
|
if (datap != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief definition of LLPacketBuffer class for implementing a
|
* @brief definition of LLPacketBuffer class for implementing a
|
||||||
* resend, drop, or delay in packet transmissions.
|
* resend, drop, or delay in packet transmissions.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llpacketring.cpp
|
* @file llpacketring.cpp
|
||||||
* @brief implementation of LLPacketRing class for a packet.
|
* @brief implementation of LLPacketRing class for a packet.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -34,8 +28,6 @@
|
|||||||
|
|
||||||
#include "llpacketring.h"
|
#include "llpacketring.h"
|
||||||
|
|
||||||
#include "llsocks5.h"
|
|
||||||
|
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#else
|
#else
|
||||||
@@ -46,15 +38,11 @@
|
|||||||
// linden library includes
|
// linden library includes
|
||||||
#include "llerror.h"
|
#include "llerror.h"
|
||||||
#include "lltimer.h"
|
#include "lltimer.h"
|
||||||
|
#include "llproxy.h"
|
||||||
#include "llrand.h"
|
#include "llrand.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "timing.h"
|
#include "timing.h"
|
||||||
#include "u64.h"
|
#include "u64.h"
|
||||||
//<edit>
|
|
||||||
#include "llmessagelog.h"
|
|
||||||
|
|
||||||
//</edit>
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
LLPacketRing::LLPacketRing () :
|
LLPacketRing::LLPacketRing () :
|
||||||
@@ -237,9 +225,8 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// no delay, pull straight from net
|
// no delay, pull straight from net
|
||||||
if (LLSocks::isEnabled())
|
if (LLProxy::isSOCKSProxyEnabled())
|
||||||
{
|
{
|
||||||
const U8 SOCKS_HEADER_SIZE = 10;
|
|
||||||
U8 buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
|
U8 buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
|
||||||
packet_size = receive_packet(socket, static_cast<char*>(static_cast<void*>(buffer)));
|
packet_size = receive_packet(socket, static_cast<char*>(static_cast<void*>(buffer)));
|
||||||
|
|
||||||
@@ -260,7 +247,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
packet_size = receive_packet(socket, datap);
|
packet_size = receive_packet(socket, datap);
|
||||||
mLastSender = ::get_sender();
|
mLastSender = ::get_sender();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,11 +273,7 @@ S32 LLPacketRing::receivePacket (S32 socket, char *datap)
|
|||||||
|
|
||||||
BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host)
|
BOOL LLPacketRing::sendPacket(int h_socket, char * send_buffer, S32 buf_size, LLHost host)
|
||||||
{
|
{
|
||||||
//<edit>
|
|
||||||
LLMessageLog::log(LLHost(16777343, gMessageSystem->getListenPort()), host, (U8*)send_buffer, buf_size);
|
|
||||||
//</edit>
|
|
||||||
BOOL status = TRUE;
|
BOOL status = TRUE;
|
||||||
|
|
||||||
if (!mUseOutThrottle)
|
if (!mUseOutThrottle)
|
||||||
{
|
{
|
||||||
return sendPacketImpl(h_socket, send_buffer, buf_size, host );
|
return sendPacketImpl(h_socket, send_buffer, buf_size, host );
|
||||||
@@ -365,12 +348,11 @@ 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)
|
BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 buf_size, LLHost host)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!LLSocks::isEnabled())
|
if (!LLProxy::isSOCKSProxyEnabled())
|
||||||
{
|
{
|
||||||
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
const U8 SOCKS_HEADER_SIZE = 10;
|
|
||||||
char headered_send_buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
|
char headered_send_buffer[NET_BUFFER_SIZE + SOCKS_HEADER_SIZE];
|
||||||
|
|
||||||
proxywrap_t *socks_header = static_cast<proxywrap_t*>(static_cast<void*>(&headered_send_buffer));
|
proxywrap_t *socks_header = static_cast<proxywrap_t*>(static_cast<void*>(&headered_send_buffer));
|
||||||
@@ -385,6 +367,6 @@ BOOL LLPacketRing::sendPacketImpl(int h_socket, const char * send_buffer, S32 bu
|
|||||||
return send_packet( h_socket,
|
return send_packet( h_socket,
|
||||||
headered_send_buffer,
|
headered_send_buffer,
|
||||||
buf_size + SOCKS_HEADER_SIZE,
|
buf_size + SOCKS_HEADER_SIZE,
|
||||||
LLSocks::getInstance()->getUDPPproxy().getAddress(),
|
LLProxy::getInstance()->getUDPProxy().getAddress(),
|
||||||
LLSocks::getInstance()->getUDPPproxy().getPort());
|
LLProxy::getInstance()->getUDPProxy().getPort());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,31 +3,25 @@
|
|||||||
* @brief definition of LLPacketRing class for implementing a resend,
|
* @brief definition of LLPacketRing class for implementing a resend,
|
||||||
* drop, or delay in packet transmissions
|
* drop, or delay in packet transmissions
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2001-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,6 +32,7 @@
|
|||||||
|
|
||||||
#include "llhost.h"
|
#include "llhost.h"
|
||||||
#include "llpacketbuffer.h"
|
#include "llpacketbuffer.h"
|
||||||
|
#include "llproxy.h"
|
||||||
#include "llthrottle.h"
|
#include "llthrottle.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llpartdata.cpp
|
* @file llpartdata.cpp
|
||||||
* @brief Particle system data packing
|
* @brief Particle system data packing
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,31 +2,25 @@
|
|||||||
* @file llpartdata.h
|
* @file llpartdata.h
|
||||||
* @brief Particle system data packing
|
* @brief Particle system data packing
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2003&license=viewergpl$
|
* $LicenseInfo:firstyear=2003&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2003-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,31 +4,25 @@
|
|||||||
* @date 2004-11-21
|
* @date 2004-11-21
|
||||||
* @brief Implementation of the i/o pump and related functions.
|
* @brief Implementation of the i/o pump and related functions.
|
||||||
*
|
*
|
||||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||||
*
|
|
||||||
* Copyright (c) 2004-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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -40,12 +34,11 @@
|
|||||||
#include "apr_poll.h"
|
#include "apr_poll.h"
|
||||||
|
|
||||||
#include "llapr.h"
|
#include "llapr.h"
|
||||||
|
#include "llfasttimer.h"
|
||||||
#include "llmemtype.h"
|
#include "llmemtype.h"
|
||||||
#include "llstl.h"
|
#include "llstl.h"
|
||||||
#include "llstat.h"
|
#include "llstat.h"
|
||||||
#include "llthread.h"
|
#include "llthread.h"
|
||||||
#include "llfasttimer.h"
|
|
||||||
#include <iterator> //VS2010
|
|
||||||
|
|
||||||
// These should not be enabled in production, but they can be
|
// These should not be enabled in production, but they can be
|
||||||
// intensely useful during development for finding certain kinds of
|
// intensely useful during development for finding certain kinds of
|
||||||
@@ -191,10 +184,21 @@ LLPumpIO::LLPumpIO(void) :
|
|||||||
LLPumpIO::~LLPumpIO()
|
LLPumpIO::~LLPumpIO()
|
||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||||
cleanup();
|
#if LL_THREADS_APR
|
||||||
|
if (mChainsMutex) apr_thread_mutex_destroy(mChainsMutex);
|
||||||
|
if (mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex);
|
||||||
|
#endif
|
||||||
|
mChainsMutex = NULL;
|
||||||
|
mCallbackMutex = NULL;
|
||||||
|
if(mPollset)
|
||||||
|
{
|
||||||
|
// lldebugs << "cleaning up pollset" << llendl;
|
||||||
|
apr_pollset_destroy(mPollset);
|
||||||
|
mPollset = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LLPumpIO::addChain(const chain_t& chain, F32 timeout)
|
bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request)
|
||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||||
if(chain.empty()) return false;
|
if(chain.empty()) return false;
|
||||||
@@ -203,8 +207,10 @@ bool LLPumpIO::addChain(const chain_t& chain, F32 timeout)
|
|||||||
LLScopedLock lock(mChainsMutex);
|
LLScopedLock lock(mChainsMutex);
|
||||||
#endif
|
#endif
|
||||||
LLChainInfo info;
|
LLChainInfo info;
|
||||||
|
info.mHasCurlRequest = has_curl_request;
|
||||||
info.setTimeoutSeconds(timeout);
|
info.setTimeoutSeconds(timeout);
|
||||||
info.mData = LLIOPipe::buffer_ptr_t(new LLBufferArray);
|
info.mData = LLIOPipe::buffer_ptr_t(new LLBufferArray);
|
||||||
|
info.mData->setThreaded(has_curl_request);
|
||||||
LLLinkInfo link;
|
LLLinkInfo link;
|
||||||
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
#if LL_DEBUG_PIPE_TYPE_IN_PUMP
|
||||||
lldebugs << "LLPumpIO::addChain() " << chain[0] << " '"
|
lldebugs << "LLPumpIO::addChain() " << chain[0] << " '"
|
||||||
@@ -438,6 +444,15 @@ void LLPumpIO::pump()
|
|||||||
|
|
||||||
static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO");
|
static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO");
|
||||||
|
|
||||||
|
LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain)
|
||||||
|
{
|
||||||
|
std::for_each(
|
||||||
|
(*run_chain).mDescriptors.begin(),
|
||||||
|
(*run_chain).mDescriptors.end(),
|
||||||
|
ll_delete_apr_pollset_fd_client_data());
|
||||||
|
return mRunningChains.erase(run_chain);
|
||||||
|
}
|
||||||
|
|
||||||
//timeout is in microseconds
|
//timeout is in microseconds
|
||||||
void LLPumpIO::pump(const S32& poll_timeout)
|
void LLPumpIO::pump(const S32& poll_timeout)
|
||||||
{
|
{
|
||||||
@@ -583,10 +598,16 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
|||||||
// << (*run_chain).mChainLinks[0].mPipe
|
// << (*run_chain).mChainLinks[0].mPipe
|
||||||
// << " because we reached the end." << llendl;
|
// << " because we reached the end." << llendl;
|
||||||
#endif
|
#endif
|
||||||
run_chain = mRunningChains.erase(run_chain);
|
run_chain = removeRunningChain(run_chain);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(isChainExpired(*run_chain))
|
||||||
|
{
|
||||||
|
run_chain = removeRunningChain(run_chain);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
PUMP_DEBUG;
|
PUMP_DEBUG;
|
||||||
if((*run_chain).mLock)
|
if((*run_chain).mLock)
|
||||||
{
|
{
|
||||||
@@ -694,11 +715,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
|
|||||||
PUMP_DEBUG;
|
PUMP_DEBUG;
|
||||||
// This chain is done. Clean up any allocated memory and
|
// This chain is done. Clean up any allocated memory and
|
||||||
// erase the chain info.
|
// erase the chain info.
|
||||||
std::for_each(
|
run_chain = removeRunningChain(run_chain);
|
||||||
(*run_chain).mDescriptors.begin(),
|
|
||||||
(*run_chain).mDescriptors.end(),
|
|
||||||
ll_delete_apr_pollset_fd_client_data());
|
|
||||||
run_chain = mRunningChains.erase(run_chain);
|
|
||||||
|
|
||||||
// *NOTE: may not always need to rebuild the pollset.
|
// *NOTE: may not always need to rebuild the pollset.
|
||||||
mRebuildPollset = true;
|
mRebuildPollset = true;
|
||||||
@@ -833,22 +850,6 @@ void LLPumpIO::initialize(void)
|
|||||||
apr_thread_mutex_create(&mCallbackMutex, APR_THREAD_MUTEX_UNNESTED, mPool());
|
apr_thread_mutex_create(&mCallbackMutex, APR_THREAD_MUTEX_UNNESTED, mPool());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void LLPumpIO::cleanup()
|
|
||||||
{
|
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
|
||||||
#if LL_THREADS_APR
|
|
||||||
if (mChainsMutex) apr_thread_mutex_destroy(mChainsMutex);
|
|
||||||
if (mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex);
|
|
||||||
#endif
|
|
||||||
mChainsMutex = NULL;
|
|
||||||
mCallbackMutex = NULL;
|
|
||||||
if(mPollset)
|
|
||||||
{
|
|
||||||
// lldebugs << "cleaning up pollset" << llendl;
|
|
||||||
apr_pollset_destroy(mPollset);
|
|
||||||
mPollset = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLPumpIO::rebuildPollset()
|
void LLPumpIO::rebuildPollset()
|
||||||
{
|
{
|
||||||
@@ -1083,6 +1084,24 @@ void LLPumpIO::processChain(LLChainInfo& chain)
|
|||||||
PUMP_DEBUG;
|
PUMP_DEBUG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LLPumpIO::isChainExpired(LLChainInfo& chain)
|
||||||
|
{
|
||||||
|
if(!chain.mHasCurlRequest)
|
||||||
|
{
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(links_t::iterator iter = chain.mChainLinks.begin(); iter != chain.mChainLinks.end(); ++iter)
|
||||||
|
{
|
||||||
|
if(!(*iter).mPipe->isValid())
|
||||||
|
{
|
||||||
|
return true ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
|
|
||||||
bool LLPumpIO::handleChainError(
|
bool LLPumpIO::handleChainError(
|
||||||
LLChainInfo& chain,
|
LLChainInfo& chain,
|
||||||
LLIOPipe::EStatus error)
|
LLIOPipe::EStatus error)
|
||||||
@@ -1124,6 +1143,9 @@ bool LLPumpIO::handleChainError(
|
|||||||
#endif
|
#endif
|
||||||
keep_going = false;
|
keep_going = false;
|
||||||
break;
|
break;
|
||||||
|
case LLIOPipe::STATUS_EXPIRED:
|
||||||
|
keep_going = false;
|
||||||
|
break ;
|
||||||
default:
|
default:
|
||||||
if(LLIOPipe::isSuccess(error))
|
if(LLIOPipe::isSuccess(error))
|
||||||
{
|
{
|
||||||
@@ -1146,6 +1168,7 @@ LLPumpIO::LLChainInfo::LLChainInfo() :
|
|||||||
mInit(false),
|
mInit(false),
|
||||||
mLock(0),
|
mLock(0),
|
||||||
mEOS(false),
|
mEOS(false),
|
||||||
|
mHasCurlRequest(false),
|
||||||
mDescriptorsPool(new LLAPRPool(LLThread::tldata().mRootPool))
|
mDescriptorsPool(new LLAPRPool(LLThread::tldata().mRootPool))
|
||||||
{
|
{
|
||||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||||
@@ -1157,7 +1180,9 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
|
|||||||
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
|
||||||
if(timeout > 0.0f)
|
if(timeout > 0.0f)
|
||||||
{
|
{
|
||||||
mTimer.start(timeout);
|
mTimer.start();
|
||||||
|
mTimer.reset();
|
||||||
|
mTimer.setTimerExpirySec(timeout);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user