Merge with Firestorm LGPL tip

Ansariel 2013-03-14 11:04:28 +01:00
commit e310cd5657
26 changed files with 312 additions and 117 deletions

View File

@ -89,10 +89,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
#if (LL_TESTS OR NOT STANDALONE)
if (LL_TESTS OR NOT STANDALONE)
# Legacy C++ tests. Build always, run if LL_TESTS is true.
#add_subdirectory(${VIEWER_PREFIX}test)
#endif (LL_TESTS OR NOT STANDALONE)
add_subdirectory(${VIEWER_PREFIX}test)
endif (LL_TESTS OR NOT STANDALONE)
# viewer media plugins
add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)

View File

@ -158,14 +158,22 @@ if (LINUX)
OUTPUT_VARIABLE CXX_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
#<FS:ND> Gentoo defines _FORTIFY_SOURCE by default
if (NOT ${GXX_VERSION} MATCHES "Gentoo 4.7.*")
#</FS:ND>
if (${GXX_VERSION} STREQUAL ${CXX_VERSION})
# add_definitions(-D_FORTIFY_SOURCE=2)
add_definitions(-D_FORTIFY_SOURCE=2)
else (${GXX_VERSION} STREQUAL ${CXX_VERSION})
if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
add_definitions(-D_FORTIFY_SOURCE=2)
endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
#<FS:ND> Gentoo defines _FORTIFY_SOURCE by default
endif (NOT ${GXX_VERSION} MATCHES "Gentoo 4.7.*")
#</FS:ND>
# Let's actually get a numerical version of gxx's version
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION})
@ -181,6 +189,11 @@ if (LINUX)
set(CMAKE_CXX_FLAGS "-Wno-unused-but-set-variable ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION_NUMBER} GREATER 460)
#</FS:ND>
#<FS:ND> Disable attribute warnings for GCC >= 4.7. It causes a lot of warning/errors in boost.
if(${CXX_VERSION_NUMBER} GREATER 470)
set(CMAKE_CXX_FLAGS "-Wno-attributes ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION_NUMBER} GREATER 470)
#</FS:ND>
# End of hacks.

View File

@ -272,12 +272,12 @@ elseif(LINUX)
libexpat.so
libexpat.so.1
libGLOD.so
libgmock_main.so
libgmock.so.0
# libgmock_main.so
# libgmock.so.0
libgmodule-2.0.so
libgobject-2.0.so
libgtest_main.so
libgtest.so.0
# libgtest_main.so
# libgtest.so.0
libhunspell-1.3.so.0.0.0
libminizip.so
libopenal.so

View File

@ -1,6 +1,10 @@
# -*- cmake -*-
include(LLTestCommand)
include(GoogleMock)
# <FS:ND> Google Mock/Test is not used
#include(GoogleMock)
# </FS:ND>
include(Tut)
MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
@ -16,8 +20,9 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
#
# WARNING: do NOT modify this code without working with poppy -
# there is another branch that will conflict heavily with any changes here.
INCLUDE(GoogleMock)
# <FS:ND> Google Mock/Test is not used
#INCLUDE(GoogleMock)
# </FS:ND>
IF(LL_TEST_VERBOSE)
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}")

View File

@ -35,6 +35,11 @@
class LLTranslationBridge
{
public:
// <FS:ND> virtual dtor or dtors or derived class might not be properly called
virtual ~LLTranslationBridge()
{ }
// </FS:ND>
virtual std::string getString(const std::string &xml_desc) = 0;
};

View File

@ -645,6 +645,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
mCurrentDecodep = new LLVorbisDecodeState(uuid, d_path);
if (!mCurrentDecodep->initDecode())
{
gAudiop->markSoundCorrupt( uuid );
mCurrentDecodep = NULL;
}
}
@ -671,6 +672,11 @@ void LLAudioDecodeMgr::processQueue(const F32 num_secs)
BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
{
// <FS:ND> Protect against corrupted sounds. Just do a quit exit instead of trying to decode over and over.
if( gAudiop->isCorruptSound( uuid ) )
return FALSE;
// </FS:ND>
if (gAudiop->hasDecodedFile(uuid))
{
// Already have a decoded version, don't need to decode it.

View File

@ -676,6 +676,11 @@ void LLAudioEngine::cleanupBuffer(LLAudioBuffer *bufferp)
bool LLAudioEngine::preloadSound(const LLUUID &uuid)
{
// <FS:ND> Protect against corrupted sounds. Just do a quick exit instead of trying to preload over and over again.
if( gAudiop->isCorruptSound( uuid ) )
return false;
// </FS:ND>
gAudiop->getAudioData(uuid); // We don't care about the return value, this is just to make sure
// that we have an entry, which will mean that the audio engine knows about this
@ -955,6 +960,11 @@ LLAudioSource * LLAudioEngine::findAudioSource(const LLUUID &source_id)
LLAudioData * LLAudioEngine::getAudioData(const LLUUID &audio_uuid)
{
// <FS:ND> Protect against corrupted sounds. Just do a quick exit instead of trying to decode over and over again.
if( isCorruptSound( audio_uuid ) )
return 0;
// </FS:ND>
data_map::iterator iter;
iter = mAllData.find(audio_uuid);
if (iter == mAllData.end())
@ -1292,61 +1302,73 @@ std::map<LLUUID, LLSoundHistoryItem> gSoundHistory;
// static
void LLAudioSource::logSoundPlay(LLUUID id, LLAudioSource* audio_source, LLVector3d position, S32 type, LLUUID assetid, LLUUID ownerid, LLUUID sourceid, bool is_trigger, bool is_looped)
{
LLSoundHistoryItem item;
item.mID = id;
item.mAudioSource = audio_source;
item.mPosition = position;
item.mType = type;
item.mAssetID = assetid;
item.mOwnerID = ownerid;
item.mSourceID = sourceid;
item.mPlaying = true;
item.mTimeStarted = LLTimer::getElapsedSeconds();
item.mTimeStopped = F64_MAX;
item.mIsTrigger = is_trigger;
item.mIsLooped = is_looped;
// <FS:ND> Corrupt asset, do not bother
if( gAudiop->isCorruptSound( assetid ) )
return;
// </FS:ND>
item.mReviewed = false;
item.mReviewedCollision = false;
// <FS:ND> Do not overflow our log here.
if( gSoundHistory.size() > 2048 )
pruneSoundLog();
if( gSoundHistory.size() > 2048 )
return; // Might clear out oldest entries before giving up?
// </FS:ND>
gSoundHistory[id] = item;
LLSoundHistoryItem item;
item.mID = id;
item.mAudioSource = audio_source;
item.mPosition = position;
item.mType = type;
item.mAssetID = assetid;
item.mOwnerID = ownerid;
item.mSourceID = sourceid;
item.mPlaying = true;
item.mTimeStarted = LLTimer::getElapsedSeconds();
item.mTimeStopped = F64_MAX;
item.mIsTrigger = is_trigger;
item.mIsLooped = is_looped;
item.mReviewed = false;
item.mReviewedCollision = false;
gSoundHistory[id] = item;
}
// static
void LLAudioSource::logSoundStop(LLUUID id)
{
if(gSoundHistory.find(id) != gSoundHistory.end())
{
gSoundHistory[id].mPlaying = false;
gSoundHistory[id].mTimeStopped = LLTimer::getElapsedSeconds();
gSoundHistory[id].mAudioSource = NULL; // just in case
pruneSoundLog();
}
if(gSoundHistory.find(id) != gSoundHistory.end())
{
gSoundHistory[id].mPlaying = false;
gSoundHistory[id].mTimeStopped = LLTimer::getElapsedSeconds();
gSoundHistory[id].mAudioSource = NULL; // just in case
pruneSoundLog();
}
}
// static
void LLAudioSource::pruneSoundLog()
{
if(++gSoundHistoryPruneCounter >= 64)
{
gSoundHistoryPruneCounter = 0;
while(gSoundHistory.size() > 256)
{
std::map<LLUUID, LLSoundHistoryItem>::iterator iter = gSoundHistory.begin();
std::map<LLUUID, LLSoundHistoryItem>::iterator end = gSoundHistory.end();
U64 lowest_time = (*iter).second.mTimeStopped;
LLUUID lowest_id = (*iter).first;
for( ; iter != end; ++iter)
{
if((*iter).second.mTimeStopped < lowest_time)
{
lowest_time = (*iter).second.mTimeStopped;
lowest_id = (*iter).first;
}
}
gSoundHistory.erase(lowest_id);
}
}
if(++gSoundHistoryPruneCounter >= 64)
{
gSoundHistoryPruneCounter = 0;
while(gSoundHistory.size() > 256)
{
std::map<LLUUID, LLSoundHistoryItem>::iterator iter = gSoundHistory.begin();
std::map<LLUUID, LLSoundHistoryItem>::iterator end = gSoundHistory.end();
U64 lowest_time = (*iter).second.mTimeStopped;
LLUUID lowest_id = (*iter).first;
for( ; iter != end; ++iter)
{
if((*iter).second.mTimeStopped < lowest_time)
{
lowest_time = (*iter).second.mTimeStopped;
lowest_id = (*iter).first;
}
}
gSoundHistory.erase(lowest_id);
}
}
}
// NaCl End
@ -1399,6 +1421,7 @@ void LLAudioSource::update()
{
llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
mCorrupted = true ;
gAudiop->markSoundCorrupt( adp->getID() );
}
}
}
@ -1488,6 +1511,8 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
mAgeTimer.reset();
LLAudioData *adp = gAudiop->getAudioData(audio_uuid);
if( !adp )
return false;
addAudioData(adp);
if (isMuted())
@ -1879,3 +1904,26 @@ bool LLAudioData::load()
mBufferp->mAudioDatap = this;
return true;
}
// <FS:ND> Protect against corrupted sounds
const U32 ND_MAX_SOUNDRETRIES = 25;
void LLAudioEngine::markSoundCorrupt( LLUUID const &aId )
{
std::map<LLUUID,U32>::iterator itr = mCorruptData.find( aId );
if( mCorruptData.end() == itr )
mCorruptData[ aId ] = 1;
else if( itr->second != ND_MAX_SOUNDRETRIES )
itr->second += 1;
}
bool LLAudioEngine::isCorruptSound( LLUUID const &aId ) const
{
std::map<LLUUID,U32>::const_iterator itr = mCorruptData.find( aId );
if( mCorruptData.end() == itr )
return false;
return itr->second == ND_MAX_SOUNDRETRIES;
}
// </FS:ND>

View File

@ -253,6 +253,16 @@ protected:
private:
void setDefaults();
LLStreamingAudioInterface *mStreamingAudioImpl;
// <FS:ND> Protect against corrupted sounds
std::map<LLUUID,U32> mCorruptData;
public:
void markSoundCorrupt( LLUUID const & );
bool isCorruptSound( LLUUID const& ) const;
// </FS:ND>
};

View File

@ -2285,8 +2285,8 @@ void LLKeyframeDataCache::removeKeyframeData(const LLUUID& id)
keyframe_data_map_t::iterator found_data = sKeyframeDataMap.find(id);
if (found_data != sKeyframeDataMap.end())
{
// <FS:ND> FIRE-5385; Do not delete data directory, instead move it into the garbabe queue, so it gets deleted once no one holds a reference anymore.
// Otherwise it leeads to memory corruption etc.
// <FS:ND> FIRE-5385; Do not delete data directly, instead move it into the garbabe queue, so it gets deleted once no one holds a reference anymore.
// Otherwise it leads to memory corruption etc.
// delete found_data->second.mList;
// sKeyframeDataMap.erase(found_data);
@ -2330,8 +2330,16 @@ LLKeyframeDataCache::~LLKeyframeDataCache()
//-----------------------------------------------------------------------------
void LLKeyframeDataCache::clear()
{
// <FS:ND> FIRE-8144; Do not delete data directly, instead move it into the garbage queue, so it gets deleted once no one holds a reference anymore.
// Otherwise it leads to memory corruption etc.
// for( keyframe_data_map_t::iterator itr = sKeyframeDataMap.begin(); sKeyframeDataMap.end() != itr; ++itr )
// delete itr->second.mList;
for( keyframe_data_map_t::iterator itr = sKeyframeDataMap.begin(); sKeyframeDataMap.end() != itr; ++itr )
delete itr->second.mList;
mGarbage.push_back( itr->second.mList );
// </FS:ND>
sKeyframeDataMap.clear();
}

View File

@ -3,7 +3,11 @@
project(llcorehttp)
include(00-Common)
include(GoogleMock)
# <FS:ND> Google Mock/Test is not used
#include(GoogleMock)
# </FS:ND>
include(CURL)
include(CARes)
include(OpenSSL)

View File

@ -3,7 +3,11 @@
project(llmessage)
include(00-Common)
include(GoogleMock)
# <FS:ND> Google Mock/Test is not used
#include(GoogleMock)
# </FS:ND>
include(LLAddBuildTest)
include(LLCommon)
include(LLMath)

View File

@ -120,6 +120,11 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id,
mPeriodTime = mt_sec;
mLocalEndPointID.generate();
// <FS:ND> Throttle to prevent log spam.
mLastPacketLog = 0;
mLogMessagesSkipped = 0;
// </FS:ND>
}
@ -750,7 +755,22 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
}
else
{
llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl;
// <FS:ND> Throttle to prevent log spam.
// llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl;
if( (LLTimer::getTotalSeconds() - mLastPacketLog ) > 15 )
{
llinfos << "packet_out_of_order - got packet " << id << " expecting " << index << " from " << mHost << llendl;
llinfos << mLogMessagesSkipped << " since last log entry" << llendl;
mLastPacketLog = LLTimer::getTotalSeconds();
mLogMessagesSkipped = 0;
}
else
++mLogMessagesSkipped;
// </FS:ND>
if(gMessageSystem->mVerboseLog)
{
std::ostringstream str;

View File

@ -276,6 +276,11 @@ protected:
const F32 mHeartbeatInterval;
const F32 mHeartbeatTimeout;
// <FS:ND> Throttle to prevent log spam.
F64 mLastPacketLog;
U32 mLogMessagesSkipped;
// </FS:ND>
};

View File

@ -29,6 +29,7 @@
#include "fsconsoleutils.h"
#include "fsfloaternearbychat.h"
#include "lggcontactsets.h"
#include "llagent.h"
#include "llconsole.h"
@ -39,6 +40,13 @@
#include "llviewercontrol.h"
#include "rlvhandler.h"
// static
BOOL FSConsoleUtils::isNearbyChatVisible()
{
FSFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<FSFloaterNearbyChat>("fs_nearby_chat", LLSD());
return nearby_chat->getVisible();
}
// static
bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args)
{
@ -96,7 +104,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}
else
{
@ -119,7 +127,7 @@ bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}
return true;
@ -175,7 +183,7 @@ void FSConsoleUtils::onProcessChatAvatarNameLookup(const LLUUID& agent_id, const
LLColor4 chatcolor;
LLViewerChat::getChatColor(chat_msg, chatcolor);
gConsole->addConsoleLine(consoleChat, chatcolor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}
//static
@ -272,5 +280,5 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id,
}
gConsole->addConsoleLine("IM: " + senderName + delimiter + message, textColor);
gConsole->setVisible(!LLFloaterReg::instanceVisible("fs_nearby_chat", LLSD()));
gConsole->setVisible(!isNearbyChatVisible());
}

View File

@ -39,7 +39,7 @@ public:
static bool ProcessInstantMessage(const LLUUID& session_id, const LLUUID& from_id, const std::string& message);
protected:
static BOOL isNearbyChatVisible();
static void onProcessChatAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const LLChat& chat_msg);
static void onProccessInstantMessageNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str, const std::string& group);

View File

@ -264,14 +264,15 @@ BOOL LLFloaterTools::postBuild()
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
getChild<LLUICtrl>("checkbox stretch textures")->setValue((BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
//Phoenix:KC show highlight
// <FS:KC> show highlight
//mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label");
mCheckShowHighlight = getChild<LLCheckBoxCtrl>("checkbox show highlight");
mOrginalShowHighlight = gSavedSettings.getBOOL("RenderHighlightSelections");
mCheckShowHighlight->setValue(mOrginalShowHighlight);
mCheckActualRoot = getChild<LLCheckBoxCtrl>("checkbox actual root");
//mCheckStretchUniformLabel = getChild<LLTextBox>("checkbox uniform label");
// </FS:KC>
//
@ -327,7 +328,7 @@ BOOL LLFloaterTools::postBuild()
sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost");
//Phoenix:KC - added back more/less button
// <FS:KC> Added back more/less button
LLButton* btnExpand = getChild<LLButton>("btnExpand");
if (btnExpand)
{
@ -342,6 +343,7 @@ BOOL LLFloaterTools::postBuild()
{
gSavedSettings.setBOOL("FSToolboxExpanded", TRUE);
}
// </FS:KC>
return TRUE;
}
@ -369,8 +371,11 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mComboGridMode(NULL),
mCheckStretchUniform(NULL),
mCheckStretchTexture(NULL),
mCheckShowHighlight(NULL), //Phoenix:KC
mCheckActualRoot(NULL), //Phoenix:KC
// <FS:KC>
//mCheckStretchUniformLabel(NULL),
mCheckShowHighlight(NULL),
mCheckActualRoot(NULL),
// </FS:KC>
mBtnRotateLeft(NULL),
mBtnRotateReset(NULL),
@ -437,8 +442,10 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCommitCallbackRegistrar.add("BuildTool.LinkObjects", boost::bind(&LLSelectMgr::linkObjects, LLSelectMgr::getInstance()));
mCommitCallbackRegistrar.add("BuildTool.UnlinkObjects", boost::bind(&LLSelectMgr::unlinkObjects, LLSelectMgr::getInstance()));
// <FS>
mCommitCallbackRegistrar.add("BuildTool.CopyKeys", boost::bind(&LLFloaterTools::onClickBtnCopyKeys,this));
mCommitCallbackRegistrar.add("BuildTool.Expand", boost::bind(&LLFloaterTools::onClickExpand,this));
// </FS>
mLandImpactsObserver = new LLLandImpactsObserver();
LLViewerParcelMgr::getInstance()->addObserver(mLandImpactsObserver);
@ -492,11 +499,7 @@ void LLFloaterTools::refresh()
// Refresh object and prim count labels
LLLocale locale(LLLocale::USER_LOCALE);
//-TT 2.8.2 - from KC
//std::string obj_count_string;
//LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
//getChild<LLUICtrl>("obj_count")->setTextArg("[COUNT]", obj_count_string);
// <FS:KC>
std::string desc_string;
std::string num_string;
bool enable_link_count = true;
@ -562,11 +565,7 @@ void LLFloaterTools::refresh()
}
getChild<LLUICtrl>("link_num_obj_count")->setTextArg("[DESC]", desc_string);
getChild<LLUICtrl>("link_num_obj_count")->setTextArg("[NUM]", num_string);
// - KC
std::string prim_count_string;
LLResMgr::getInstance()->getIntegerString(prim_count_string, prim_count);
// <FS:Ansariel> Was removed from floater_tools.xml as part of SH-1719
//getChild<LLUICtrl>("prim_count")->setTextArg("[COUNT]", prim_count_string);
// </FS:KC>
#if 0
if (!gMeshRepo.meshRezEnabled())
{
@ -640,14 +639,10 @@ void LLFloaterTools::refresh()
childSetVisible("selection_empty", !have_selection);
}
// disable the object and prim counts if nothing selected
// <FS> disable the object and prim counts if nothing selected
bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty();
//getChildView("obj_count")->setEnabled(have_selection);
getChildView("link_num_obj_count")->setEnabled(have_selection && enable_link_count);
// <FS:Ansariel> Was removed from floater_tools.xml as part of SH-1719
//getChildView("prim_count")->setEnabled(have_selection);
// <FS:Ansariel> Was removed from floater_tools.xml as part of SH-1917 SH-1935
//getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost);
// </FS>
// Refresh child tabs
mPanelPermissions->refresh();
@ -858,8 +853,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
//mCheckSelectLinked ->setVisible( edit_visible );
if (mCheckStretchUniform) mCheckStretchUniform->setVisible( edit_visible );
if (mCheckStretchTexture) mCheckStretchTexture->setVisible( edit_visible );
if (mCheckShowHighlight) mCheckShowHighlight->setVisible( edit_visible ); //Phoenix:KC
if (mCheckActualRoot) mCheckActualRoot->setVisible( edit_visible ); //Phoenix:KC
// <FS:KC>
//if (mCheckStretchUniformLabel) mCheckStretchUniformLabel->setVisible( edit_visible );
if (mCheckShowHighlight) mCheckShowHighlight->setVisible( edit_visible );
if (mCheckActualRoot) mCheckActualRoot->setVisible( edit_visible );
// </FS:KC>
// Create buttons
BOOL create_visible = (tool == LLToolCompCreate::getInstance());
@ -955,13 +953,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
getChildView("Strength:")->setVisible( land_visible);
}
//getChildView("link_num_obj_count")->setVisible( !land_visible);
// <FS:Ansariel> Was removed from floater_tools.xml as part of SH-1719
//getChildView("prim_count")->setVisible( !land_visible);
// <FS>
static LLCachedControl<bool> sFSToolboxExpanded(gSavedSettings, "FSToolboxExpanded", TRUE);
mTab->setVisible(!land_visible && sFSToolboxExpanded);
mPanelLandInfo->setVisible(land_visible && sFSToolboxExpanded);
// </FS>
bool have_selection = !LLSelectMgr::getInstance()->getSelection()->isEmpty();
@ -988,7 +984,7 @@ void LLFloaterTools::onOpen(const LLSD& key)
mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
//Phoenix:KC - set the check box value from the saved setting
// <FS:KC> Set the check box value from the saved setting
// this function runs on selection change
if (!mOpen)
{
@ -996,6 +992,7 @@ void LLFloaterTools::onOpen(const LLSD& key)
mOrginalShowHighlight = gSavedSettings.getBOOL("RenderHighlightSelections");
mCheckShowHighlight->setValue(mOrginalShowHighlight);
}
// </FS:KC>
std::string panel = key.asString();
if (!panel.empty())
@ -1025,9 +1022,10 @@ void LLFloaterTools::onClose(bool app_quitting)
LLSelectMgr::getInstance()->promoteSelectionToRoot();
gSavedSettings.setBOOL("EditLinkedParts", FALSE);
//Reset silhouette override -KC
// <FS:KC>
gSavedSettings.setBOOL("RenderHighlightSelections", mOrginalShowHighlight);
mOpen = FALSE; //hack cause onOpen runs on every selection change but onClose doesnt.
// </FS:KC>
gViewerWindow->showCursor();

View File

@ -85,8 +85,10 @@ BOOL LLPanelFace::postBuild()
childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureInfo, this);
childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureInfo, this);
childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
// <FS>
childSetAction("copytextures",&LLPanelFace::onClickCopy,this);
childSetAction("pastetextures",&LLPanelFace::onClickPaste,this);
// </FS>
LLTextureCtrl* mTextureCtrl;
LLColorSwatchCtrl* mColorSwatch;
@ -507,12 +509,14 @@ void LLPanelFace::getState()
//
// //mBtnAutoFix->setEnabled ( editable );
// }
// <FS>
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
&& (selected_count == 1);
getChildView("copytextures")->setEnabled(single_volume && editable);
getChildView("pastetextures")->setEnabled(editable);
getChildView("textbox params")->setEnabled(single_volume && editable);
// </FS>
getChildView("button apply")->setEnabled(editable);
bool identical;

View File

@ -503,7 +503,7 @@ void LLPreviewGesture::addKeys()
combo->add( NONE_LABEL );
for (KEY key = ' '; key < KEY_NONE; key++)
{
char buffer[] = {key, '\0'};
char buffer[] = {(char)key, '\0'}; // <FS:ND/> Added (char) for proper array initialization
std::string str_org(buffer);
std::string str_translated = LLKeyboard::stringFromKey(key);

View File

@ -232,8 +232,8 @@ void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3
const F32 xyScaleInv = (1.f / xyScale)*(0.2222222222f);
F32 vec[3] = {
fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f),
fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f),
(F32)fmod((F32)(mOriginGlobal.mdV[0] + x)*xyScaleInv, 256.f), // <FS:ND/> Added (F32) for proper array initialization
(F32)fmod((F32)(mOriginGlobal.mdV[1] + y)*xyScaleInv, 256.f), // <FS:ND/> Added (F32) for proper array initialization
0.f
};
F32 rand_val = llclamp(noise2(vec)* 0.75f + 0.5f, 0.f, 1.f);

View File

@ -2670,10 +2670,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
(gRlvHandler.canReceiveIM(from_id)) )
// [/RLVa:KB]
{
// <FS:Ansariel> Log autoresponse notification after initial message
bool has_session = true;
// return a standard "busy" message, but only do it to online IM
// (i.e. not other auto responses and not store-and-forward IM)
if (!gIMMgr->hasSession(session_id))
{
// <FS:Ansariel> Log autoresponse notification after initial message
has_session = false;
// if there is not a panel for this conversation (i.e. it is a new IM conversation
// initiated by the other party) then...
std::string my_name;
@ -2703,25 +2709,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
IM_BUSY_AUTO_RESPONSE,
session_id);
gAgent.sendReliableMessage();
// <FS:LO> Fire-5389 - "Autoresponse Sent" message added to Firestorm as was in Phoenix
gIMMgr->addMessage(
session_id,
from_id,
LLStringUtil::null, // Pass null value so no name gets prepended
LLTrans::getString("IM_autoresponse_sent"),
my_name,
IM_NOTHING_SPECIAL,
parent_estate_id,
region_id,
position,
false, // <-- Wow! This parameter is never handled!!!
TRUE
);
// </FS:LO>
}
// <FS:Ansariel> checkfor and process reqinfo
if (gIMMgr->hasSession(session_id))
if (has_session)
{
message = FSData::getInstance()->processRequestForInfo(from_id,message,name,session_id);
}
@ -2745,6 +2736,25 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
region_id,
position,
true);
if (!has_session)
{
// <FS:LO> Fire-5389 - "Autoresponse Sent" message added to Firestorm as was in Phoenix
gIMMgr->addMessage(
session_id,
from_id,
LLStringUtil::null, // Pass null value so no name gets prepended
LLTrans::getString("IM_autoresponse_sent"),
name,
IM_NOTHING_SPECIAL,
parent_estate_id,
region_id,
position,
false, // <-- Wow! This parameter is never handled!!!
TRUE
);
// </FS:LO>
}
}
else if (from_id.isNull())
{
@ -5475,6 +5485,11 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_OwnerID, owner_id);
msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_ObjectID, object_id);
// <FS:ND> Protect against corrupted sounds
if( gAudiop->isCorruptSound( sound_id ) )
return;
// </FS:ND>
if(FSWSAssetBlacklist::getInstance()->isBlacklisted(sound_id,LLAssetType::AT_SOUND)){
return;
}
@ -5588,6 +5603,11 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
return;
// NaCl End
// <FS:ND> Protect against corrupted sounds
if( gAudiop->isCorruptSound( sound_id ) )
return;
// </FS:ND>
LLViewerObject *objectp = gObjectList.findObject(object_id);
if (!objectp) return;

View File

@ -761,8 +761,14 @@ LLVOAvatar::~LLVOAvatar()
debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding");
}
logPendingPhases();
// <FS:ND> only call logPendingPhases if we're still alive. Otherwise this can lead to shutdown crashes
// logPendingPhases();
if (isAgentAvatarValid())
logPendingPhases();
// </FS:ND>
lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl;
std::for_each(mAttachmentPoints.begin(), mAttachmentPoints.end(), DeletePairedPointer());

View File

@ -993,7 +993,11 @@ extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
std::string get_sequential_numbered_file_name(const std::string& prefix,
const std::string& suffix);
// <FS:ND> Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
void dump_visual_param(LLAPRFile::tFiletype* file, LLVisualParam* viewer_param, F32 value);
//</FS:ND>
#endif // LL_VOAVATAR_H

View File

@ -3440,7 +3440,11 @@ void LLVOAvatarSelf::dumpScratchTextureByteCount()
void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
{
apr_file_t* file = outfile.getFileHandle();
// <FS:ND> Remove LLVolatileAPRPool/apr_file_t and use FILE* instead
// apr_file_t* file = outfile.getFileHandle();
LLAPRFile::tFiletype* file = outfile.getFileHandle();
// </FS:ND>
if (!file)
{
return;

View File

@ -5081,6 +5081,8 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas
<string name="Command_Contact_Sets_Label">Contact sets</string>
<string name="Command_Mouselook_Label">Vista subjetiva</string>
<string name="Command_Landmark_Here_Label">Crear hito</string>
<string name="Command_Teleport_History_Label">Historial de teleportes</string>
<string name="Command_Pose_Stand_Label">Pose</string>
<string name="Command_AboutLand_Tooltip">
Información sobre el terreno que vas a visitar
</string>
@ -5180,6 +5182,12 @@ Inténtalo incluyendo la ruta de acceso al editor entre comillas
<string name="Command_Landmark_Here_Tooltip">
Crea un hito en tu posición actual
</string>
<string name="Command_Teleport_History_Tooltip">
Abre el historial de teleportes
</string>
<string name="Command_Pose_Stand_Tooltip">
Pose del avatar para ajustar accesorios
</string>
<string name="Toolbar_Bottom_Tooltip">
actualmente en tu barra de herramientas inferior
</string>

View File

@ -14,7 +14,9 @@ include(Linking)
include(Tut)
include(LLAddBuildTest)
include(GoogleMock)
# <FS:ND> Google Mock/Test is not used
#include(GoogleMock)
# </FS:ND>
include_directories(
${LLCOMMON_INCLUDE_DIRS}

View File

@ -51,11 +51,16 @@
# include "ctype_workaround.h"
#endif
// <FS:ND> Google Mock/Test is not used an either Windows/Mac/Linux
#if 0
#ifndef LL_WINDOWS
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#endif
#endif
// </FS:ND>
#if LL_MSVC
#pragma warning (push)
#pragma warning (disable : 4702) // warning C4702: unreachable code
@ -486,9 +491,17 @@ int main(int argc, char **argv)
{
// The following line must be executed to initialize Google Mock
// (and Google Test) before running the tests.
// <FS:ND> Google Mock/Test is not used an either Windows/Mac/Linux
#if 0
#ifndef LL_WINDOWS
::testing::InitGoogleMock(&argc, argv);
#endif
#endif
// </FS:ND>
// LOGTEST overrides default, but can be overridden by --debug or LOGFAIL.
const char* LOGTEST = getenv("LOGTEST");
if (LOGTEST)