merge
commit
2b79663021
1
.hgtags
1
.hgtags
|
|
@ -532,3 +532,4 @@ abcab37e1b29414ab8c03af9ca2ab489d809788a 5.0.7-release
|
|||
505a492f30bd925bb48e2e093ae77c3c2b4c740f 5.0.8-release
|
||||
40ca7118765be85a043b31b011e4ee6bd9e33c95 5.0.9-release
|
||||
ad0e15543836d64d6399d28b32852510435e344a 5.1.0-release
|
||||
26d9e9bb166a9a417f35b1863223a597af8185fd 5.1.1-release
|
||||
|
|
|
|||
|
|
@ -2213,6 +2213,35 @@
|
|||
<key>version</key>
|
||||
<string>0.9.3.506286</string>
|
||||
</map>
|
||||
<key>llca</key>
|
||||
<map>
|
||||
<key>copyright</key>
|
||||
<string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project.
|
||||
</string>
|
||||
<key>license</key>
|
||||
<string>mit</string>
|
||||
<key>license_file</key>
|
||||
<string>LICENSES/ca-license.txt</string>
|
||||
<key>name</key>
|
||||
<string>llca</string>
|
||||
<key>platforms</key>
|
||||
<map>
|
||||
<key>common</key>
|
||||
<map>
|
||||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>dd008981cac7ede93efa6cefe4ee61a0</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12484/73813/llca-201801172118.511910-common-511910.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>201801172118.511910</string>
|
||||
</map>
|
||||
<key>llphysicsextensions_source</key>
|
||||
<map>
|
||||
<key>copyright</key>
|
||||
|
|
@ -2991,9 +3020,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>8c2f921001a8ee29b826a45181465735</string>
|
||||
<string>511a9c3fd4b6c76a8a737d06bba1c291</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-slvoice/rev/314209/arch/Darwin/installer/slvoice-4.6.0017.21209.314209-darwin-314209.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/oz-426-slvoice/rev/330003/arch/Darwin/installer/slvoice-4.9.0002.27586.330003-darwin-330003.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -3003,9 +3032,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>c9b0d816cf14bebba138ea6f9f463553</string>
|
||||
<string>b1b0134bc55f55a7c1a04ee78d70c64d</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/614/1294/slvoice-4.6.0017.21209.500605-darwin64-500605.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12438/73598/slvoice-4.9.0002.27586.511884-darwin64-511884.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -3015,9 +3044,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>e5832a68562c3409a56a3583d101864b</string>
|
||||
<string>785c86999b56e1838cefb430f674cba7</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-slvoice/rev/314209/arch/Linux/installer/slvoice-3.2.0002.10426.314209-linux-314209.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/oz-426-slvoice/rev/330003/arch/Linux/installer/slvoice-3.2.0002.10426.330003-linux-330003.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
|
|
@ -3039,9 +3068,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>3ce62e3696f26a1e09e0c769280e5608</string>
|
||||
<string>ec50c31efce74bdedee470b5388aeeec</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/616/1300/slvoice-4.6.0017.21209.500605-windows-500605.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12434/73576/slvoice-4.9.0002.27586.511884-windows-511884.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3051,16 +3080,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>61c41dd565e2caa38bd0056970094749</string>
|
||||
<string>4bf45d641bf5b2bd6b2cc39edcb01a6e</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/615/1297/slvoice-4.6.0017.21209.500605-windows64-500605.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/12433/73570/slvoice-4.9.0002.27586.511884-windows64-511884.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>4.6.0017.21209.500605</string>
|
||||
<string>4.9.0002.27586.511884</string>
|
||||
</map>
|
||||
<key>tut</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,18 @@ if(WINDOWS)
|
|||
set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(vivox_files
|
||||
SLVoice.exe
|
||||
libsndfile-1.dll
|
||||
vivoxsdk.dll
|
||||
ortp.dll
|
||||
vivoxoal.dll
|
||||
)
|
||||
if (ADDRESS_SIZE EQUAL 64)
|
||||
list(APPEND vivox_files
|
||||
vivoxsdk_x64.dll
|
||||
ortp_x64.dll
|
||||
)
|
||||
else (ADDRESS_SIZE EQUAL 64)
|
||||
list(APPEND vivox_files
|
||||
vivoxsdk.dll
|
||||
ortp.dll
|
||||
)
|
||||
endif (ADDRESS_SIZE EQUAL 64)
|
||||
|
||||
#*******************************
|
||||
# Misc shared libs
|
||||
|
|
@ -151,8 +158,6 @@ elseif(DARWIN)
|
|||
set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(vivox_files
|
||||
SLVoice
|
||||
libsndfile.dylib
|
||||
libvivoxoal.dylib
|
||||
libortp.dylib
|
||||
libvivoxplatform.dylib
|
||||
libvivoxsdk.dylib
|
||||
|
|
@ -195,7 +200,6 @@ elseif(LINUX)
|
|||
libvivoxplatform.so
|
||||
libvivoxsdk.so
|
||||
SLVoice
|
||||
# ca-bundle.crt #No cert for linux. It is actually still 3.2SDK.
|
||||
)
|
||||
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||
# or ARCH_PREBUILT_DIRS
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
use_prebuilt_binary(llca)
|
||||
|
|
@ -1,4 +1,2 @@
|
|||
2014-02-25 10:34
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
|
|||
|
||||
LLDataPackerBinaryBuffer dp(anim_data, anim_file_size);
|
||||
|
||||
if (!deserialize(dp))
|
||||
if (!deserialize(dp, getID()))
|
||||
{
|
||||
LL_WARNS() << "Failed to decode asset for animation " << getName() << ":" << getID() << LL_ENDL;
|
||||
mAssetStatus = ASSET_FETCH_FAILED;
|
||||
|
|
@ -1221,7 +1221,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
|
|||
//-----------------------------------------------------------------------------
|
||||
// deserialize()
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
||||
BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp, const LLUUID& asset_id)
|
||||
{
|
||||
BOOL old_version = FALSE;
|
||||
mJointMotionList = new LLKeyframeMotion::JointMotionList;
|
||||
|
|
@ -1235,13 +1235,13 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if (!dp.unpackU16(version, "version"))
|
||||
{
|
||||
LL_WARNS() << "can't read version number" << LL_ENDL;
|
||||
LL_WARNS() << "can't read version number for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackU16(sub_version, "sub_version"))
|
||||
{
|
||||
LL_WARNS() << "can't read sub version number" << LL_ENDL;
|
||||
LL_WARNS() << "can't read sub version number for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1252,16 +1252,19 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
else if (version != KEYFRAME_MOTION_VERSION || sub_version != KEYFRAME_MOTION_SUBVERSION)
|
||||
{
|
||||
#if LL_RELEASE
|
||||
LL_WARNS() << "Bad animation version " << version << "." << sub_version << LL_ENDL;
|
||||
LL_WARNS() << "Bad animation version " << version << "." << sub_version
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
#else
|
||||
LL_ERRS() << "Bad animation version " << version << "." << sub_version << LL_ENDL;
|
||||
LL_ERRS() << "Bad animation version " << version << "." << sub_version
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!dp.unpackS32(temp_priority, "base_priority"))
|
||||
{
|
||||
LL_WARNS() << "can't read animation base_priority" << LL_ENDL;
|
||||
LL_WARNS() << "can't read animation base_priority"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
mJointMotionList->mBasePriority = (LLJoint::JointPriority) temp_priority;
|
||||
|
|
@ -1273,7 +1276,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
}
|
||||
else if (mJointMotionList->mBasePriority < LLJoint::USE_MOTION_PRIORITY)
|
||||
{
|
||||
LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority << LL_ENDL;
|
||||
LL_WARNS() << "bad animation base_priority " << mJointMotionList->mBasePriority
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1282,14 +1286,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
//-------------------------------------------------------------------------
|
||||
if (!dp.unpackF32(mJointMotionList->mDuration, "duration"))
|
||||
{
|
||||
LL_WARNS() << "can't read duration" << LL_ENDL;
|
||||
LL_WARNS() << "can't read duration"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (mJointMotionList->mDuration > MAX_ANIM_DURATION ||
|
||||
!llfinite(mJointMotionList->mDuration))
|
||||
{
|
||||
LL_WARNS() << "invalid animation duration" << LL_ENDL;
|
||||
LL_WARNS() << "invalid animation duration"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1298,13 +1304,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
//-------------------------------------------------------------------------
|
||||
if (!dp.unpackString(mJointMotionList->mEmoteName, "emote_name"))
|
||||
{
|
||||
LL_WARNS() << "can't read optional_emote_animation" << LL_ENDL;
|
||||
LL_WARNS() << "can't read optional_emote_animation"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(mJointMotionList->mEmoteName==mID.asString())
|
||||
{
|
||||
LL_WARNS() << "Malformed animation mEmoteName==mID" << LL_ENDL;
|
||||
LL_WARNS() << "Malformed animation mEmoteName==mID"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1314,20 +1322,23 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
if (!dp.unpackF32(mJointMotionList->mLoopInPoint, "loop_in_point") ||
|
||||
!llfinite(mJointMotionList->mLoopInPoint))
|
||||
{
|
||||
LL_WARNS() << "can't read loop point" << LL_ENDL;
|
||||
LL_WARNS() << "can't read loop point"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(mJointMotionList->mLoopOutPoint, "loop_out_point") ||
|
||||
!llfinite(mJointMotionList->mLoopOutPoint))
|
||||
{
|
||||
LL_WARNS() << "can't read loop point" << LL_ENDL;
|
||||
LL_WARNS() << "can't read loop point"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackS32(mJointMotionList->mLoop, "loop"))
|
||||
{
|
||||
LL_WARNS() << "can't read loop" << LL_ENDL;
|
||||
LL_WARNS() << "can't read loop"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1337,14 +1348,16 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
if (!dp.unpackF32(mJointMotionList->mEaseInDuration, "ease_in_duration") ||
|
||||
!llfinite(mJointMotionList->mEaseInDuration))
|
||||
{
|
||||
LL_WARNS() << "can't read easeIn" << LL_ENDL;
|
||||
LL_WARNS() << "can't read easeIn"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(mJointMotionList->mEaseOutDuration, "ease_out_duration") ||
|
||||
!llfinite(mJointMotionList->mEaseOutDuration))
|
||||
{
|
||||
LL_WARNS() << "can't read easeOut" << LL_ENDL;
|
||||
LL_WARNS() << "can't read easeOut"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1354,13 +1367,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
U32 word;
|
||||
if (!dp.unpackU32(word, "hand_pose"))
|
||||
{
|
||||
LL_WARNS() << "can't read hand pose" << LL_ENDL;
|
||||
LL_WARNS() << "can't read hand pose"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(word > LLHandMotion::NUM_HAND_POSES)
|
||||
{
|
||||
LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word << LL_ENDL;
|
||||
LL_WARNS() << "invalid LLHandMotion::eHandPose index: " << word
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1372,18 +1387,21 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
U32 num_motions = 0;
|
||||
if (!dp.unpackU32(num_motions, "num_joints"))
|
||||
{
|
||||
LL_WARNS() << "can't read number of joints" << LL_ENDL;
|
||||
LL_WARNS() << "can't read number of joints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (num_motions == 0)
|
||||
{
|
||||
LL_WARNS() << "no joints in animation" << LL_ENDL;
|
||||
LL_WARNS() << "no joints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
else if (num_motions > LL_CHARACTER_MAX_ANIMATED_JOINTS)
|
||||
{
|
||||
LL_WARNS() << "too many joints in animation" << LL_ENDL;
|
||||
LL_WARNS() << "too many joints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1404,13 +1422,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
std::string joint_name;
|
||||
if (!dp.unpackString(joint_name, "joint_name"))
|
||||
{
|
||||
LL_WARNS() << "can't read joint name" << LL_ENDL;
|
||||
LL_WARNS() << "can't read joint name"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (joint_name == "mScreen" || joint_name == "mRoot")
|
||||
{
|
||||
LL_WARNS() << "attempted to animate special " << joint_name << " joint" << LL_ENDL;
|
||||
LL_WARNS() << "attempted to animate special " << joint_name << " joint"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1424,14 +1444,17 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
// LL_INFOS() << " joint: " << joint_name << LL_ENDL;
|
||||
if ((joint_num >= (S32)LL_CHARACTER_MAX_ANIMATED_JOINTS) || (joint_num < 0))
|
||||
{
|
||||
LL_WARNS() << "Joint will be omitted from animation: joint_num " << joint_num << " is outside of legal range [0-"
|
||||
<< LL_CHARACTER_MAX_ANIMATED_JOINTS << ") for joint " << joint->getName() << LL_ENDL;
|
||||
LL_WARNS() << "Joint will be omitted from animation: joint_num " << joint_num
|
||||
<< " is outside of legal range [0-"
|
||||
<< LL_CHARACTER_MAX_ANIMATED_JOINTS << ") for joint " << joint->getName()
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
joint = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "joint not found: " << joint_name << LL_ENDL;
|
||||
LL_WARNS() << "invalid joint name: " << joint_name
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
//return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1448,13 +1471,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
S32 joint_priority;
|
||||
if (!dp.unpackS32(joint_priority, "joint_priority"))
|
||||
{
|
||||
LL_WARNS() << "can't read joint priority." << LL_ENDL;
|
||||
LL_WARNS() << "can't read joint priority."
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (joint_priority < LLJoint::USE_MOTION_PRIORITY)
|
||||
{
|
||||
LL_WARNS() << "joint priority unknown - too low." << LL_ENDL;
|
||||
LL_WARNS() << "joint priority unknown - too low."
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1472,7 +1497,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
//---------------------------------------------------------------------
|
||||
if (!dp.unpackS32(joint_motion->mRotationCurve.mNumKeys, "num_rot_keys") || joint_motion->mRotationCurve.mNumKeys < 0)
|
||||
{
|
||||
LL_WARNS() << "can't read number of rotation keys" << LL_ENDL;
|
||||
LL_WARNS() << "can't read number of rotation keys"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1497,7 +1523,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
if (!dp.unpackF32(time, "time") ||
|
||||
!llfinite(time))
|
||||
{
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL;
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1506,7 +1533,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
{
|
||||
if (!dp.unpackU16(time_short, "time"))
|
||||
{
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL;
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1514,7 +1542,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if (time < 0 || time > mJointMotionList->mDuration)
|
||||
{
|
||||
LL_WARNS() << "invalid frame time" << LL_ENDL;
|
||||
LL_WARNS() << "invalid frame time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1548,13 +1577,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if( !(rot_key.mRotation.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite angle in rotation key" << LL_ENDL;
|
||||
LL_WARNS() << "non-finite angle in rotation key"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
if (!success)
|
||||
{
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")" << LL_ENDL;
|
||||
LL_WARNS() << "can't read rotation key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1566,7 +1597,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
//---------------------------------------------------------------------
|
||||
if (!dp.unpackS32(joint_motion->mPositionCurve.mNumKeys, "num_pos_keys") || joint_motion->mPositionCurve.mNumKeys < 0)
|
||||
{
|
||||
LL_WARNS() << "can't read number of position keys" << LL_ENDL;
|
||||
LL_WARNS() << "can't read number of position keys"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1591,7 +1623,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
if (!dp.unpackF32(pos_key.mTime, "time") ||
|
||||
!llfinite(pos_key.mTime))
|
||||
{
|
||||
LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL;
|
||||
LL_WARNS() << "can't read position key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1599,7 +1632,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
{
|
||||
if (!dp.unpackU16(time_short, "time"))
|
||||
{
|
||||
LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL;
|
||||
LL_WARNS() << "can't read position key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1633,13 +1667,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if( !(pos_key.mPosition.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite position in key" << LL_ENDL;
|
||||
LL_WARNS() << "non-finite position in key"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
success = FALSE;
|
||||
}
|
||||
|
||||
if (!success)
|
||||
{
|
||||
LL_WARNS() << "can't read position key (" << k << ")" << LL_ENDL;
|
||||
LL_WARNS() << "can't read position key (" << k << ")"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1660,13 +1696,15 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
S32 num_constraints = 0;
|
||||
if (!dp.unpackS32(num_constraints, "num_constraints"))
|
||||
{
|
||||
LL_WARNS() << "can't read number of constraints" << LL_ENDL;
|
||||
LL_WARNS() << "can't read number of constraints"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (num_constraints > MAX_CONSTRAINTS || num_constraints < 0)
|
||||
{
|
||||
LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints << LL_ENDL;
|
||||
LL_WARNS() << "Bad number of constraints... ignoring: " << num_constraints
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1682,7 +1720,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if (!dp.unpackU8(byte, "chain_length"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint chain length" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint chain length"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1690,21 +1729,24 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if((U32)constraintp->mChainLength > mJointMotionList->getNumJointMotions())
|
||||
{
|
||||
LL_WARNS() << "invalid constraint chain length" << LL_ENDL;
|
||||
LL_WARNS() << "invalid constraint chain length"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackU8(byte, "constraint_type"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint type" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint type"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( byte >= NUM_CONSTRAINT_TYPES )
|
||||
{
|
||||
LL_WARNS() << "invalid constraint type" << LL_ENDL;
|
||||
LL_WARNS() << "invalid constraint type"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1714,7 +1756,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
U8 bin_data[BIN_DATA_LENGTH+1];
|
||||
if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "source_volume"))
|
||||
{
|
||||
LL_WARNS() << "can't read source volume name" << LL_ENDL;
|
||||
LL_WARNS() << "can't read source volume name"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1725,21 +1768,24 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if (!dp.unpackVector3(constraintp->mSourceConstraintOffset, "source_offset"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint source offset" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint source offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( !(constraintp->mSourceConstraintOffset.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite constraint source offset" << LL_ENDL;
|
||||
LL_WARNS() << "non-finite constraint source offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackBinaryDataFixed(bin_data, BIN_DATA_LENGTH, "target_volume"))
|
||||
{
|
||||
LL_WARNS() << "can't read target volume name" << LL_ENDL;
|
||||
LL_WARNS() << "can't read target volume name"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1759,28 +1805,32 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if (!dp.unpackVector3(constraintp->mTargetConstraintOffset, "target_offset"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint target offset" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint target offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( !(constraintp->mTargetConstraintOffset.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite constraint target offset" << LL_ENDL;
|
||||
LL_WARNS() << "non-finite constraint target offset"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackVector3(constraintp->mTargetConstraintDir, "target_dir"))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint target direction" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint target direction"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( !(constraintp->mTargetConstraintDir.isFinite()) )
|
||||
{
|
||||
LL_WARNS() << "non-finite constraint target direction" << LL_ENDL;
|
||||
LL_WARNS() << "non-finite constraint target direction"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1793,28 +1843,32 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if (!dp.unpackF32(constraintp->mEaseInStartTime, "ease_in_start") || !llfinite(constraintp->mEaseInStartTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease in start time" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint ease in start time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(constraintp->mEaseInStopTime, "ease_in_stop") || !llfinite(constraintp->mEaseInStopTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease in stop time" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint ease in stop time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(constraintp->mEaseOutStartTime, "ease_out_start") || !llfinite(constraintp->mEaseOutStartTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease out start time" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint ease out start time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!dp.unpackF32(constraintp->mEaseOutStopTime, "ease_out_stop") || !llfinite(constraintp->mEaseOutStopTime))
|
||||
{
|
||||
LL_WARNS() << "can't read constraint ease out stop time" << LL_ENDL;
|
||||
LL_WARNS() << "can't read constraint ease out stop time"
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1835,7 +1889,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
if (!parent)
|
||||
{
|
||||
LL_WARNS() << "Joint with no parent: " << joint->getName()
|
||||
<< " Emote: " << mJointMotionList->mEmoteName << LL_ENDL;
|
||||
<< " Emote: " << mJointMotionList->mEmoteName
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
joint = parent;
|
||||
|
|
@ -1846,7 +1901,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
|
||||
if ( !constraint_joint )
|
||||
{
|
||||
LL_WARNS() << "Invalid joint " << j << LL_ENDL;
|
||||
LL_WARNS() << "Invalid joint " << j
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1858,7 +1914,8 @@ BOOL LLKeyframeMotion::deserialize(LLDataPacker& dp)
|
|||
}
|
||||
if (constraintp->mJointStateIndices[i] < 0 )
|
||||
{
|
||||
LL_WARNS() << "No joint index for constraint " << i << LL_ENDL;
|
||||
LL_WARNS() << "No joint index for constraint " << i
|
||||
<< " for animation " << asset_id << LL_ENDL;
|
||||
delete constraintp;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -2262,7 +2319,7 @@ void LLKeyframeMotion::onLoadComplete(LLVFS *vfs,
|
|||
LL_DEBUGS("Animation") << "Loading keyframe data for: " << motionp->getName() << ":" << motionp->getID() << " (" << size << " bytes)" << LL_ENDL;
|
||||
|
||||
LLDataPackerBinaryBuffer dp(buffer, size);
|
||||
if (motionp->deserialize(dp))
|
||||
if (motionp->deserialize(dp, asset_uuid))
|
||||
{
|
||||
motionp->mAssetStatus = ASSET_LOADED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public:
|
|||
public:
|
||||
U32 getFileSize();
|
||||
BOOL serialize(LLDataPacker& dp) const;
|
||||
BOOL deserialize(LLDataPacker& dp);
|
||||
BOOL deserialize(LLDataPacker& dp, const LLUUID& asset_id);
|
||||
BOOL isLoaded() { return mJointMotionList != NULL; }
|
||||
void dumpToFile(const std::string& name);
|
||||
|
||||
|
|
|
|||
|
|
@ -291,37 +291,20 @@ void LLScopedLock::unlock()
|
|||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
bool ll_apr_warn_status(apr_status_t status)
|
||||
bool _ll_apr_warn_status(apr_status_t status, const char* file, int line)
|
||||
{
|
||||
if(APR_SUCCESS == status) return false;
|
||||
#if !LL_LINUX
|
||||
char buf[MAX_STRING]; /* Flawfinder: ignore */
|
||||
apr_strerror(status, buf, sizeof(buf));
|
||||
LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
|
||||
LL_WARNS("APR") << "APR: " << file << ":" << line << " " << buf << LL_ENDL;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ll_apr_warn_status(apr_status_t status, apr_dso_handle_t *handle)
|
||||
void _ll_apr_assert_status(apr_status_t status, const char* file, int line)
|
||||
{
|
||||
bool result = ll_apr_warn_status(status);
|
||||
// Despite observed truncation of actual Mac dylib load errors, increasing
|
||||
// this buffer to more than MAX_STRING doesn't help: it appears that APR
|
||||
// stores the output in a fixed 255-character internal buffer. (*sigh*)
|
||||
char buf[MAX_STRING]; /* Flawfinder: ignore */
|
||||
apr_dso_error(handle, buf, sizeof(buf));
|
||||
LL_WARNS("APR") << "APR: " << buf << LL_ENDL;
|
||||
return result;
|
||||
}
|
||||
|
||||
void ll_apr_assert_status(apr_status_t status)
|
||||
{
|
||||
llassert(! ll_apr_warn_status(status));
|
||||
}
|
||||
|
||||
void ll_apr_assert_status(apr_status_t status, apr_dso_handle_t *handle)
|
||||
{
|
||||
llassert(! ll_apr_warn_status(status, handle));
|
||||
llassert(! _ll_apr_warn_status(status, file, line));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -52,12 +52,11 @@ struct apr_dso_handle_t;
|
|||
* APR_SUCCESS.
|
||||
* @return Returns <code>true</code> if status is an error condition.
|
||||
*/
|
||||
bool LL_COMMON_API ll_apr_warn_status(apr_status_t status);
|
||||
/// There's a whole other APR error-message function if you pass a DSO handle.
|
||||
bool LL_COMMON_API ll_apr_warn_status(apr_status_t status, apr_dso_handle_t* handle);
|
||||
#define ll_apr_warn_status(status) _ll_apr_warn_status(status, __FILE__, __LINE__)
|
||||
bool LL_COMMON_API _ll_apr_warn_status(apr_status_t status, const char* file, int line);
|
||||
|
||||
void LL_COMMON_API ll_apr_assert_status(apr_status_t status);
|
||||
void LL_COMMON_API ll_apr_assert_status(apr_status_t status, apr_dso_handle_t* handle);
|
||||
#define ll_apr_assert_status(status) _ll_apr_assert_status(status, __FILE__, __LINE__)
|
||||
void LL_COMMON_API _ll_apr_assert_status(apr_status_t status, const char* file, int line);
|
||||
|
||||
extern "C" LL_COMMON_API apr_pool_t* gAPRPoolp; // Global APR memory pool
|
||||
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ namespace
|
|||
LOG_CLASS(LogControlFile);
|
||||
|
||||
public:
|
||||
static LogControlFile& fromDirectory(const std::string& dir);
|
||||
static LogControlFile& fromDirectory(const std::string& user_dir, const std::string& app_dir);
|
||||
|
||||
virtual bool loadFile();
|
||||
|
||||
|
|
@ -322,13 +322,12 @@ namespace
|
|||
{ }
|
||||
};
|
||||
|
||||
LogControlFile& LogControlFile::fromDirectory(const std::string& dir)
|
||||
LogControlFile& LogControlFile::fromDirectory(const std::string& user_dir, const std::string& app_dir)
|
||||
{
|
||||
std::string dirBase = dir + "/";
|
||||
// NB: We have no abstraction in llcommon for the "proper"
|
||||
// delimiter but it turns out that "/" works on all three platforms
|
||||
// NB: We have no abstraction in llcommon for the "proper"
|
||||
// delimiter but it turns out that "/" works on all three platforms
|
||||
|
||||
std::string file = dirBase + "logcontrol-dev.xml";
|
||||
std::string file = user_dir + "/logcontrol-dev.xml";
|
||||
|
||||
llstat stat_info;
|
||||
if (LLFile::stat(file, &stat_info)) {
|
||||
|
|
@ -336,7 +335,7 @@ namespace
|
|||
// if it doesn't exist. LLFile has no better abstraction for
|
||||
// testing for file existence.
|
||||
|
||||
file = dirBase + "logcontrol.xml";
|
||||
file = app_dir + "/logcontrol.xml";
|
||||
}
|
||||
return * new LogControlFile(file);
|
||||
// NB: This instance is never freed
|
||||
|
|
@ -363,7 +362,7 @@ namespace
|
|||
}
|
||||
|
||||
LLError::configure(configuration);
|
||||
LL_INFOS() << "logging reconfigured from " << filename() << LL_ENDL;
|
||||
LL_INFOS("LogControlFile") << "logging reconfigured from " << filename() << LL_ENDL;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -570,9 +569,12 @@ namespace LLError
|
|||
}
|
||||
#endif
|
||||
mFunctionString += std::string(mFunction) + ":";
|
||||
const std::string tag_hash("#");
|
||||
for (size_t i = 0; i < mTagCount; i++)
|
||||
{
|
||||
mTagString += std::string("#") + mTags[i] + ((i == mTagCount - 1) ? " " : ",");
|
||||
mTagString.append(tag_hash);
|
||||
mTagString.append(mTags[i]);
|
||||
mTagString.append((i == mTagCount - 1) ? ";" : ",");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -615,7 +617,7 @@ namespace
|
|||
}
|
||||
|
||||
|
||||
void commonInit(const std::string& dir, bool log_to_stderr = true)
|
||||
void commonInit(const std::string& user_dir, const std::string& app_dir, bool log_to_stderr = true)
|
||||
{
|
||||
LLError::Settings::getInstance()->reset();
|
||||
|
||||
|
|
@ -635,7 +637,7 @@ namespace
|
|||
LLError::addRecorder(recordToWinDebug);
|
||||
#endif
|
||||
|
||||
LogControlFile& e = LogControlFile::fromDirectory(dir);
|
||||
LogControlFile& e = LogControlFile::fromDirectory(user_dir, app_dir);
|
||||
|
||||
// NOTE: We want to explicitly load the file before we add it to the event timer
|
||||
// that checks for changes to the file. Else, we're not actually loading the file yet,
|
||||
|
|
@ -651,23 +653,9 @@ namespace
|
|||
|
||||
namespace LLError
|
||||
{
|
||||
void initForServer(const std::string& identity)
|
||||
void initForApplication(const std::string& user_dir, const std::string& app_dir, bool log_to_stderr)
|
||||
{
|
||||
std::string dir = "/opt/linden/etc";
|
||||
if (LLApp::instance())
|
||||
{
|
||||
dir = LLApp::instance()->getOption("configdir").asString();
|
||||
}
|
||||
commonInit(dir);
|
||||
#if !LL_WINDOWS
|
||||
LLError::RecorderPtr recordToSyslog(new RecordToSyslog(identity));
|
||||
addRecorder(recordToSyslog);
|
||||
#endif
|
||||
}
|
||||
|
||||
void initForApplication(const std::string& dir, bool log_to_stderr)
|
||||
{
|
||||
commonInit(dir, log_to_stderr);
|
||||
commonInit(user_dir, app_dir, log_to_stderr);
|
||||
}
|
||||
|
||||
void setPrintLocation(bool print)
|
||||
|
|
|
|||
|
|
@ -60,12 +60,7 @@ public:
|
|||
|
||||
namespace LLError
|
||||
{
|
||||
LL_COMMON_API void initForServer(const std::string& identity);
|
||||
// resets all logging settings to defaults needed by server processes
|
||||
// logs to stderr, syslog, and windows debug log
|
||||
// the identity string is used for in the syslog
|
||||
|
||||
LL_COMMON_API void initForApplication(const std::string& dir, bool log_to_stderr = true);
|
||||
LL_COMMON_API void initForApplication(const std::string& user_dir, const std::string& app_dir, bool log_to_stderr = true);
|
||||
// resets all logging settings to defaults needed by applicaitons
|
||||
// logs to stderr and windows debug log
|
||||
// sets up log configuration from the file logcontrol.xml in dir
|
||||
|
|
|
|||
|
|
@ -193,6 +193,14 @@ char* ll_pretty_print_sd(const LLSD& sd)
|
|||
return buffer;
|
||||
}
|
||||
|
||||
std::string ll_stream_notation_sd(const LLSD& sd)
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << LLSDOStreamer<LLSDNotationFormatter>(sd);
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
|
||||
//compares the structure of an LLSD to a template LLSD and stores the
|
||||
//"valid" values in a 3rd LLSD. Default values pulled from the template
|
||||
//if the tested LLSD does not contain the key/value pair.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ LL_COMMON_API char* ll_print_sd(const LLSD& sd);
|
|||
LL_COMMON_API char* ll_pretty_print_sd_ptr(const LLSD* sd);
|
||||
LL_COMMON_API char* ll_pretty_print_sd(const LLSD& sd);
|
||||
|
||||
LL_COMMON_API std::string ll_stream_notation_sd(const LLSD& sd);
|
||||
|
||||
//compares the structure of an LLSD to a template LLSD and stores the
|
||||
//"valid" values in a 3rd LLSD. Default values
|
||||
//are pulled from the template. Extra keys/values in the test
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ LLThreadSafeRefCount::~LLThreadSafeRefCount()
|
|||
{
|
||||
if (mRef != 0)
|
||||
{
|
||||
LL_ERRS() << "deleting non-zero reference" << LL_ENDL;
|
||||
LL_ERRS() << "deleting referenced object mRef = " << mRef << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,6 +180,10 @@ if (DARWIN)
|
|||
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libexception_handler.dylib ${LL_TEST_DESTINATION_DIR}
|
||||
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libexception_handler.dylib
|
||||
)
|
||||
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/libnghttp2*.dylib ${LL_TEST_DESTINATION_DIR}
|
||||
DEPENDS ${AUTOBUILD_INSTALL_DIR}/lib/release/libnghttp2.dylib
|
||||
)
|
||||
foreach(expat ${EXPAT_COPY})
|
||||
add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${AUTOBUILD_INSTALL_DIR}/lib/release/${expat} ${LL_TEST_DESTINATION_DIR}
|
||||
|
|
|
|||
|
|
@ -88,15 +88,18 @@ HttpStatus HttpPolicyGlobal::set(HttpRequest::EPolicyOption opt, const std::stri
|
|||
switch (opt)
|
||||
{
|
||||
case HttpRequest::PO_CA_PATH:
|
||||
LL_DEBUGS("CoreHttp") << "Setting global CA Path to " << value << LL_ENDL;
|
||||
mCAPath = value;
|
||||
break;
|
||||
|
||||
case HttpRequest::PO_CA_FILE:
|
||||
LL_DEBUGS("CoreHttp") << "Setting global CA File to " << value << LL_ENDL;
|
||||
mCAFile = value;
|
||||
break;
|
||||
|
||||
case HttpRequest::PO_HTTP_PROXY:
|
||||
mCAFile = value;
|
||||
LL_DEBUGS("CoreHttp") << "Setting global Proxy to " << value << LL_ENDL;
|
||||
mHttpProxy = value;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@
|
|||
///
|
||||
|
||||
#include "linden_common.h" // Modifies curl/curl.h interfaces
|
||||
#include "llsd.h"
|
||||
#include "boost/intrusive_ptr.hpp"
|
||||
#include "boost/shared_ptr.hpp"
|
||||
#include "boost/weak_ptr.hpp"
|
||||
|
|
@ -447,14 +448,14 @@ struct HttpStatus
|
|||
mDetails->mMessage = message;
|
||||
}
|
||||
|
||||
/// Retrieves an optionally recorded SSL certificate.
|
||||
void * getErrorData() const
|
||||
/// Retrieves data about an optionally recorded SSL certificate.
|
||||
LLSD getErrorData() const
|
||||
{
|
||||
return mDetails->mErrorData;
|
||||
}
|
||||
|
||||
/// Optionally sets an SSL certificate on this status.
|
||||
void setErrorData(void *data)
|
||||
void setErrorData(LLSD data)
|
||||
{
|
||||
mDetails->mErrorData = data;
|
||||
}
|
||||
|
|
@ -467,7 +468,7 @@ private:
|
|||
mType(type),
|
||||
mStatus(status),
|
||||
mMessage(),
|
||||
mErrorData(NULL)
|
||||
mErrorData()
|
||||
{}
|
||||
|
||||
Details(const Details &rhs) :
|
||||
|
|
@ -485,7 +486,7 @@ private:
|
|||
type_enum_t mType;
|
||||
short mStatus;
|
||||
std::string mMessage;
|
||||
void * mErrorData;
|
||||
LLSD mErrorData;
|
||||
};
|
||||
|
||||
boost::shared_ptr<Details> mDetails;
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ bool LLCrashLogger::init()
|
|||
// We assume that all the logs we're looking for reside on the current drive
|
||||
gDirUtilp->initAppDirs("SecondLife");
|
||||
|
||||
LLError::initForApplication(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
|
||||
LLError::initForApplication(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""), gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
|
||||
|
||||
// Default to the product name "Second Life" (this is overridden by the -name argument)
|
||||
mProductName = "Second Life";
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void logMessageSuccess(std::string logAuth, std::string url, std::string message
|
|||
|
||||
void logMessageFail(std::string logAuth, std::string url, std::string message)
|
||||
{
|
||||
LL_WARNS("CoreHTTP") << logAuth << " Failure '" << message << "' for " << url << LL_ENDL;
|
||||
LL_INFOS("CoreHTTP") << logAuth << " Possible failure '" << message << "' for " << url << LL_ENDL;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
|
|
@ -279,10 +279,11 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons
|
|||
result = LLSD::emptyMap();
|
||||
LLCore::HttpStatus::type_enum_t errType = status.getType();
|
||||
|
||||
LL_WARNS("CoreHTTP")
|
||||
<< " Error[" << status.toTerseString() << "] cannot "<< response->getRequestMethod()
|
||||
<< " to url '" << response->getRequestURL()
|
||||
<< "' because " << status.toString() << LL_ENDL;
|
||||
LL_INFOS()
|
||||
<< "Possible failure [" << status.toTerseString() << "] cannot "<< response->getRequestMethod()
|
||||
<< " url '" << response->getRequestURL()
|
||||
<< "' because " << status.toString()
|
||||
<< LL_ENDL;
|
||||
if ((errType >= 400) && (errType < 500))
|
||||
{
|
||||
LLSD body = this->parseBody(response, parseSuccess);
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ int main(int argc, char **argv)
|
|||
|
||||
// Set up llerror logging
|
||||
{
|
||||
LLError::initForApplication(".");
|
||||
LLError::initForApplication(".",".");
|
||||
LLError::setDefaultLevel(LLError::LEVEL_INFO);
|
||||
// LLError::setTagLevel("Plugin", LLError::LEVEL_DEBUG);
|
||||
// LLError::logToFile("slplugin.log");
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name,
|
|||
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
|
||||
}
|
||||
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
|
||||
}
|
||||
|
||||
U32 LLDir_Linux::countFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ void LLDir_Mac::initAppDirs(const std::string &app_name,
|
|||
mAppRODataDir = app_read_only_data_dir;
|
||||
mSkinBaseDir = mAppRODataDir + mDirDelimiter + "skins";
|
||||
}
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
|
||||
}
|
||||
|
||||
std::string LLDir_Mac::getCurPath()
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ void LLDir_Solaris::initAppDirs(const std::string &app_name,
|
|||
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
|
||||
}
|
||||
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
|
||||
}
|
||||
|
||||
U32 LLDir_Solaris::countFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void LLDir_Win32::initAppDirs(const std::string &app_name,
|
|||
LL_WARNS() << "Couldn't create LL_PATH_CACHE dir " << getExpandedFilename(LL_PATH_CACHE,"") << LL_ENDL;
|
||||
}
|
||||
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
mCAFile = getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
|
||||
}
|
||||
|
||||
U32 LLDir_Win32::countFilesInDir(const std::string &dirname, const std::string &mask)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ include(JsonCpp)
|
|||
include(LLAppearance)
|
||||
include(LLBase)
|
||||
include(LLAudio)
|
||||
include(LLCA)
|
||||
include(LLCharacter)
|
||||
include(LLCommon)
|
||||
include(LLCoreHttp)
|
||||
|
|
@ -1627,6 +1628,7 @@ set(viewer_APPSETTINGS_FILES
|
|||
app_settings/viewerart.xml
|
||||
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
||||
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
||||
${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
|
||||
packages-info.txt
|
||||
)
|
||||
|
||||
|
|
@ -1751,8 +1753,6 @@ if (WINDOWS)
|
|||
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll
|
||||
${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ca-bundle.crt
|
||||
|
|
@ -1773,6 +1773,18 @@ if (WINDOWS)
|
|||
windows-crash-logger
|
||||
)
|
||||
|
||||
if (ADDRESS_SIZE EQUAL 64)
|
||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp_x64.dll
|
||||
)
|
||||
else (ADDRESS_SIZE EQUAL 64)
|
||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
|
||||
${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
|
||||
)
|
||||
endif (ADDRESS_SIZE EQUAL 64)
|
||||
|
||||
if (FMODEX)
|
||||
list(APPEND COPY_INPUT_DEPENDENCIES
|
||||
${SHARED_LIB_STAGING_DIR}/Release/fmodex.dll
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
5.1.1
|
||||
5.1.2
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -14032,7 +14032,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>VivoxDebugLevel</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -157,9 +157,19 @@ void LLAppCoreHttp::init()
|
|||
}
|
||||
|
||||
// Point to our certs or SSH/https: will fail on connect
|
||||
status = LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_CA_FILE,
|
||||
LLCore::HttpRequest::GLOBAL_POLICY_ID,
|
||||
gDirUtilp->getCAFile(), NULL);
|
||||
std::string ca_file = gDirUtilp->getCAFile();
|
||||
if ( LLFile::isfile(ca_file) )
|
||||
{
|
||||
LL_DEBUGS("Init") << "Setting CA File to " << ca_file << LL_ENDL;
|
||||
status = LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_CA_FILE,
|
||||
LLCore::HttpRequest::GLOBAL_POLICY_ID,
|
||||
ca_file, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_ERRS("Init") << "Missing CA File; should be at " << ca_file << LL_ENDL;
|
||||
}
|
||||
|
||||
if (! status)
|
||||
{
|
||||
LL_ERRS("Init") << "Failed to set CA File for HTTP services. Reason: " << status.toString()
|
||||
|
|
@ -540,9 +550,8 @@ LLCore::HttpStatus LLAppCoreHttp::sslVerify(const std::string &url,
|
|||
// error codes. Should be refactored with login refactoring, perhaps.
|
||||
result = LLCore::HttpStatus(LLCore::HttpStatus::EXT_CURL_EASY, CURLE_SSL_CACERT);
|
||||
result.setMessage(cert_exception.what());
|
||||
LLPointer<LLCertificate> cert = cert_exception.getCert();
|
||||
cert->ref(); // adding an extra ref here
|
||||
result.setErrorData(cert.get());
|
||||
LLSD certdata = cert_exception.getCertData();
|
||||
result.setErrorData(certdata);
|
||||
// We should probably have a more generic way of passing information
|
||||
// back to the error handlers.
|
||||
}
|
||||
|
|
@ -550,9 +559,8 @@ LLCore::HttpStatus LLAppCoreHttp::sslVerify(const std::string &url,
|
|||
{
|
||||
result = LLCore::HttpStatus(LLCore::HttpStatus::EXT_CURL_EASY, CURLE_SSL_PEER_CERTIFICATE);
|
||||
result.setMessage(cert_exception.what());
|
||||
LLPointer<LLCertificate> cert = cert_exception.getCert();
|
||||
cert->ref(); // adding an extra ref here
|
||||
result.setErrorData(cert.get());
|
||||
LLSD certdata = cert_exception.getCertData();
|
||||
result.setErrorData(certdata);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2187,8 +2187,9 @@ void LLAppViewer::initLoggingAndGetLastDuration()
|
|||
//
|
||||
// Set up logging defaults for the viewer
|
||||
//
|
||||
LLError::initForApplication(
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
|
||||
LLError::initForApplication( gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "")
|
||||
,gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "")
|
||||
);
|
||||
LLError::setFatalFunction(errorCallback);
|
||||
//LLError::setTimeFunction(getRuntime);
|
||||
|
||||
|
|
|
|||
|
|
@ -324,18 +324,19 @@ bool LLFeatureManager::parseFeatureTable(std::string filename)
|
|||
|
||||
// Check file version
|
||||
file >> name;
|
||||
file >> version;
|
||||
if (name != "version")
|
||||
{
|
||||
LL_WARNS("RenderInit") << filename << " does not appear to be a valid feature table!" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
file >> version;
|
||||
|
||||
mTableVersion = version;
|
||||
LL_INFOS("RenderInit") << "Found feature table version " << version << LL_ENDL;
|
||||
|
||||
LLFeatureList *flp = NULL;
|
||||
bool parse_ok = true;
|
||||
while (file >> name && parse_ok)
|
||||
while (parse_ok && file >> name )
|
||||
{
|
||||
char buffer[MAX_STRING]; /*Flawfinder: ignore*/
|
||||
|
||||
|
|
@ -345,7 +346,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename)
|
|||
file.getline(buffer, MAX_STRING);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (name == "list")
|
||||
{
|
||||
LL_DEBUGS("RenderInit") << "Before new list" << std::endl;
|
||||
|
|
@ -368,7 +369,7 @@ bool LLFeatureManager::parseFeatureTable(std::string filename)
|
|||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("RenderInit") << "Overriding mask " << name << ", this is invalid!" << LL_ENDL;
|
||||
LL_WARNS("RenderInit") << "Overriding mask '" << name << "'; this is invalid!" << LL_ENDL;
|
||||
parse_ok = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ BOOL LLFloaterBvhPreview::postBuild()
|
|||
loaderp->serialize(dp);
|
||||
dp.reset();
|
||||
LL_INFOS("BVH") << "Deserializing motionp" << LL_ENDL;
|
||||
BOOL success = motionp && motionp->deserialize(dp);
|
||||
BOOL success = motionp && motionp->deserialize(dp, mMotionID);
|
||||
LL_INFOS("BVH") << "Done" << LL_ENDL;
|
||||
|
||||
delete []buffer;
|
||||
|
|
|
|||
|
|
@ -881,8 +881,100 @@ void LLViewerObjectList::renderObjectBeacons()
|
|||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// gpu_benchmark() helper classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// This struct is used to ensure that once we call initProfile(), it will
|
||||
// definitely be matched by a corresponding call to finishProfile(). It's
|
||||
// a struct rather than a class simply because every member is public.
|
||||
struct ShaderProfileHelper
|
||||
{
|
||||
ShaderProfileHelper()
|
||||
{
|
||||
LLGLSLShader::initProfile();
|
||||
}
|
||||
~ShaderProfileHelper()
|
||||
{
|
||||
LLGLSLShader::finishProfile(false);
|
||||
}
|
||||
};
|
||||
|
||||
// This helper class is used to ensure that each generateTextures() call
|
||||
// is matched by a corresponding deleteTextures() call. It also handles
|
||||
// the bindManual() calls using those textures.
|
||||
class TextureHolder
|
||||
{
|
||||
public:
|
||||
TextureHolder(U32 unit, U32 size) :
|
||||
texUnit(gGL.getTexUnit(unit)),
|
||||
source(size) // preallocate vector
|
||||
{
|
||||
// takes (count, pointer)
|
||||
// &vector[0] gets pointer to contiguous array
|
||||
LLImageGL::generateTextures(source.size(), &source[0]);
|
||||
}
|
||||
|
||||
~TextureHolder()
|
||||
{
|
||||
// unbind
|
||||
if (texUnit)
|
||||
{
|
||||
texUnit->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
// ensure that we delete these textures regardless of how we exit
|
||||
LLImageGL::deleteTextures(source.size(), &source[0]);
|
||||
}
|
||||
|
||||
bool bind(U32 index)
|
||||
{
|
||||
if (texUnit) // should always be there with dummy (-1), but just in case
|
||||
{
|
||||
return texUnit->bindManual(LLTexUnit::TT_TEXTURE, source[index]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
// capture which LLTexUnit we're going to use
|
||||
LLTexUnit* texUnit;
|
||||
|
||||
// use std::vector for implicit resource management
|
||||
std::vector<U32> source;
|
||||
};
|
||||
|
||||
class ShaderBinder
|
||||
{
|
||||
public:
|
||||
ShaderBinder(LLGLSLShader& shader) :
|
||||
mShader(shader)
|
||||
{
|
||||
mShader.bind();
|
||||
}
|
||||
~ShaderBinder()
|
||||
{
|
||||
mShader.unbind();
|
||||
}
|
||||
|
||||
private:
|
||||
LLGLSLShader& mShader;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// gpu_benchmark()
|
||||
//-----------------------------------------------------------------------------
|
||||
F32 gpu_benchmark()
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
if (gGLManager.mIsIntel
|
||||
&& std::string::npos != LLOSInfo::instance().getOSStringSimple().find("Microsoft Windows 8")) // or 8.1
|
||||
{ // don't run benchmark on Windows 8/8.1 based PCs with Intel GPU (MAINT-8197)
|
||||
LL_WARNS() << "Skipping gpu_benchmark() for Intel graphics on Windows 8." << LL_ENDL;
|
||||
return -1.f;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!gGLManager.mHasShaderObjects || !gGLManager.mHasTimerQuery)
|
||||
{ // don't bother benchmarking the fixed function
|
||||
// or venerable drivers which don't support accurate timing anyway
|
||||
|
|
@ -922,59 +1014,9 @@ F32 gpu_benchmark()
|
|||
|
||||
//number of samples to take
|
||||
const S32 samples = 64;
|
||||
|
||||
// This struct is used to ensure that once we call initProfile(), it will
|
||||
// definitely be matched by a corresponding call to finishProfile(). It's
|
||||
// a struct rather than a class simply because every member is public.
|
||||
struct ShaderProfileHelper
|
||||
{
|
||||
ShaderProfileHelper()
|
||||
{
|
||||
LLGLSLShader::initProfile();
|
||||
}
|
||||
~ShaderProfileHelper()
|
||||
{
|
||||
LLGLSLShader::finishProfile(false);
|
||||
}
|
||||
};
|
||||
|
||||
ShaderProfileHelper initProfile;
|
||||
|
||||
// This helper class is used to ensure that each generateTextures() call
|
||||
// is matched by a corresponding deleteTextures() call. It also handles
|
||||
// the bindManual() calls using those textures.
|
||||
class TextureHolder
|
||||
{
|
||||
public:
|
||||
TextureHolder(U32 unit, U32 size):
|
||||
texUnit(gGL.getTexUnit(unit)),
|
||||
source(size) // preallocate vector
|
||||
{
|
||||
// takes (count, pointer)
|
||||
// &vector[0] gets pointer to contiguous array
|
||||
LLImageGL::generateTextures(source.size(), &source[0]);
|
||||
}
|
||||
|
||||
~TextureHolder()
|
||||
{
|
||||
// unbind
|
||||
texUnit->unbind(LLTexUnit::TT_TEXTURE);
|
||||
// ensure that we delete these textures regardless of how we exit
|
||||
LLImageGL::deleteTextures(source.size(), &source[0]);
|
||||
}
|
||||
|
||||
void bind(U32 index)
|
||||
{
|
||||
texUnit->bindManual(LLTexUnit::TT_TEXTURE, source[index]);
|
||||
}
|
||||
|
||||
private:
|
||||
// capture which LLTexUnit we're going to use
|
||||
LLTexUnit* texUnit;
|
||||
|
||||
// use std::vector for implicit resource management
|
||||
std::vector<U32> source;
|
||||
};
|
||||
|
||||
|
||||
std::vector<LLRenderTarget> dest(count);
|
||||
TextureHolder texHolder(0, count);
|
||||
std::vector<F32> results;
|
||||
|
|
@ -987,18 +1029,31 @@ F32 gpu_benchmark()
|
|||
pixels[i] = (U8) ll_rand(255);
|
||||
}
|
||||
|
||||
|
||||
gGL.setColorMask(true, true);
|
||||
LLGLDepthTest depth(GL_FALSE);
|
||||
|
||||
for (U32 i = 0; i < count; ++i)
|
||||
{ //allocate render targets and textures
|
||||
dest[i].allocate(res,res,GL_RGBA,false, false, LLTexUnit::TT_TEXTURE, true);
|
||||
{
|
||||
//allocate render targets and textures
|
||||
if (!dest[i].allocate(res, res, GL_RGBA, false, false, LLTexUnit::TT_TEXTURE, true))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate render target." << LL_ENDL;
|
||||
// abandon the benchmark test
|
||||
delete[] pixels;
|
||||
return -1.f;
|
||||
}
|
||||
dest[i].bindTarget();
|
||||
dest[i].clear();
|
||||
dest[i].flush();
|
||||
|
||||
texHolder.bind(i);
|
||||
if (!texHolder.bind(i))
|
||||
{
|
||||
// can use a dummy value mDummyTexUnit = new LLTexUnit(-1);
|
||||
LL_WARNS() << "Failed to bind tex unit." << LL_ENDL;
|
||||
// abandon the benchmark test
|
||||
delete[] pixels;
|
||||
return -1.f;
|
||||
}
|
||||
LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_RGBA, res,res,GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||
}
|
||||
|
||||
|
|
@ -1006,7 +1061,13 @@ F32 gpu_benchmark()
|
|||
|
||||
//make a dummy triangle to draw with
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB);
|
||||
buff->allocateBuffer(3, 0, true);
|
||||
|
||||
if (!buff->allocateBuffer(3, 0, true))
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate buffer during benchmark." << LL_ENDL;
|
||||
// abandon the benchmark test
|
||||
return -1.f;
|
||||
}
|
||||
|
||||
LLStrider<LLVector3> v;
|
||||
LLStrider<LLVector2> tc;
|
||||
|
|
@ -1029,22 +1090,6 @@ F32 gpu_benchmark()
|
|||
buff->flush();
|
||||
|
||||
// ensure matched pair of bind() and unbind() calls
|
||||
class ShaderBinder
|
||||
{
|
||||
public:
|
||||
ShaderBinder(LLGLSLShader& shader):
|
||||
mShader(shader)
|
||||
{
|
||||
mShader.bind();
|
||||
}
|
||||
~ShaderBinder()
|
||||
{
|
||||
mShader.unbind();
|
||||
}
|
||||
|
||||
private:
|
||||
LLGLSLShader& mShader;
|
||||
};
|
||||
ShaderBinder binder(gBenchmarkProgram);
|
||||
|
||||
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
||||
|
|
@ -1103,4 +1148,3 @@ F32 gpu_benchmark()
|
|||
|
||||
return gbps;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -334,24 +334,21 @@ std::ostream& operator <<(std::ostream& s, const LLCredential& cred);
|
|||
class LLCertException: public LLException
|
||||
{
|
||||
public:
|
||||
LLCertException(LLPointer<LLCertificate> cert, const std::string& msg):
|
||||
LLException(msg)
|
||||
LLCertException(const LLSD& cert_data, const std::string& msg): LLException(msg),
|
||||
mCertData(cert_data)
|
||||
{
|
||||
|
||||
mCert = cert;
|
||||
|
||||
LL_WARNS("SECAPI") << "Certificate Error: " << msg << LL_ENDL;
|
||||
}
|
||||
virtual ~LLCertException() throw() {}
|
||||
LLPointer<LLCertificate> getCert() const { return mCert; }
|
||||
LLSD getCertData() const { return mCertData; }
|
||||
protected:
|
||||
LLPointer<LLCertificate> mCert;
|
||||
LLSD mCertData;
|
||||
};
|
||||
|
||||
class LLInvalidCertificate : public LLCertException
|
||||
{
|
||||
public:
|
||||
LLInvalidCertificate(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalid")
|
||||
LLInvalidCertificate(const LLSD& cert_data) : LLCertException(cert_data, "CertInvalid")
|
||||
{
|
||||
}
|
||||
virtual ~LLInvalidCertificate() throw() {}
|
||||
|
|
@ -361,7 +358,7 @@ protected:
|
|||
class LLCertValidationTrustException : public LLCertException
|
||||
{
|
||||
public:
|
||||
LLCertValidationTrustException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertUntrusted")
|
||||
LLCertValidationTrustException(const LLSD& cert_data) : LLCertException(cert_data, "CertUntrusted")
|
||||
{
|
||||
}
|
||||
virtual ~LLCertValidationTrustException() throw() {}
|
||||
|
|
@ -372,7 +369,7 @@ class LLCertValidationHostnameException : public LLCertException
|
|||
{
|
||||
public:
|
||||
LLCertValidationHostnameException(std::string hostname,
|
||||
LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalidHostname")
|
||||
const LLSD& cert_data) : LLCertException(cert_data, "CertInvalidHostname")
|
||||
{
|
||||
mHostname = hostname;
|
||||
}
|
||||
|
|
@ -385,8 +382,8 @@ protected:
|
|||
class LLCertValidationExpirationException : public LLCertException
|
||||
{
|
||||
public:
|
||||
LLCertValidationExpirationException(LLPointer<LLCertificate> cert,
|
||||
LLDate current_time) : LLCertException(cert, "CertExpired")
|
||||
LLCertValidationExpirationException(const LLSD& cert_data,
|
||||
LLDate current_time) : LLCertException(cert_data, "CertExpired")
|
||||
{
|
||||
mTime = current_time;
|
||||
}
|
||||
|
|
@ -399,7 +396,7 @@ protected:
|
|||
class LLCertKeyUsageValidationException : public LLCertException
|
||||
{
|
||||
public:
|
||||
LLCertKeyUsageValidationException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertKeyUsage")
|
||||
LLCertKeyUsageValidationException(const LLSD& cert_data) : LLCertException(cert_data, "CertKeyUsage")
|
||||
{
|
||||
}
|
||||
virtual ~LLCertKeyUsageValidationException() throw() {}
|
||||
|
|
@ -409,7 +406,7 @@ protected:
|
|||
class LLCertBasicConstraintsValidationException : public LLCertException
|
||||
{
|
||||
public:
|
||||
LLCertBasicConstraintsValidationException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertBasicConstraints")
|
||||
LLCertBasicConstraintsValidationException(const LLSD& cert_data) : LLCertException(cert_data, "CertBasicConstraints")
|
||||
{
|
||||
}
|
||||
virtual ~LLCertBasicConstraintsValidationException() throw() {}
|
||||
|
|
@ -419,7 +416,7 @@ protected:
|
|||
class LLCertValidationInvalidSignatureException : public LLCertException
|
||||
{
|
||||
public:
|
||||
LLCertValidationInvalidSignatureException(LLPointer<LLCertificate> cert) : LLCertException(cert, "CertInvalidSignature")
|
||||
LLCertValidationInvalidSignatureException(const LLSD& cert_data) : LLCertException(cert_data, "CertInvalidSignature")
|
||||
{
|
||||
}
|
||||
virtual ~LLCertValidationInvalidSignatureException() throw() {}
|
||||
|
|
|
|||
|
|
@ -62,37 +62,45 @@ std::string cert_string_from_octet_string(ASN1_OCTET_STRING* value);
|
|||
LLSD _basic_constraints_ext(X509* cert);
|
||||
LLSD _key_usage_ext(X509* cert);
|
||||
LLSD _ext_key_usage_ext(X509* cert);
|
||||
LLSD _subject_key_identifier_ext(X509 *cert);
|
||||
LLSD _authority_key_identifier_ext(X509* cert);
|
||||
std::string _subject_key_identifier(X509 *cert);
|
||||
LLSD _authority_key_identifier(X509* cert);
|
||||
void _validateCert(int validation_policy,
|
||||
LLPointer<LLCertificate> cert,
|
||||
const LLSD& validation_params,
|
||||
int depth);
|
||||
|
||||
LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert)
|
||||
LLBasicCertificate::LLBasicCertificate(const std::string& pem_cert,
|
||||
const LLSD* validation_params)
|
||||
{
|
||||
|
||||
// BIO_new_mem_buf returns a read only bio, but takes a void* which isn't const
|
||||
// so we need to cast it.
|
||||
BIO * pem_bio = BIO_new_mem_buf((void*)pem_cert.c_str(), pem_cert.length());
|
||||
if(pem_bio == NULL)
|
||||
{
|
||||
LL_WARNS("SECAPI") << "Could not allocate an openssl memory BIO." << LL_ENDL;
|
||||
LLTHROW(LLInvalidCertificate(this));
|
||||
LLTHROW(LLInvalidCertificate(LLSD::emptyMap()));
|
||||
}
|
||||
mCert = NULL;
|
||||
PEM_read_bio_X509(pem_bio, &mCert, 0, NULL);
|
||||
BIO_free(pem_bio);
|
||||
if (!mCert)
|
||||
{
|
||||
LLTHROW(LLInvalidCertificate(this));
|
||||
LL_WARNS("SECAPI") << "Could not decode certificate to x509." << LL_ENDL;
|
||||
LLTHROW(LLInvalidCertificate(LLSD::emptyMap()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LLBasicCertificate::LLBasicCertificate(X509* pCert)
|
||||
LLBasicCertificate::LLBasicCertificate(X509* pCert,
|
||||
const LLSD* validation_params)
|
||||
{
|
||||
if (!pCert || !pCert->cert_info)
|
||||
{
|
||||
LLTHROW(LLInvalidCertificate(this));
|
||||
LLTHROW(LLInvalidCertificate(LLSD::emptyMap()));
|
||||
}
|
||||
mCert = X509_dup(pCert);
|
||||
// it is tempting to run _validateCert here, but doing so causes problems
|
||||
// the trick is figuring out which aspects to validate. TBD
|
||||
}
|
||||
|
||||
LLBasicCertificate::~LLBasicCertificate()
|
||||
|
|
@ -100,6 +108,7 @@ LLBasicCertificate::~LLBasicCertificate()
|
|||
if(mCert)
|
||||
{
|
||||
X509_free(mCert);
|
||||
mCert = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -172,14 +181,12 @@ LLSD& LLBasicCertificate::_initLLSD()
|
|||
|
||||
mLLSDInfo[CERT_VALID_TO] = cert_date_from_asn1_time(X509_get_notAfter(mCert));
|
||||
mLLSDInfo[CERT_VALID_FROM] = cert_date_from_asn1_time(X509_get_notBefore(mCert));
|
||||
mLLSDInfo[CERT_SHA1_DIGEST] = cert_get_digest("sha1", mCert);
|
||||
mLLSDInfo[CERT_MD5_DIGEST] = cert_get_digest("md5", mCert);
|
||||
// add the known extensions
|
||||
mLLSDInfo[CERT_BASIC_CONSTRAINTS] = _basic_constraints_ext(mCert);
|
||||
mLLSDInfo[CERT_KEY_USAGE] = _key_usage_ext(mCert);
|
||||
mLLSDInfo[CERT_EXTENDED_KEY_USAGE] = _ext_key_usage_ext(mCert);
|
||||
mLLSDInfo[CERT_SUBJECT_KEY_IDENTFIER] = _subject_key_identifier_ext(mCert);
|
||||
mLLSDInfo[CERT_AUTHORITY_KEY_IDENTIFIER] = _authority_key_identifier_ext(mCert);
|
||||
mLLSDInfo[CERT_SUBJECT_KEY_IDENTFIER] = _subject_key_identifier(mCert);
|
||||
mLLSDInfo[CERT_AUTHORITY_KEY_IDENTIFIER] = _authority_key_identifier(mCert);
|
||||
return mLLSDInfo;
|
||||
}
|
||||
|
||||
|
|
@ -278,21 +285,20 @@ LLSD _ext_key_usage_ext(X509* cert)
|
|||
}
|
||||
|
||||
// retrieve the subject key identifier of the cert
|
||||
LLSD _subject_key_identifier_ext(X509 *cert)
|
||||
std::string _subject_key_identifier(X509 *cert)
|
||||
{
|
||||
LLSD result;
|
||||
std::string result;
|
||||
ASN1_OCTET_STRING *skeyid = (ASN1_OCTET_STRING *)X509_get_ext_d2i(cert, NID_subject_key_identifier, NULL, NULL);
|
||||
if(skeyid)
|
||||
{
|
||||
result = cert_string_from_octet_string(skeyid);
|
||||
|
||||
ASN1_OCTET_STRING_free( skeyid );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// retrieve the authority key identifier of the cert
|
||||
LLSD _authority_key_identifier_ext(X509* cert)
|
||||
LLSD _authority_key_identifier(X509* cert)
|
||||
{
|
||||
LLSD result;
|
||||
AUTHORITY_KEYID *akeyid = (AUTHORITY_KEYID *)X509_get_ext_d2i(cert, NID_authority_key_identifier, NULL, NULL);
|
||||
|
|
@ -308,14 +314,10 @@ LLSD _authority_key_identifier_ext(X509* cert)
|
|||
result[CERT_AUTHORITY_KEY_IDENTIFIER_SERIAL] = cert_string_from_asn1_integer(akeyid->serial);
|
||||
}
|
||||
|
||||
|
||||
AUTHORITY_KEYID_free( akeyid );
|
||||
}
|
||||
|
||||
// we ignore the issuer name in the authority key identifier, we check the issue name via
|
||||
// the the issuer name entry in the cert.
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -466,44 +468,6 @@ LLDate cert_date_from_asn1_time(ASN1_TIME* asn1_time)
|
|||
#endif // LL_WINDOWS
|
||||
}
|
||||
|
||||
|
||||
// Generate a string containing a digest. The digest time is 'ssh1' or
|
||||
// 'md5', and the resulting string is of the form "aa:12:5c:' and so on
|
||||
std::string cert_get_digest(const std::string& digest_type, X509 *cert)
|
||||
{
|
||||
unsigned char digest_data[BUFFER_READ_SIZE];
|
||||
unsigned int len = sizeof(digest_data);
|
||||
std::stringstream result;
|
||||
const EVP_MD* digest = NULL;
|
||||
// we could use EVP_get_digestbyname, but that requires initializer code which
|
||||
// would require us to complicate things by plumbing it into the system.
|
||||
if (digest_type == "md5")
|
||||
{
|
||||
digest = EVP_md5();
|
||||
}
|
||||
else if (digest_type == "sha1")
|
||||
{
|
||||
digest = EVP_sha1();
|
||||
}
|
||||
else
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
|
||||
X509_digest(cert, digest, digest_data, &len);
|
||||
result << std::hex << std::setprecision(2);
|
||||
for (unsigned int i=0; i < len; i++)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
result << ":";
|
||||
}
|
||||
result << std::setfill('0') << std::setw(2) << (int)digest_data[i];
|
||||
}
|
||||
return result.str();
|
||||
}
|
||||
|
||||
|
||||
// class LLBasicCertificateVector
|
||||
// This class represents a list of certificates, implemented by a vector of certificate pointers.
|
||||
// it contains implementations of the virtual functions for iterators, search, add, remove, etc.
|
||||
|
|
@ -513,38 +477,33 @@ std::string cert_get_digest(const std::string& digest_type, X509 *cert)
|
|||
// It will find a cert that has minimally the params listed, with the values being the same
|
||||
LLBasicCertificateVector::iterator LLBasicCertificateVector::find(const LLSD& params)
|
||||
{
|
||||
BOOL found = FALSE;
|
||||
// loop through the entire vector comparing the values in the certs
|
||||
// against those passed in via the params.
|
||||
// params should be a map. Only the items specified in the map will be
|
||||
// checked, but they must match exactly, even if they're maps or arrays.
|
||||
|
||||
for(iterator cert = begin();
|
||||
cert != end();
|
||||
cert++)
|
||||
bool found = false;
|
||||
iterator cert = begin();
|
||||
while ( !found && cert != end() )
|
||||
{
|
||||
|
||||
found= TRUE;
|
||||
found = true;
|
||||
LLSD cert_info;
|
||||
(*cert)->getLLSD(cert_info);
|
||||
for (LLSD::map_const_iterator param = params.beginMap();
|
||||
param != params.endMap();
|
||||
for (LLSD::map_const_iterator param = params.beginMap();
|
||||
found && param != params.endMap();
|
||||
param++)
|
||||
{
|
||||
|
||||
if (!cert_info.has((std::string)param->first) ||
|
||||
(!valueCompareLLSD(cert_info[(std::string)param->first], param->second)))
|
||||
if ( !cert_info.has((std::string)param->first)
|
||||
|| !valueCompareLLSD(cert_info[(std::string)param->first], param->second))
|
||||
{
|
||||
found = FALSE;
|
||||
break;
|
||||
found = false;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
{
|
||||
return (cert);
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
cert++;
|
||||
}
|
||||
}
|
||||
return end();
|
||||
return cert;
|
||||
}
|
||||
|
||||
// Insert a certificate into the store. If the certificate already
|
||||
|
|
@ -554,20 +513,37 @@ void LLBasicCertificateVector::insert(iterator _iter,
|
|||
{
|
||||
LLSD cert_info;
|
||||
cert->getLLSD(cert_info);
|
||||
if (cert_info.isMap() && cert_info.has(CERT_SHA1_DIGEST))
|
||||
if (cert_info.isMap() && cert_info.has(CERT_SUBJECT_KEY_IDENTFIER))
|
||||
{
|
||||
LLSD existing_cert_info = LLSD::emptyMap();
|
||||
existing_cert_info[CERT_MD5_DIGEST] = cert_info[CERT_MD5_DIGEST];
|
||||
existing_cert_info[CERT_SUBJECT_KEY_IDENTFIER] = cert_info[CERT_SUBJECT_KEY_IDENTFIER];
|
||||
if(find(existing_cert_info) == end())
|
||||
{
|
||||
BasicIteratorImpl *basic_iter = dynamic_cast<BasicIteratorImpl*>(_iter.mImpl.get());
|
||||
llassert(basic_iter);
|
||||
if (basic_iter)
|
||||
{
|
||||
mCerts.insert(basic_iter->mIter, cert);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SECAPI") << "Invalid certificate postion vector"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("SECAPI") << "Certificate already in vector: "
|
||||
<< "'" << cert_info << "'"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SECAPI") << "Certificate does not have Subject Key Identifier; not inserted: "
|
||||
<< "'" << cert_info << "'"
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
// remove a certificate from the store
|
||||
|
|
@ -588,8 +564,7 @@ LLPointer<LLCertificate> LLBasicCertificateVector::erase(iterator _iter)
|
|||
//
|
||||
// LLBasicCertificateStore
|
||||
// This class represents a store of CA certificates. The basic implementation
|
||||
// uses a pem file such as the legacy CA.pem stored in the existing
|
||||
// SL implementation.
|
||||
// uses a crt file such as the ca-bundle.crt in the existing SL implementation.
|
||||
LLBasicCertificateStore::LLBasicCertificateStore(const std::string& filename)
|
||||
{
|
||||
mFilename = filename;
|
||||
|
|
@ -598,39 +573,70 @@ LLBasicCertificateStore::LLBasicCertificateStore(const std::string& filename)
|
|||
|
||||
void LLBasicCertificateStore::load_from_file(const std::string& filename)
|
||||
{
|
||||
int loaded = 0;
|
||||
int rejected = 0;
|
||||
|
||||
// scan the PEM file extracting each certificate
|
||||
if (!LLFile::isfile(filename))
|
||||
if (LLFile::isfile(filename))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BIO* file_bio = BIO_new(BIO_s_file());
|
||||
if(file_bio)
|
||||
{
|
||||
if (BIO_read_filename(file_bio, filename.c_str()) > 0)
|
||||
{
|
||||
X509 *cert_x509 = NULL;
|
||||
while((PEM_read_bio_X509(file_bio, &cert_x509, 0, NULL)) &&
|
||||
(cert_x509 != NULL))
|
||||
{
|
||||
try
|
||||
{
|
||||
add(new LLBasicCertificate(cert_x509));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LOG_UNHANDLED_EXCEPTION("creating certificate from the certificate store file");
|
||||
}
|
||||
X509_free(cert_x509);
|
||||
cert_x509 = NULL;
|
||||
}
|
||||
BIO_free(file_bio);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SECAPI") << "Could not allocate a file BIO" << LL_ENDL;
|
||||
}
|
||||
BIO* file_bio = BIO_new(BIO_s_file());
|
||||
if(file_bio)
|
||||
{
|
||||
if (BIO_read_filename(file_bio, filename.c_str()) > 0)
|
||||
{
|
||||
X509 *cert_x509 = NULL;
|
||||
while((PEM_read_bio_X509(file_bio, &cert_x509, 0, NULL)) &&
|
||||
(cert_x509 != NULL))
|
||||
{
|
||||
try
|
||||
{
|
||||
LLPointer<LLBasicCertificate> new_cert(new LLBasicCertificate(cert_x509));
|
||||
LLSD validation_params;
|
||||
_validateCert(VALIDATION_POLICY_TIME,
|
||||
new_cert,
|
||||
validation_params,
|
||||
0);
|
||||
add(new_cert);
|
||||
LL_DEBUGS("SECAPI") << "Loaded valid cert for "
|
||||
<< "Name '" << cert_string_name_from_X509_NAME(X509_get_subject_name(cert_x509)) << "'";
|
||||
std::string skeyid(_subject_key_identifier(cert_x509));
|
||||
LL_CONT << " Id '" << skeyid << "'"
|
||||
<< LL_ENDL;
|
||||
loaded++;
|
||||
}
|
||||
catch (LLCertException& cert_exception)
|
||||
{
|
||||
LLSD cert_info(cert_exception.getCertData());
|
||||
LL_DEBUGS("SECAPI_BADCERT","SECAPI") << "invalid certificate (" << cert_exception.what() << "): " << cert_info << LL_ENDL;
|
||||
rejected++;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LOG_UNHANDLED_EXCEPTION("creating certificate from the certificate store file");
|
||||
rejected++;
|
||||
}
|
||||
X509_free(cert_x509);
|
||||
cert_x509 = NULL;
|
||||
}
|
||||
BIO_free(file_bio);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SECAPI") << "BIO read failed for " << filename << LL_ENDL;
|
||||
}
|
||||
|
||||
LL_INFOS("SECAPI") << "loaded " << loaded << " good certificates (rejected " << rejected << ") from " << filename << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("SECAPI") << "Could not allocate a file BIO" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// since the user certificate store may not be there, this is not a warning
|
||||
LL_INFOS("SECAPI") << "Certificate store not found at " << filename << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -666,7 +672,7 @@ void LLBasicCertificateStore::save()
|
|||
// return the store id
|
||||
std::string LLBasicCertificateStore::storeId() const
|
||||
{
|
||||
// this is the basic handler which uses the CA.pem store,
|
||||
// this is the basic handler which uses the ca-bundle.crt store,
|
||||
// so we ignore this.
|
||||
return std::string("");
|
||||
}
|
||||
|
|
@ -869,33 +875,31 @@ void _validateCert(int validation_policy,
|
|||
const LLSD& validation_params,
|
||||
int depth)
|
||||
{
|
||||
|
||||
LLSD current_cert_info;
|
||||
cert->getLLSD(current_cert_info);
|
||||
// check basic properties exist in the cert
|
||||
if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info.has(CERT_SUBJECT_NAME_STRING))
|
||||
{
|
||||
LLTHROW(LLCertException(cert, "Cert doesn't have a Subject Name"));
|
||||
LLTHROW(LLCertException(current_cert_info, "Cert doesn't have a Subject Name"));
|
||||
}
|
||||
|
||||
if(!current_cert_info.has(CERT_ISSUER_NAME_STRING))
|
||||
{
|
||||
LLTHROW(LLCertException(cert, "Cert doesn't have an Issuer Name"));
|
||||
LLTHROW(LLCertException(current_cert_info, "Cert doesn't have an Issuer Name"));
|
||||
}
|
||||
|
||||
// check basic properties exist in the cert
|
||||
if(!current_cert_info.has(CERT_VALID_FROM) || !current_cert_info.has(CERT_VALID_TO))
|
||||
{
|
||||
LLTHROW(LLCertException(cert, "Cert doesn't have an expiration period"));
|
||||
LLTHROW(LLCertException(current_cert_info, "Cert doesn't have an expiration period"));
|
||||
}
|
||||
if (!current_cert_info.has(CERT_SHA1_DIGEST))
|
||||
if (!current_cert_info.has(CERT_SUBJECT_KEY_IDENTFIER))
|
||||
{
|
||||
LLTHROW(LLCertException(cert, "No SHA1 digest"));
|
||||
LLTHROW(LLCertException(current_cert_info, "Cert doesn't have a Subject Key Id"));
|
||||
}
|
||||
|
||||
if (validation_policy & VALIDATION_POLICY_TIME)
|
||||
{
|
||||
|
||||
LLDate validation_date(time(NULL));
|
||||
if(validation_params.has(CERT_VALIDATION_DATE))
|
||||
{
|
||||
|
|
@ -905,7 +909,7 @@ void _validateCert(int validation_policy,
|
|||
if((validation_date < current_cert_info[CERT_VALID_FROM].asDate()) ||
|
||||
(validation_date > current_cert_info[CERT_VALID_TO].asDate()))
|
||||
{
|
||||
LLTHROW(LLCertValidationExpirationException(cert, validation_date));
|
||||
LLTHROW(LLCertValidationExpirationException(current_cert_info, validation_date));
|
||||
}
|
||||
}
|
||||
if (validation_policy & VALIDATION_POLICY_SSL_KU)
|
||||
|
|
@ -916,14 +920,14 @@ void _validateCert(int validation_policy,
|
|||
!(_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE],
|
||||
LLSD((std::string)CERT_KU_KEY_ENCIPHERMENT)))))
|
||||
{
|
||||
LLTHROW(LLCertKeyUsageValidationException(cert));
|
||||
LLTHROW(LLCertKeyUsageValidationException(current_cert_info));
|
||||
}
|
||||
// only validate EKU if the cert has it
|
||||
if(current_cert_info.has(CERT_EXTENDED_KEY_USAGE) && current_cert_info[CERT_EXTENDED_KEY_USAGE].isArray() &&
|
||||
(!_LLSDArrayIncludesValue(current_cert_info[CERT_EXTENDED_KEY_USAGE],
|
||||
LLSD((std::string)CERT_EKU_SERVER_AUTH))))
|
||||
{
|
||||
LLTHROW(LLCertKeyUsageValidationException(cert));
|
||||
LLTHROW(LLCertKeyUsageValidationException(current_cert_info));
|
||||
}
|
||||
}
|
||||
if (validation_policy & VALIDATION_POLICY_CA_KU)
|
||||
|
|
@ -932,7 +936,7 @@ void _validateCert(int validation_policy,
|
|||
(!_LLSDArrayIncludesValue(current_cert_info[CERT_KEY_USAGE],
|
||||
(std::string)CERT_KU_CERT_SIGN)))
|
||||
{
|
||||
LLTHROW(LLCertKeyUsageValidationException(cert));
|
||||
LLTHROW(LLCertKeyUsageValidationException(current_cert_info));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -944,13 +948,13 @@ void _validateCert(int validation_policy,
|
|||
if(!current_cert_info[CERT_BASIC_CONSTRAINTS].has(CERT_BASIC_CONSTRAINTS_CA) ||
|
||||
!current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_CA])
|
||||
{
|
||||
LLTHROW(LLCertBasicConstraintsValidationException(cert));
|
||||
LLTHROW(LLCertBasicConstraintsValidationException(current_cert_info));
|
||||
}
|
||||
if (current_cert_info[CERT_BASIC_CONSTRAINTS].has(CERT_BASIC_CONSTRAINTS_PATHLEN) &&
|
||||
((current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_PATHLEN].asInteger() != 0) &&
|
||||
(depth > current_cert_info[CERT_BASIC_CONSTRAINTS][CERT_BASIC_CONSTRAINTS_PATHLEN].asInteger())))
|
||||
{
|
||||
LLTHROW(LLCertBasicConstraintsValidationException(cert));
|
||||
LLTHROW(LLCertBasicConstraintsValidationException(current_cert_info));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1016,30 +1020,36 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
const LLSD& validation_params)
|
||||
{
|
||||
// If --no-verify-ssl-cert was passed on the command line, stop right now.
|
||||
if (gSavedSettings.getBOOL("NoVerifySSLCert")) return;
|
||||
if (gSavedSettings.getBOOL("NoVerifySSLCert"))
|
||||
{
|
||||
LL_WARNS_ONCE("SECAPI") << "All Certificate validation disabled; viewer operation is insecure" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if(cert_chain->size() < 1)
|
||||
{
|
||||
LLTHROW(LLCertException(NULL, "No certs in chain"));
|
||||
LLTHROW(LLCertException(LLSD::emptyMap(), "No certs in chain"));
|
||||
}
|
||||
iterator current_cert = cert_chain->begin();
|
||||
LLSD current_cert_info;
|
||||
LLSD validation_date;
|
||||
if (validation_params.has(CERT_VALIDATION_DATE))
|
||||
{
|
||||
validation_date = validation_params[CERT_VALIDATION_DATE];
|
||||
}
|
||||
|
||||
// get LLSD info from the cert to throw in any exception
|
||||
LLSD current_cert_info;
|
||||
(*current_cert)->getLLSD(current_cert_info);
|
||||
|
||||
if (validation_policy & VALIDATION_POLICY_HOSTNAME)
|
||||
{
|
||||
(*current_cert)->getLLSD(current_cert_info);
|
||||
if(!validation_params.has(CERT_HOSTNAME))
|
||||
{
|
||||
LLTHROW(LLCertException((*current_cert), "No hostname passed in for validation"));
|
||||
LLTHROW(LLCertException(current_cert_info, "No hostname passed in for validation"));
|
||||
}
|
||||
if(!current_cert_info.has(CERT_SUBJECT_NAME) || !current_cert_info[CERT_SUBJECT_NAME].has(CERT_NAME_CN))
|
||||
{
|
||||
LLTHROW(LLInvalidCertificate((*current_cert)));
|
||||
LLTHROW(LLInvalidCertificate(current_cert_info));
|
||||
}
|
||||
|
||||
LL_DEBUGS("SECAPI") << "Validating the hostname " << validation_params[CERT_HOSTNAME].asString() <<
|
||||
|
|
@ -1048,39 +1058,60 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
current_cert_info[CERT_SUBJECT_NAME][CERT_NAME_CN].asString()))
|
||||
{
|
||||
throw LLCertValidationHostnameException(validation_params[CERT_HOSTNAME].asString(),
|
||||
(*current_cert));
|
||||
current_cert_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check the cache of already validated certs
|
||||
X509* cert_x509 = (*current_cert)->getOpenSSLX509();
|
||||
if(!cert_x509)
|
||||
{
|
||||
LLTHROW(LLInvalidCertificate((*current_cert)));
|
||||
LLTHROW(LLInvalidCertificate(current_cert_info));
|
||||
}
|
||||
std::string sha1_hash((const char *)cert_x509->sha1_hash, SHA_DIGEST_LENGTH);
|
||||
|
||||
std::string subject_name(cert_string_name_from_X509_NAME(X509_get_subject_name(cert_x509)));
|
||||
std::string skeyid(_subject_key_identifier(cert_x509));
|
||||
|
||||
LL_DEBUGS("SECAPI") << "attempting to validate cert "
|
||||
<< " for '" << (validation_params.has(CERT_HOSTNAME) ? validation_params[CERT_HOSTNAME].asString() : "(unknown hostname)") << "'"
|
||||
<< " as subject name '" << subject_name << "'"
|
||||
<< " subject key id '" << skeyid << "'"
|
||||
<< LL_ENDL;
|
||||
|
||||
X509_free( cert_x509 );
|
||||
cert_x509 = NULL;
|
||||
t_cert_cache::iterator cache_entry = mTrustedCertCache.find(sha1_hash);
|
||||
if (skeyid.empty())
|
||||
{
|
||||
LLTHROW(LLCertException(current_cert_info, "No Subject Key Id"));
|
||||
}
|
||||
|
||||
t_cert_cache::iterator cache_entry = mTrustedCertCache.find(skeyid);
|
||||
if(cache_entry != mTrustedCertCache.end())
|
||||
{
|
||||
LL_DEBUGS("SECAPI") << "Found cert in cache" << LL_ENDL;
|
||||
// this cert is in the cache, so validate the time.
|
||||
if (validation_policy & VALIDATION_POLICY_TIME)
|
||||
{
|
||||
LLDate validation_date(time(NULL));
|
||||
LLDate validation_date;
|
||||
if(validation_params.has(CERT_VALIDATION_DATE))
|
||||
{
|
||||
validation_date = validation_params[CERT_VALIDATION_DATE];
|
||||
}
|
||||
else
|
||||
{
|
||||
validation_date = LLDate(time(NULL)); // current time
|
||||
}
|
||||
|
||||
if((validation_date < cache_entry->second.first) ||
|
||||
(validation_date > cache_entry->second.second))
|
||||
{
|
||||
LLTHROW(LLCertValidationExpirationException((*current_cert), validation_date));
|
||||
LLTHROW(LLCertValidationExpirationException(current_cert_info, validation_date));
|
||||
}
|
||||
}
|
||||
// successfully found in cache
|
||||
LL_DEBUGS("SECAPI") << "Valid cert for '" << validation_params[CERT_HOSTNAME].asString() << "'"
|
||||
<< " skeyid '" << skeyid << "'"
|
||||
<< " found in cache"
|
||||
<< LL_ENDL;
|
||||
return;
|
||||
}
|
||||
if(current_cert_info.isUndefined())
|
||||
|
|
@ -1094,7 +1125,6 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
// loop through the cert chain, validating the current cert against the next one.
|
||||
while(current_cert != cert_chain->end())
|
||||
{
|
||||
|
||||
int local_validation_policy = validation_policy;
|
||||
if(current_cert == cert_chain->begin())
|
||||
{
|
||||
|
|
@ -1109,7 +1139,9 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
if(!_verify_signature((*current_cert),
|
||||
previous_cert))
|
||||
{
|
||||
LLTHROW(LLCertValidationInvalidSignatureException(previous_cert));
|
||||
LLSD previous_cert_info;
|
||||
previous_cert->getLLSD(previous_cert_info);
|
||||
LLTHROW(LLCertValidationInvalidSignatureException(previous_cert_info));
|
||||
}
|
||||
}
|
||||
_validateCert(local_validation_policy,
|
||||
|
|
@ -1120,11 +1152,20 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
// look for a CA in the CA store that may belong to this chain.
|
||||
LLSD cert_search_params = LLSD::emptyMap();
|
||||
// is the cert itself in the store?
|
||||
cert_search_params[CERT_SHA1_DIGEST] = current_cert_info[CERT_SHA1_DIGEST];
|
||||
cert_search_params[CERT_SUBJECT_KEY_IDENTFIER] = current_cert_info[CERT_SUBJECT_KEY_IDENTFIER];
|
||||
LLCertificateStore::iterator found_store_cert = find(cert_search_params);
|
||||
if(found_store_cert != end())
|
||||
{
|
||||
mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time);
|
||||
mTrustedCertCache[skeyid] = std::pair<LLDate, LLDate>(from_time, to_time);
|
||||
LL_DEBUGS("SECAPI") << "Valid cert "
|
||||
<< " for '" << (validation_params.has(CERT_HOSTNAME) ? validation_params[CERT_HOSTNAME].asString() : "(unknown hostname)") << "'";
|
||||
X509* cert_x509 = (*found_store_cert)->getOpenSSLX509();
|
||||
std::string found_cert_subject_name(cert_string_name_from_X509_NAME(X509_get_subject_name(cert_x509)));
|
||||
X509_free(cert_x509);
|
||||
LL_CONT << " as '" << found_cert_subject_name << "'"
|
||||
<< " skeyid '" << current_cert_info[CERT_SUBJECT_KEY_IDENTFIER].asString() << "'"
|
||||
<< " found in cert store"
|
||||
<< LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1158,10 +1199,16 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
if(!_verify_signature((*found_store_cert),
|
||||
(*current_cert)))
|
||||
{
|
||||
LLTHROW(LLCertValidationInvalidSignatureException(*current_cert));
|
||||
LLTHROW(LLCertValidationInvalidSignatureException(current_cert_info));
|
||||
}
|
||||
// successfully validated.
|
||||
mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time);
|
||||
mTrustedCertCache[skeyid] = std::pair<LLDate, LLDate>(from_time, to_time);
|
||||
LL_DEBUGS("SECAPI") << "Verified and cached cert for '" << validation_params[CERT_HOSTNAME].asString() << "'"
|
||||
<< " as '" << subject_name << "'"
|
||||
<< " id '" << skeyid << "'"
|
||||
<< " using CA '" << cert_search_params[CERT_SUBJECT_NAME_STRING] << "'"
|
||||
<< " with id '" << cert_search_params[CERT_SUBJECT_KEY_IDENTFIER].asString() << "' found in cert store"
|
||||
<< LL_ENDL;
|
||||
return;
|
||||
}
|
||||
previous_cert = (*current_cert);
|
||||
|
|
@ -1175,10 +1222,17 @@ void LLBasicCertificateStore::validate(int validation_policy,
|
|||
if (validation_policy & VALIDATION_POLICY_TRUSTED)
|
||||
{
|
||||
// we reached the end without finding a trusted cert.
|
||||
LLTHROW(LLCertValidationTrustException((*cert_chain)[cert_chain->size()-1]));
|
||||
|
||||
LLSD last_cert_info;
|
||||
((*cert_chain)[cert_chain->size()-1])->getLLSD(last_cert_info);
|
||||
LLTHROW(LLCertValidationTrustException(last_cert_info));
|
||||
}
|
||||
mTrustedCertCache[sha1_hash] = std::pair<LLDate, LLDate>(from_time, to_time);
|
||||
else
|
||||
{
|
||||
LL_DEBUGS("SECAPI") << "! Caching untrusted cert for '" << subject_name << "'"
|
||||
<< " skeyid '" << skeyid << "' in cert store because ! VALIDATION_POLICY_TRUSTED"
|
||||
<< LL_ENDL;
|
||||
mTrustedCertCache[skeyid] = std::pair<LLDate, LLDate>(from_time, to_time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1216,13 +1270,13 @@ void LLSecAPIBasicHandler::init()
|
|||
"CA.pem");
|
||||
|
||||
|
||||
LL_DEBUGS("SECAPI") << "Loading certificate store from " << store_file << LL_ENDL;
|
||||
LL_INFOS("SECAPI") << "Loading user certificate store from " << store_file << LL_ENDL;
|
||||
mStore = new LLBasicCertificateStore(store_file);
|
||||
|
||||
// grab the application CA.pem file that contains the well-known certs shipped
|
||||
// grab the application ca-bundle.crt file that contains the well-known certs shipped
|
||||
// with the product
|
||||
std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "CA.pem");
|
||||
LL_INFOS() << "app path " << ca_file_path << LL_ENDL;
|
||||
std::string ca_file_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "ca-bundle.crt");
|
||||
LL_INFOS("SECAPI") << "Loading application certificate store from " << ca_file_path << LL_ENDL;
|
||||
LLPointer<LLBasicCertificateStore> app_ca_store = new LLBasicCertificateStore(ca_file_path);
|
||||
|
||||
// push the applicate CA files into the store, therefore adding any new CA certs that
|
||||
|
|
|
|||
|
|
@ -47,8 +47,9 @@ class LLBasicCertificate : public LLCertificate
|
|||
public:
|
||||
LOG_CLASS(LLBasicCertificate);
|
||||
|
||||
LLBasicCertificate(const std::string& pem_cert);
|
||||
LLBasicCertificate(X509* openSSLX509);
|
||||
// The optional validation_params allow us to make the unit test time-invariant
|
||||
LLBasicCertificate(const std::string& pem_cert, const LLSD* validation_params = NULL);
|
||||
LLBasicCertificate(X509* openSSLX509, const LLSD* validation_params = NULL);
|
||||
|
||||
virtual ~LLBasicCertificate();
|
||||
|
||||
|
|
|
|||
|
|
@ -2016,11 +2016,9 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
|
|||
media_source->ignore_ssl_cert_errors(true);
|
||||
}
|
||||
|
||||
// the correct way to deal with certs it to load ours from CA.pem and append them to the ones
|
||||
// the correct way to deal with certs it to load ours from ca-bundle.crt and append them to the ones
|
||||
// Qt/WebKit loads from your system location.
|
||||
// Note: This needs the new CA.pem file with the Equifax Secure Certificate Authority
|
||||
// cert at the bottom: (MIIDIDCCAomgAwIBAgIENd70zzANBg)
|
||||
std::string ca_path = gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "CA.pem" );
|
||||
std::string ca_path = gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS, "ca-bundle.crt" );
|
||||
media_source->addCertificateFilePath( ca_path );
|
||||
|
||||
media_source->proxy_setup(gSavedSettings.getBOOL("BrowserProxyEnabled"), gSavedSettings.getString("BrowserProxyAddress"), gSavedSettings.getS32("BrowserProxyPort"));
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
#include "llmeshrepository.h" //for LLMeshRepository::sBytesReceived
|
||||
#include "llsdserialize.h"
|
||||
#include "llcorehttputil.h"
|
||||
#include "llvoicevivox.h"
|
||||
|
||||
namespace LLStatViewer
|
||||
{
|
||||
|
|
@ -570,6 +571,8 @@ void send_stats()
|
|||
fail["off_circuit"] = (S32) gMessageSystem->mOffCircuitPackets;
|
||||
fail["invalid"] = (S32) gMessageSystem->mInvalidOnCircuitPackets;
|
||||
|
||||
body["stats"]["voice"] = LLVoiceVivoxStats::getInstance()->read();
|
||||
|
||||
// Misc stats, two strings and two ints
|
||||
// These are not expecticed to persist across multiple releases
|
||||
// Comment any changes with your name and the expected release revision
|
||||
|
|
|
|||
|
|
@ -145,19 +145,9 @@ void LLVoiceChannel::handleStatusChange(EStatusType type)
|
|||
switch(type)
|
||||
{
|
||||
case STATUS_LOGIN_RETRY:
|
||||
//mLoginNotificationHandle = LLNotifyBox::showXml("VoiceLoginRetry")->getHandle();
|
||||
LLNotificationsUtil::add("VoiceLoginRetry");
|
||||
// no user notice
|
||||
break;
|
||||
case STATUS_LOGGED_IN:
|
||||
//if (!mLoginNotificationHandle.isDead())
|
||||
//{
|
||||
// LLNotifyBox* notifyp = (LLNotifyBox*)mLoginNotificationHandle.get();
|
||||
// if (notifyp)
|
||||
// {
|
||||
// notifyp->close();
|
||||
// }
|
||||
// mLoginNotificationHandle.markDead();
|
||||
//}
|
||||
break;
|
||||
case STATUS_LEFT_CHANNEL:
|
||||
if (callStarted() && !mIgnoreNextSessionLeave && !sSuspended)
|
||||
|
|
|
|||
|
|
@ -200,7 +200,10 @@ void LLVoiceClient::updateSettings()
|
|||
|
||||
updateMicMuteLogic();
|
||||
|
||||
if (mVoiceModule) mVoiceModule->updateSettings();
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->updateSettings();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
|
@ -416,24 +419,36 @@ void LLVoiceClient::setNonSpatialChannel(
|
|||
const std::string &uri,
|
||||
const std::string &credentials)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->setNonSpatialChannel(uri, credentials);
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->setNonSpatialChannel(uri, credentials);
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::setSpatialChannel(
|
||||
const std::string &uri,
|
||||
const std::string &credentials)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->setSpatialChannel(uri, credentials);
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->setSpatialChannel(uri, credentials);
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::leaveNonSpatialChannel()
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->leaveNonSpatialChannel();
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->leaveNonSpatialChannel();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::leaveChannel(void)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->leaveChannel();
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->leaveChannel();
|
||||
}
|
||||
}
|
||||
|
||||
std::string LLVoiceClient::getCurrentChannel()
|
||||
|
|
@ -519,7 +534,10 @@ bool LLVoiceClient::voiceEnabled()
|
|||
|
||||
void LLVoiceClient::setVoiceEnabled(bool enabled)
|
||||
{
|
||||
if (mVoiceModule) mVoiceModule->setVoiceEnabled(enabled);
|
||||
if (mVoiceModule)
|
||||
{
|
||||
mVoiceModule->setVoiceEnabled(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceClient::updateMicMuteLogic()
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -351,7 +351,7 @@ protected:
|
|||
bool mIsSpatial; // True for spatial channels
|
||||
bool mIsP2P;
|
||||
bool mIncoming;
|
||||
bool mVoiceEnabled;
|
||||
bool mVoiceActive;
|
||||
bool mReconnect; // Whether we should try to reconnect to this session if it's dropped
|
||||
|
||||
// Set to true when the volume/mute state of someone in the participant list changes.
|
||||
|
|
@ -953,7 +953,6 @@ protected:
|
|||
int ignoreDepth;
|
||||
|
||||
// Members for processing responses. The values are transient and only valid within a call to processResponse().
|
||||
bool squelchDebugOutput;
|
||||
int returnCode;
|
||||
int statusCode;
|
||||
std::string statusString;
|
||||
|
|
@ -1039,5 +1038,37 @@ class LLVivoxSecurity : public LLSingleton<LLVivoxSecurity>
|
|||
std::string mAccountHandle;
|
||||
};
|
||||
|
||||
class LLVoiceVivoxStats : public LLSingleton<LLVoiceVivoxStats>
|
||||
{
|
||||
LLSINGLETON(LLVoiceVivoxStats);
|
||||
LOG_CLASS(LLVoiceVivoxStats);
|
||||
virtual ~LLVoiceVivoxStats();
|
||||
|
||||
private:
|
||||
F64SecondsImplicit mStartTime;
|
||||
|
||||
U32 mConnectCycles;
|
||||
|
||||
F64 mConnectTime;
|
||||
U32 mConnectAttempts;
|
||||
|
||||
F64 mProvisionTime;
|
||||
U32 mProvisionAttempts;
|
||||
|
||||
F64 mEstablishTime;
|
||||
U32 mEstablishAttempts;
|
||||
|
||||
public:
|
||||
|
||||
void reset();
|
||||
void connectionAttemptStart();
|
||||
void connectionAttemptEnd(bool success);
|
||||
void provisionAttemptStart();
|
||||
void provisionAttemptEnd(bool success);
|
||||
void establishAttemptStart();
|
||||
void establishAttemptEnd(bool success);
|
||||
LLSD read();
|
||||
};
|
||||
|
||||
#endif //LL_VIVOX_VOICE_CLIENT_H
|
||||
|
||||
|
|
|
|||
|
|
@ -379,14 +379,9 @@ public:
|
|||
{
|
||||
case CURLE_SSL_PEER_CERTIFICATE:
|
||||
case CURLE_SSL_CACERT:
|
||||
{
|
||||
LLPointer<LLCertificate> error_cert(mTransaction->getErrorCert());
|
||||
if(error_cert)
|
||||
{
|
||||
data["certificate"] = error_cert->getPem();
|
||||
}
|
||||
data["certificate"] = mTransaction->getErrorCertData();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ public:
|
|||
std::string mResponseText;
|
||||
XMLRPC_REQUEST mResponse;
|
||||
std::string mCertStore;
|
||||
LLPointer<LLCertificate> mErrorCert;
|
||||
LLSD mErrorCertData;
|
||||
|
||||
Impl(const std::string& uri, XMLRPC_REQUEST request, bool useGzip, const LLSD& httpParams);
|
||||
Impl(const std::string& uri,
|
||||
|
|
@ -247,14 +247,8 @@ void LLXMLRPCTransaction::Handler::onCompleted(LLCore::HttpHandle handle,
|
|||
// (a non cert error), then generate the error message as
|
||||
// appropriate
|
||||
mImpl->setHttpStatus(status);
|
||||
LLCertificate *errordata = static_cast<LLCertificate *>(status.getErrorData());
|
||||
|
||||
if (errordata)
|
||||
{
|
||||
mImpl->mErrorCert = LLPointer<LLCertificate>(errordata);
|
||||
status.setErrorData(NULL);
|
||||
errordata->unref();
|
||||
}
|
||||
LLSD errordata = status.getErrorData();
|
||||
mImpl->mErrorCertData = errordata;
|
||||
|
||||
LL_WARNS() << "LLXMLRPCTransaction error "
|
||||
<< status.toHex() << ": " << status.toString() << LL_ENDL;
|
||||
|
|
@ -573,9 +567,9 @@ std::string LLXMLRPCTransaction::statusMessage()
|
|||
return impl.mStatusMessage;
|
||||
}
|
||||
|
||||
LLPointer<LLCertificate> LLXMLRPCTransaction::getErrorCert()
|
||||
LLSD LLXMLRPCTransaction::getErrorCertData()
|
||||
{
|
||||
return impl.mErrorCert;
|
||||
return impl.mErrorCertData;
|
||||
}
|
||||
|
||||
std::string LLXMLRPCTransaction::statusURI()
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public:
|
|||
EStatus status(int* curlCode);
|
||||
// return status, and extended CURL code, if code isn't null
|
||||
|
||||
LLPointer<LLCertificate> getErrorCert();
|
||||
LLSD getErrorCertData();
|
||||
std::string statusMessage();
|
||||
// return a message string, suitable for showing the user
|
||||
std::string statusURI();
|
||||
|
|
|
|||
|
|
@ -1566,9 +1566,6 @@ Klik på Acceptér for at deltage eller Afvis for at afvise invitationen. Klik p
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Det lykkedes ikke at forbinde til [VOICE_CHANNEL_NAME], prøv venligst igen senere. Du vil nu blive koblet til almindelig voice-chat.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Vi laver en stemmekanal til dig. Det kan tage op til et minut.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
En eller flere af dine stemme "morphs" er udløbet.
|
||||
[[URL] Click here] for at forny dit abbonnement.
|
||||
|
|
|
|||
|
|
@ -3317,9 +3317,6 @@ Klicken Sie auf 'Akzeptieren ', um dem Chat beizutreten, oder auf &a
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Verbindung zu [VOICE_CHANNEL_NAME] nicht möglich. Bitte versuchen Sie es später. Sie werden nun wieder mit dem Chat in Ihrer Nähe verbunden.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Wir erstellen einen Voice-Kanal für Sie. Bitte warten Sie einen Moment.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Ein oder mehrere Ihrer Voice-Morph-Abos ist/sind abgelaufen.
|
||||
[[URL] Hier klicken], um Ihr Abo zu erneuern.
|
||||
|
|
|
|||
|
|
@ -8093,17 +8093,6 @@ Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now
|
|||
</unique>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
duration="10"
|
||||
icon="notifytip.tga"
|
||||
name="VoiceLoginRetry"
|
||||
type="notifytip">
|
||||
<unique/>
|
||||
We are creating a voice channel for you. This may take up to one minute.
|
||||
<tag>status</tag>
|
||||
<tag>voice</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="notify.tga"
|
||||
name="VoiceEffectsExpired"
|
||||
|
|
@ -8559,12 +8548,18 @@ Please check your network and firewall setup.
|
|||
icon="alertmodal.tga"
|
||||
name="NoVoiceConnect"
|
||||
type="alertmodal">
|
||||
We're having trouble connecting to your voice server:
|
||||
We are unable to connect to the voice server:
|
||||
|
||||
[HOSTID]
|
||||
|
||||
Voice communications will not be available.
|
||||
Ports that must be allowed for voice are:
|
||||
:TCP: 80, 443
|
||||
:UDP: 3478, 3479, 5060, 5062, 6250, 12000-32000
|
||||
|
||||
Please check your network and firewall setup.
|
||||
Disable any SIP ALG feature in your router.
|
||||
|
||||
Voice communications will not be available.
|
||||
<tag>voice</tag>
|
||||
<tag>fail</tag>
|
||||
<usetemplate
|
||||
|
|
|
|||
|
|
@ -3303,9 +3303,6 @@ Pulsa Aceptar o Rehusar para coger o no la llamada. Pulsa Ignorar para ignorar a
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Fallo al conectar a [VOICE_CHANNEL_NAME]; por favor, inténtalo más tarde. Vas a ser reconectado al chat de voz.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Estamos creando un canal de voz para ti. Se puede tardar hasta un minuto.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Una o más de las transformaciones de voz a las que estás suscrito han caducado.
|
||||
[Pulsa aquí [URL]] para renovar la suscripción.
|
||||
|
|
|
|||
|
|
@ -3304,9 +3304,6 @@ Pour y participer, cliquez sur Accepter. Sinon, cliquez sur Refuser. Pour ignore
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Échec de la connexion avec [VOICE_CHANNEL_NAME], veuillez réessayer ultérieurement. Vous allez maintenant être reconnecté(e) au chat vocal près de vous.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Nous sommes en train de créer un canal vocal pour vous. Veuillez patienter quelques instants.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Au moins l'un des effets de voix auxquels vous êtes abonné a expiré.
|
||||
[[URL] Cliquez ici] pour renouveler votre abonnement.
|
||||
|
|
|
|||
|
|
@ -3307,9 +3307,6 @@ Clicca su Accetta per unirti alla chat oppure su Declina per declinare l'in
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Collegamento a [VOICE_CHANNEL_NAME] non riuscito, riprova più tardi. Verrai ora ricollegato alla chat vocale nei dintorni.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Stiamo creando una canale voice per te. Questo può richiedere fino a un minuto.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Almeno una delle manipolazioni vocali alle quali sei iscritto è scaduta.
|
||||
[[URL] Fai clic qui] per rinnovare l'abbonamento.
|
||||
|
|
|
|||
|
|
@ -3345,9 +3345,6 @@ M キーを押して変更します。
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
[VOICE_CHANNEL_NAME] への接続に失敗しました。あとで再度お試しください。 「近くのボイスチャット」に再接続されます。
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
ボイスチャンネルを作成しています。1 分ほどかかります。
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
ボイスモーフィング効果の1つまたは複数の有効期限が終了しました。期限を延長・更新するには[[URL]こちらをクリック]してください。
|
||||
</notification>
|
||||
|
|
|
|||
|
|
@ -2806,9 +2806,6 @@ Wybierz Zablokuj żeby wyciszyć tą osobę.
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Brak połączenia z [VOICE_CHANNEL_NAME], spróbuj później. Przełączanie do rozmowy w czacie lokalnym.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Tworzymy kanał głosu dla Ciebie. To może potrwać minutę.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Subskrypcja jednego lub więcej Przekształceń Głosu wygasła.
|
||||
[[URL] Kliknij tutaj] oby odnowić subskrypcję.
|
||||
|
|
|
|||
|
|
@ -3292,9 +3292,6 @@ Clique em Aceitar para atender ou em Recusar para recusar este convite. Clique
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Falha de conexão com [VOICE_CHANNEL_NAME]. Tente novamente mais tarde. Agora você será reconectado ao bate-papo local.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Estamos criando uma canal de voz para você. Isto pode levar até um minuto.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Um ou mais serviços de distorção de voz que você assinou veceu.
|
||||
[[URL] Clique aqui] para renovar o serviço.
|
||||
|
|
|
|||
|
|
@ -3303,9 +3303,6 @@ http://secondlife.com/download.
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
Не удалось подключиться к [VOICE_CHANNEL_NAME], повторите попытку позже. Будет установлено подключение к локальному голосовому чату.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Создается голосовой канал для вас. Создание займет не больше минуты.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Истек срок действия одного или нескольких типов изменения голоса, на которые вы подписаны.
|
||||
[[URL] Щелкните здесь], чтобы обновить подписку.
|
||||
|
|
|
|||
|
|
@ -3303,9 +3303,6 @@ Sohbete katılmak için Kabul Et'i, daveti geri çevirmek için ise Reddet&
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
[VOICE_CHANNEL_NAME] ile bağlantı kurulamadı, lütfen daha sonra tekrar deneyin. Şimdi Yakındaki bir Sesli Sohbete yeniden bağlanılacaksınız.
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
Sizin için bir ses kanalı oluşturuyoruz. Bu işlem bir dakika kadar sürebilir.
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
Abone olduğunuz Ses Şekillerinden birinin ya da daha fazlasının süresi dolmuş.
|
||||
Aboneliğinizi yenilemek için [[URL] burayı tıklatın].
|
||||
|
|
|
|||
|
|
@ -3293,9 +3293,6 @@ SHA1 指紋:[MD5_DIGEST]
|
|||
<notification name="VoiceChannelJoinFailed">
|
||||
無法連通 [VOICE_CHANNEL_NAME],,請稍候再試。 現在你將重新連通到附近的語音聊天。
|
||||
</notification>
|
||||
<notification name="VoiceLoginRetry">
|
||||
我們正為你建立語音頻道。 這至多可能需時一分鐘。
|
||||
</notification>
|
||||
<notification name="VoiceEffectsExpired">
|
||||
至少一個你訂用的變聲效果已經過期。
|
||||
[[URL] 點按這裡] 繼續訂用。
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -66,7 +66,6 @@ class ViewerManifest(LLManifest):
|
|||
with self.prefix(src="app_settings"):
|
||||
self.exclude("logcontrol.xml")
|
||||
self.exclude("logcontrol-dev.xml")
|
||||
self.path("*.pem")
|
||||
self.path("*.ini")
|
||||
self.path("*.xml")
|
||||
self.path("*.db2")
|
||||
|
|
@ -88,10 +87,10 @@ class ViewerManifest(LLManifest):
|
|||
pkgdir = os.path.join(self.args['build'], os.pardir, 'packages')
|
||||
with self.prefix(src=pkgdir,dst=""):
|
||||
self.path("dictionaries")
|
||||
self.path("ca-bundle.crt")
|
||||
|
||||
# include the extracted packages information (see BuildPackagesInfo.cmake)
|
||||
self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt")
|
||||
|
||||
# CHOP-955: If we have "sourceid" or "viewer_channel" in the
|
||||
# build process environment, generate it into
|
||||
# settings_install.xml.
|
||||
|
|
@ -563,8 +562,12 @@ class WindowsManifest(ViewerManifest):
|
|||
|
||||
# Vivox runtimes
|
||||
self.path("SLVoice.exe")
|
||||
self.path("vivoxsdk.dll")
|
||||
self.path("ortp.dll")
|
||||
if (self.address_size == 64):
|
||||
self.path("vivoxsdk_x64.dll")
|
||||
self.path("ortp_x64.dll")
|
||||
else:
|
||||
self.path("vivoxsdk.dll")
|
||||
self.path("ortp.dll")
|
||||
self.path("libsndfile-1.dll")
|
||||
self.path("vivoxoal.dll")
|
||||
|
||||
|
|
|
|||
|
|
@ -525,12 +525,12 @@ int main(int argc, char **argv)
|
|||
const char* LOGTEST = getenv("LOGTEST");
|
||||
if (LOGTEST)
|
||||
{
|
||||
LLError::initForApplication(".", true /* log to stderr */);
|
||||
LLError::initForApplication(".", ".", true /* log to stderr */);
|
||||
LLError::setDefaultLevel(LLError::decodeLevel(LOGTEST));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLError::initForApplication(".", false /* do not log to stderr */);
|
||||
LLError::initForApplication(".", ".", false /* do not log to stderr */);
|
||||
LLError::setDefaultLevel(LLError::LEVEL_DEBUG);
|
||||
}
|
||||
LLError::setFatalFunction(wouldHaveCrashed);
|
||||
|
|
|
|||
Loading…
Reference in New Issue