Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Rye Mutt
blackdragon
Commits
756934bc
Commit
756934bc
authored
Dec 16, 2019
by
NiranV
Browse files
Merge with Linden Release.
--HG-- branch : Black Dragon
parents
753bf8b3
d656d49a
Changes
115
Hide whitespace changes
Inline
Side-by-side
.hgtags
View file @
756934bc
...
...
@@ -556,6 +556,7 @@ ece699718f163921717bb95a6131e94af4c4138f 6.3.1-release
07f5d5bc9faebb45695853d40a9549773db816c0 6.3.2-release
d9a4bd15e2c852953d6c8e84d6f3b7ca442c0e7f 6.3.3-release
4033b3f57e76f087235145a3016886ccdc87ffa3 6.3.4-release
27ca5834bfe9b80e82db5ea42f08b7eb990b722a 6.3.5-release
0000000000000000000000000000000000000000 v2start
0000000000000000000000000000000000000000 alpha-3
0000000000000000000000000000000000000000 fork to viewer-2-0
...
...
autobuild.xml
View file @
756934bc
...
...
@@ -3226,9 +3226,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>
archive
</key>
<map>
<key>
hash
</key>
<string>
42066e2447c7a3359784438d16510992
</string>
<string>
c5ab9d9d7482e48cd76f4bf391900a8c
</string>
<key>
url
</key>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4
0539/348124
/viewer_manager-2.0.5
29188
-darwin64-5
29188
.tar.bz2
</string>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4
3369/385585
/viewer_manager-2.0.5
31000
-darwin64-5
31000
.tar.bz2
</string>
</map>
<key>
name
</key>
<string>
darwin64
</string>
...
...
@@ -3250,9 +3250,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>
archive
</key>
<map>
<key>
hash
</key>
<string>
ca230428635ce13cb7ace0f9522f8546
</string>
<string>
6b10d7407686d9e12e63576256581e3e
</string>
<key>
url
</key>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4
0538/348130
/viewer_manager-2.0.5
29188
-windows-5
29188
.tar.bz2
</string>
<string>
http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4
3370/385592
/viewer_manager-2.0.5
31000
-windows-5
31000
.tar.bz2
</string>
</map>
<key>
name
</key>
<string>
windows
</string>
...
...
@@ -3263,7 +3263,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>
source_type
</key>
<string>
hg
</string>
<key>
version
</key>
<string>
2.0.5
29188
</string>
<string>
2.0.5
31000
</string>
</map>
<key>
vlc-bin
</key>
<map>
...
...
indra/cmake/Variables.cmake
View file @
756934bc
...
...
@@ -186,12 +186,17 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list
(
GET LL_BUILD_LIST
"
${
sysroot_idx
}
"
CMAKE_OSX_SYSROOT
)
message
(
STATUS
"CMAKE_OSX_SYSROOT = '
${
CMAKE_OSX_SYSROOT
}
'"
)
set
(
XCODE_VERSION 7.0
)
set
(
CMAKE_XCODE_ATTRIBUTE_GCC_VERSION
"com.apple.compilers.llvm.clang.1_0"
)
set
(
CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO
)
set
(
CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO
)
set
(
CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3
)
# we must hard code this to off for now. xcode's built in signing does not
# handle embedded app bundles such as CEF and others. Any signing for local
# development must be done after the build as we do in viewer_manifest.py for
# released builds
# https://stackoverflow.com/a/54296008
# "-" represents "Sign to Run Locally" and empty string represents "Do Not Sign"
set
(
CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY
""
)
set
(
CMAKE_OSX_ARCHITECTURES
"
${
ARCH
}
"
)
string
(
REPLACE
"i686"
"i386"
CMAKE_OSX_ARCHITECTURES
"
${
CMAKE_OSX_ARCHITECTURES
}
"
)
...
...
indra/llcharacter/llgesture.cpp
View file @
756934bc
...
...
@@ -107,11 +107,11 @@ BOOL LLGesture::trigger(const std::string& trigger_string)
// NOT endian-neutral
U8
*
LLGesture
::
serialize
(
U8
*
buffer
)
const
{
hto
n
memcpy
(
buffer
,
&
mKey
,
MVT_S8
,
1
);
hto
le
memcpy
(
buffer
,
&
mKey
,
MVT_S8
,
1
);
buffer
+=
sizeof
(
mKey
);
hto
n
memcpy
(
buffer
,
&
mMask
,
MVT_U32
,
4
);
hto
le
memcpy
(
buffer
,
&
mMask
,
MVT_U32
,
4
);
buffer
+=
sizeof
(
mMask
);
hto
n
memcpy
(
buffer
,
mSoundItemID
.
mData
,
MVT_LLUUID
,
16
);
hto
le
memcpy
(
buffer
,
mSoundItemID
.
mData
,
MVT_LLUUID
,
16
);
buffer
+=
16
;
memcpy
(
buffer
,
mTrigger
.
c_str
(),
mTrigger
.
length
()
+
1
);
/* Flawfinder: ignore */
...
...
@@ -134,11 +134,11 @@ U8 *LLGesture::deserialize(U8 *buffer, S32 max_size)
return
buffer
;
}
hto
n
memcpy
(
&
mKey
,
tmp
,
MVT_S8
,
1
);
hto
le
memcpy
(
&
mKey
,
tmp
,
MVT_S8
,
1
);
tmp
+=
sizeof
(
mKey
);
hto
n
memcpy
(
&
mMask
,
tmp
,
MVT_U32
,
4
);
hto
le
memcpy
(
&
mMask
,
tmp
,
MVT_U32
,
4
);
tmp
+=
sizeof
(
mMask
);
hto
n
memcpy
(
mSoundItemID
.
mData
,
tmp
,
MVT_LLUUID
,
16
);
hto
le
memcpy
(
mSoundItemID
.
mData
,
tmp
,
MVT_LLUUID
,
16
);
tmp
+=
16
;
mTrigger
.
assign
((
char
*
)
tmp
);
...
...
@@ -284,7 +284,7 @@ U8 *LLGestureList::serialize(U8 *buffer) const
{
// a single S32 serves as the header that tells us how many to read
U32
count
=
mList
.
size
();
hto
n
memcpy
(
buffer
,
&
count
,
MVT_S32
,
4
);
hto
le
memcpy
(
buffer
,
&
count
,
MVT_S32
,
4
);
buffer
+=
sizeof
(
count
);
for
(
S32
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -310,7 +310,7 @@ U8 *LLGestureList::deserialize(U8 *buffer, S32 max_size)
return
buffer
;
}
hto
n
memcpy
(
&
count
,
tmp
,
MVT_S32
,
4
);
hto
le
memcpy
(
&
count
,
tmp
,
MVT_S32
,
4
);
if
(
count
>
MAX_GESTURES
)
{
...
...
indra/llcommon/llcoros.cpp
View file @
756934bc
...
...
@@ -347,7 +347,7 @@ void LLCoros::toplevel(coro::self& self, CoroData* data, const callable_t& calla
// run the code the caller actually wants in the coroutine
try
{
#if LL_WINDOWS
#if LL_WINDOWS
&& LL_RELEASE_FOR_DOWNLOAD
winlevel
(
callable
);
#else
callable
();
...
...
indra/llimage/llimage.cpp
View file @
756934bc
...
...
@@ -2168,19 +2168,27 @@ bool LLImageFormatted::load(const std::string &filename, int load_size)
}
bool
res
;
U8
*
data
=
allocateData
(
load_size
);
apr_size_t
bytes_read
=
load_size
;
apr_status_t
s
=
apr_file_read
(
apr_file
,
data
,
&
bytes_read
);
// modifies bytes_read
if
(
s
!=
APR_SUCCESS
||
(
S32
)
bytes_read
!=
load_size
)
if
(
data
)
{
deleteData
();
setLastError
(
"Unable to read file"
,
filename
);
res
=
false
;
apr_size_t
bytes_read
=
load_size
;
apr_status_t
s
=
apr_file_read
(
apr_file
,
data
,
&
bytes_read
);
// modifies bytes_read
if
(
s
!=
APR_SUCCESS
||
(
S32
)
bytes_read
!=
load_size
)
{
deleteData
();
setLastError
(
"Unable to read file"
,
filename
);
res
=
false
;
}
else
{
res
=
updateData
();
}
}
else
{
res
=
updateData
();
setLastError
(
"Allocation failure"
,
filename
);
res
=
false
;
}
return
res
;
}
...
...
indra/llmath/llvolume.cpp
View file @
756934bc
...
...
@@ -2421,7 +2421,7 @@ bool LLVolume::unpackVolumeFaces(std::istream& is, S32 size)
if
(
idx
.
empty
()
||
face
.
mNumIndices
<
3
)
{
//why is there an empty index list?
LL_WARNS
()
<<
"Empty face present!
"
<<
LL_ENDL
;
LL_WARNS
()
<<
"Empty face present!
Face index: "
<<
i
<<
" Total: "
<<
face_count
<<
LL_ENDL
;
continue
;
}
...
...
@@ -5265,7 +5265,7 @@ bool LLVolumeFace::cacheOptimize()
LLVCacheLRU
cache
;
if
(
mNumVertices
<
3
)
if
(
mNumVertices
<
3
||
mNumIndices
<
3
)
{
//nothing to do
return
true
;
}
...
...
indra/llmessage/lldatapacker.cpp
View file @
756934bc
...
...
@@ -186,7 +186,7 @@ BOOL LLDataPackerBinaryBuffer::packString(const std::string& value, const char *
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
.
c_str
(),
MVT_VARIABLE
,
length
);
hto
le
memcpy
(
mCurBufferp
,
value
.
c_str
(),
MVT_VARIABLE
,
length
);
}
mCurBufferp
+=
length
;
return
success
;
...
...
@@ -213,12 +213,12 @@ BOOL LLDataPackerBinaryBuffer::packBinaryData(const U8 *value, S32 size, const c
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
&
size
,
MVT_S32
,
4
);
hto
le
memcpy
(
mCurBufferp
,
&
size
,
MVT_S32
,
4
);
}
mCurBufferp
+=
4
;
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
,
MVT_VARIABLE
,
size
);
hto
le
memcpy
(
mCurBufferp
,
value
,
MVT_VARIABLE
,
size
);
}
mCurBufferp
+=
size
;
return
success
;
...
...
@@ -229,12 +229,12 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryData(U8 *value, S32 &size, const char
{
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
4
,
name
);
hto
n
memcpy
(
&
size
,
mCurBufferp
,
MVT_S32
,
4
);
hto
le
memcpy
(
&
size
,
mCurBufferp
,
MVT_S32
,
4
);
mCurBufferp
+=
4
;
success
&=
verifyLength
(
size
,
name
);
if
(
success
)
{
hto
n
memcpy
(
value
,
mCurBufferp
,
MVT_VARIABLE
,
size
);
hto
le
memcpy
(
value
,
mCurBufferp
,
MVT_VARIABLE
,
size
);
mCurBufferp
+=
size
;
}
else
...
...
@@ -253,7 +253,7 @@ BOOL LLDataPackerBinaryBuffer::packBinaryDataFixed(const U8 *value, S32 size, co
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
,
MVT_VARIABLE
,
size
);
hto
le
memcpy
(
mCurBufferp
,
value
,
MVT_VARIABLE
,
size
);
}
mCurBufferp
+=
size
;
return
success
;
...
...
@@ -264,7 +264,7 @@ BOOL LLDataPackerBinaryBuffer::unpackBinaryDataFixed(U8 *value, S32 size, const
{
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
size
,
name
);
hto
n
memcpy
(
value
,
mCurBufferp
,
MVT_VARIABLE
,
size
);
hto
le
memcpy
(
value
,
mCurBufferp
,
MVT_VARIABLE
,
size
);
mCurBufferp
+=
size
;
return
success
;
}
...
...
@@ -302,7 +302,7 @@ BOOL LLDataPackerBinaryBuffer::packU16(const U16 value, const char *name)
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
&
value
,
MVT_U16
,
2
);
hto
le
memcpy
(
mCurBufferp
,
&
value
,
MVT_U16
,
2
);
}
mCurBufferp
+=
2
;
return
success
;
...
...
@@ -314,7 +314,7 @@ BOOL LLDataPackerBinaryBuffer::unpackU16(U16 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
sizeof
(
U16
),
name
);
hto
n
memcpy
(
&
value
,
mCurBufferp
,
MVT_U16
,
2
);
hto
le
memcpy
(
&
value
,
mCurBufferp
,
MVT_U16
,
2
);
mCurBufferp
+=
2
;
return
success
;
}
...
...
@@ -327,7 +327,7 @@ BOOL LLDataPackerBinaryBuffer::packU32(const U32 value, const char *name)
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
&
value
,
MVT_U32
,
4
);
hto
le
memcpy
(
mCurBufferp
,
&
value
,
MVT_U32
,
4
);
}
mCurBufferp
+=
4
;
return
success
;
...
...
@@ -339,7 +339,7 @@ BOOL LLDataPackerBinaryBuffer::unpackU32(U32 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
sizeof
(
U32
),
name
);
hto
n
memcpy
(
&
value
,
mCurBufferp
,
MVT_U32
,
4
);
hto
le
memcpy
(
&
value
,
mCurBufferp
,
MVT_U32
,
4
);
mCurBufferp
+=
4
;
return
success
;
}
...
...
@@ -352,7 +352,7 @@ BOOL LLDataPackerBinaryBuffer::packS32(const S32 value, const char *name)
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
&
value
,
MVT_S32
,
4
);
hto
le
memcpy
(
mCurBufferp
,
&
value
,
MVT_S32
,
4
);
}
mCurBufferp
+=
4
;
return
success
;
...
...
@@ -364,7 +364,7 @@ BOOL LLDataPackerBinaryBuffer::unpackS32(S32 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
sizeof
(
S32
),
name
);
hto
n
memcpy
(
&
value
,
mCurBufferp
,
MVT_S32
,
4
);
hto
le
memcpy
(
&
value
,
mCurBufferp
,
MVT_S32
,
4
);
mCurBufferp
+=
4
;
return
success
;
}
...
...
@@ -377,7 +377,7 @@ BOOL LLDataPackerBinaryBuffer::packF32(const F32 value, const char *name)
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
&
value
,
MVT_F32
,
4
);
hto
le
memcpy
(
mCurBufferp
,
&
value
,
MVT_F32
,
4
);
}
mCurBufferp
+=
4
;
return
success
;
...
...
@@ -389,7 +389,7 @@ BOOL LLDataPackerBinaryBuffer::unpackF32(F32 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
sizeof
(
F32
),
name
);
hto
n
memcpy
(
&
value
,
mCurBufferp
,
MVT_F32
,
4
);
hto
le
memcpy
(
&
value
,
mCurBufferp
,
MVT_F32
,
4
);
mCurBufferp
+=
4
;
return
success
;
}
...
...
@@ -402,7 +402,7 @@ BOOL LLDataPackerBinaryBuffer::packColor4(const LLColor4 &value, const char *nam
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_LLVector4
,
16
);
hto
le
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_LLVector4
,
16
);
}
mCurBufferp
+=
16
;
return
success
;
...
...
@@ -414,7 +414,7 @@ BOOL LLDataPackerBinaryBuffer::unpackColor4(LLColor4 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
16
,
name
);
hto
n
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_LLVector4
,
16
);
hto
le
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_LLVector4
,
16
);
mCurBufferp
+=
16
;
return
success
;
}
...
...
@@ -427,7 +427,7 @@ BOOL LLDataPackerBinaryBuffer::packColor4U(const LLColor4U &value, const char *n
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_VARIABLE
,
4
);
hto
le
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_VARIABLE
,
4
);
}
mCurBufferp
+=
4
;
return
success
;
...
...
@@ -439,7 +439,7 @@ BOOL LLDataPackerBinaryBuffer::unpackColor4U(LLColor4U &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
4
,
name
);
hto
n
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_VARIABLE
,
4
);
hto
le
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_VARIABLE
,
4
);
mCurBufferp
+=
4
;
return
success
;
}
...
...
@@ -453,8 +453,8 @@ BOOL LLDataPackerBinaryBuffer::packVector2(const LLVector2 &value, const char *n
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
&
value
.
mV
[
0
],
MVT_F32
,
4
);
hto
n
memcpy
(
mCurBufferp
+
4
,
&
value
.
mV
[
1
],
MVT_F32
,
4
);
hto
le
memcpy
(
mCurBufferp
,
&
value
.
mV
[
0
],
MVT_F32
,
4
);
hto
le
memcpy
(
mCurBufferp
+
4
,
&
value
.
mV
[
1
],
MVT_F32
,
4
);
}
mCurBufferp
+=
8
;
return
success
;
...
...
@@ -466,8 +466,8 @@ BOOL LLDataPackerBinaryBuffer::unpackVector2(LLVector2 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
8
,
name
);
hto
n
memcpy
(
&
value
.
mV
[
0
],
mCurBufferp
,
MVT_F32
,
4
);
hto
n
memcpy
(
&
value
.
mV
[
1
],
mCurBufferp
+
4
,
MVT_F32
,
4
);
hto
le
memcpy
(
&
value
.
mV
[
0
],
mCurBufferp
,
MVT_F32
,
4
);
hto
le
memcpy
(
&
value
.
mV
[
1
],
mCurBufferp
+
4
,
MVT_F32
,
4
);
mCurBufferp
+=
8
;
return
success
;
}
...
...
@@ -480,7 +480,7 @@ BOOL LLDataPackerBinaryBuffer::packVector3(const LLVector3 &value, const char *n
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_LLVector3
,
12
);
hto
le
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_LLVector3
,
12
);
}
mCurBufferp
+=
12
;
return
success
;
...
...
@@ -492,7 +492,7 @@ BOOL LLDataPackerBinaryBuffer::unpackVector3(LLVector3 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
12
,
name
);
hto
n
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_LLVector3
,
12
);
hto
le
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_LLVector3
,
12
);
mCurBufferp
+=
12
;
return
success
;
}
...
...
@@ -504,7 +504,7 @@ BOOL LLDataPackerBinaryBuffer::packVector4(const LLVector4 &value, const char *n
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_LLVector4
,
16
);
hto
le
memcpy
(
mCurBufferp
,
value
.
mV
,
MVT_LLVector4
,
16
);
}
mCurBufferp
+=
16
;
return
success
;
...
...
@@ -516,7 +516,7 @@ BOOL LLDataPackerBinaryBuffer::unpackVector4(LLVector4 &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
16
,
name
);
hto
n
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_LLVector4
,
16
);
hto
le
memcpy
(
value
.
mV
,
mCurBufferp
,
MVT_LLVector4
,
16
);
mCurBufferp
+=
16
;
return
success
;
}
...
...
@@ -528,7 +528,7 @@ BOOL LLDataPackerBinaryBuffer::packUUID(const LLUUID &value, const char *name)
if
(
mWriteEnabled
)
{
hto
n
memcpy
(
mCurBufferp
,
value
.
mData
,
MVT_LLUUID
,
16
);
hto
le
memcpy
(
mCurBufferp
,
value
.
mData
,
MVT_LLUUID
,
16
);
}
mCurBufferp
+=
16
;
return
success
;
...
...
@@ -540,7 +540,7 @@ BOOL LLDataPackerBinaryBuffer::unpackUUID(LLUUID &value, const char *name)
BOOL
success
=
TRUE
;
success
&=
verifyLength
(
16
,
name
);
hto
n
memcpy
(
value
.
mData
,
mCurBufferp
,
MVT_LLUUID
,
16
);
hto
le
memcpy
(
value
.
mData
,
mCurBufferp
,
MVT_LLUUID
,
16
);
mCurBufferp
+=
16
;
return
success
;
}
...
...
indra/llmessage/llmail.cpp
View file @
756934bc
...
...
@@ -373,7 +373,7 @@ std::string LLMail::encryptIMEmailAddress(const LLUUID& from_agent_id,
// Convert input data into a binary blob
std
::
vector
<
U8
>
data
;
data
.
resize
(
data_size
);
// *NOTE: This may suffer from endian issues. Could be hto
n
memcpy.
// *NOTE: This may suffer from endian issues. Could be hto
le
memcpy.
memcpy
(
&
data
[
0
],
&
time
,
4
);
memcpy
(
&
data
[
4
],
&
from_agent_id
.
mData
[
0
],
UUID_BYTES
);
memcpy
(
&
data
[
4
+
UUID_BYTES
],
&
to_agent_id
.
mData
[
0
],
UUID_BYTES
);
...
...
indra/llmessage/llmessagetemplate.cpp
View file @
756934bc
...
...
@@ -47,7 +47,7 @@ void LLMsgVarData::addData(const void *data, S32 size, EMsgVariableType type, S3
{
delete
[]
mData
;
// Delete it if it already exists
mData
=
new
U8
[
size
];
hto
n
memcpy
(
mData
,
data
,
mType
,
size
);
hto
le
memcpy
(
mData
,
data
,
mType
,
size
);
}
}
...
...
indra/llmessage/lltemplatemessagebuilder.cpp
View file @
756934bc
...
...
@@ -689,14 +689,14 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat
{
case
1
:
sizeb
=
size
;
hto
n
memcpy
(
&
buffer
[
result
],
&
sizeb
,
MVT_U8
,
1
);
hto
le
memcpy
(
&
buffer
[
result
],
&
sizeb
,
MVT_U8
,
1
);
break
;
case
2
:
sizeh
=
size
;
hto
n
memcpy
(
&
buffer
[
result
],
&
sizeh
,
MVT_U16
,
2
);
hto
le
memcpy
(
&
buffer
[
result
],
&
sizeh
,
MVT_U16
,
2
);
break
;
case
4
:
hto
n
memcpy
(
&
buffer
[
result
],
&
size
,
MVT_S32
,
4
);
hto
le
memcpy
(
&
buffer
[
result
],
&
size
,
MVT_S32
,
4
);
break
;
default:
LL_ERRS
()
<<
"Attempting to build variable field with unknown size of "
<<
size
<<
LL_ENDL
;
...
...
indra/llmessage/lltemplatemessagereader.cpp
View file @
756934bc
...
...
@@ -645,15 +645,15 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
switch
(
data_size
)
{
case
1
:
hto
n
memcpy
(
&
tsizeb
,
&
buffer
[
decode_pos
],
MVT_U8
,
1
);
hto
le
memcpy
(
&
tsizeb
,
&
buffer
[
decode_pos
],
MVT_U8
,
1
);
tsize
=
tsizeb
;
break
;
case
2
:
hto
n
memcpy
(
&
tsizeh
,
&
buffer
[
decode_pos
],
MVT_U16
,
2
);
hto
le
memcpy
(
&
tsizeh
,
&
buffer
[
decode_pos
],
MVT_U16
,
2
);
tsize
=
tsizeh
;
break
;
case
4
:
hto
n
memcpy
(
&
tsize
,
&
buffer
[
decode_pos
],
MVT_U32
,
4
);
hto
le
memcpy
(
&
tsize
,
&
buffer
[
decode_pos
],
MVT_U32
,
4
);
break
;
default:
LL_ERRS
()
<<
"Attempting to read variable field with unknown size of "
<<
data_size
<<
LL_ENDL
;
...
...
indra/llmessage/llxfer.cpp
View file @
756934bc
...
...
@@ -245,7 +245,7 @@ void LLXfer::sendPacket(S32 packet_num)
num_copy
);
}
fdata_size
+=
sizeof
(
S32
);
hto
n
memcpy
(
fdata_buf
,
&
mXferSize
,
MVT_S32
,
sizeof
(
S32
));
hto
le
memcpy
(
fdata_buf
,
&
mXferSize
,
MVT_S32
,
sizeof
(
S32
));
}
S32
encoded_packetnum
=
encodePacketNum
(
packet_num
,
last_packet
);
...
...
indra/llmessage/message.h
View file @
756934bc
...
...
@@ -860,10 +860,10 @@ void null_message_callback(LLMessageSystem *msg, void **data);
//
#if !defined( LL_BIG_ENDIAN ) && !defined( LL_LITTLE_ENDIAN )
#error Unknown endianness for hto
n
memcpy. Did you miss a common include?
#error Unknown endianness for hto
le
memcpy. Did you miss a common include?
#endif
static
inline
void
*
hto
n
memcpy
(
void
*
vs
,
const
void
*
vct
,
EMsgVariableType
type
,
size_t
n
)
static
inline
void
*
hto
le
memcpy
(
void
*
vs
,
const
void
*
vct
,
EMsgVariableType
type
,
size_t
n
)
{
char
*
s
=
(
char
*
)
vs
;
const
char
*
ct
=
(
const
char
*
)
vct
;
...
...
@@ -886,7 +886,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_S16
:
if
(
n
!=
2
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
*
(
s
+
1
)
=
*
(
ct
);
...
...
@@ -901,7 +901,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_F32
:
if
(
n
!=
4
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
*
(
s
+
3
)
=
*
(
ct
);
...
...
@@ -918,7 +918,7 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_F64
:
if
(
n
!=
8
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
*
(
s
+
7
)
=
*
(
ct
);
...
...
@@ -938,12 +938,12 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_LLQuaternion
:
// We only send x, y, z and infer w (we set x, y, z to ensure that w >= 0)
if
(
n
!=
12
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
hto
n
memcpy
(
s
+
8
,
ct
+
8
,
MVT_F32
,
4
);
hto
n
memcpy
(
s
+
4
,
ct
+
4
,
MVT_F32
,
4
);
return
(
hto
n
memcpy
(
s
,
ct
,
MVT_F32
,
4
));
hto
le
memcpy
(
s
+
8
,
ct
+
8
,
MVT_F32
,
4
);
hto
le
memcpy
(
s
+
4
,
ct
+
4
,
MVT_F32
,
4
);
return
(
hto
le
memcpy
(
s
,
ct
,
MVT_F32
,
4
));
#else
return
(
memcpy
(
s
,
ct
,
n
));
/* Flawfinder: ignore */
#endif
...
...
@@ -951,12 +951,12 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_LLVector3d
:
if
(
n
!=
24
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
hto
n
memcpy
(
s
+
16
,
ct
+
16
,
MVT_F64
,
8
);
hto
n
memcpy
(
s
+
8
,
ct
+
8
,
MVT_F64
,
8
);
return
(
hto
n
memcpy
(
s
,
ct
,
MVT_F64
,
8
));
hto
le
memcpy
(
s
+
16
,
ct
+
16
,
MVT_F64
,
8
);
hto
le
memcpy
(
s
+
8
,
ct
+
8
,
MVT_F64
,
8
);
return
(
hto
le
memcpy
(
s
,
ct
,
MVT_F64
,
8
));
#else
return
(
memcpy
(
s
,
ct
,
n
));
/* Flawfinder: ignore */
#endif
...
...
@@ -964,13 +964,13 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_LLVector4
:
if
(
n
!=
16
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
hto
n
memcpy
(
s
+
12
,
ct
+
12
,
MVT_F32
,
4
);
hto
n
memcpy
(
s
+
8
,
ct
+
8
,
MVT_F32
,
4
);
hto
n
memcpy
(
s
+
4
,
ct
+
4
,
MVT_F32
,
4
);
return
(
hto
n
memcpy
(
s
,
ct
,
MVT_F32
,
4
));
hto
le
memcpy
(
s
+
12
,
ct
+
12
,
MVT_F32
,
4
);
hto
le
memcpy
(
s
+
8
,
ct
+
8
,
MVT_F32
,
4
);
hto
le
memcpy
(
s
+
4
,
ct
+
4
,
MVT_F32
,
4
);
return
(
hto
le
memcpy
(
s
,
ct
,
MVT_F32
,
4
));
#else
return
(
memcpy
(
s
,
ct
,
n
));
/* Flawfinder: ignore */
#endif
...
...
@@ -978,12 +978,12 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_U16Vec3
:
if
(
n
!=
6
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
hto
n
memcpy
(
s
+
4
,
ct
+
4
,
MVT_U16
,
2
);
hto
n
memcpy
(
s
+
2
,
ct
+
2
,
MVT_U16
,
2
);
return
(
hto
n
memcpy
(
s
,
ct
,
MVT_U16
,
2
));
hto
le
memcpy
(
s
+
4
,
ct
+
4
,
MVT_U16
,
2
);
hto
le
memcpy
(
s
+
2
,
ct
+
2
,
MVT_U16
,
2
);
return
(
hto
le
memcpy
(
s
,
ct
,
MVT_U16
,
2
));
#else
return
(
memcpy
(
s
,
ct
,
n
));
/* Flawfinder: ignore */
#endif
...
...
@@ -991,13 +991,13 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_U16Quat
:
if
(
n
!=
8
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}
#ifdef LL_BIG_ENDIAN
hto
n
memcpy
(
s
+
6
,
ct
+
6
,
MVT_U16
,
2
);
hto
n
memcpy
(
s
+
4
,
ct
+
4
,
MVT_U16
,
2
);
hto
n
memcpy
(
s
+
2
,
ct
+
2
,
MVT_U16
,
2
);
return
(
hto
n
memcpy
(
s
,
ct
,
MVT_U16
,
2
));
hto
le
memcpy
(
s
+
6
,
ct
+
6
,
MVT_U16
,
2
);
hto
le
memcpy
(
s
+
4
,
ct
+
4
,
MVT_U16
,
2
);
hto
le
memcpy
(
s
+
2
,
ct
+
2
,
MVT_U16
,
2
);
return
(
hto
le
memcpy
(
s
,
ct
,
MVT_U16
,
2
));
#else
return
(
memcpy
(
s
,
ct
,
n
));
/* Flawfinder: ignore */
#endif
...
...
@@ -1005,15 +1005,15 @@ static inline void *htonmemcpy(void *vs, const void *vct, EMsgVariableType type,
case
MVT_S16Array
:
if
(
n
%
2
)
{
LL_ERRS
()
<<
"Size argument passed to hto
n
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
LL_ERRS
()
<<
"Size argument passed to hto
le
memcpy doesn't match swizzle type size"
<<
LL_ENDL
;
}