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
Alchemy
Alchemy Next
Commits
e2f3fb1c
Commit
e2f3fb1c
authored
Aug 29, 2021
by
Rye Mutt
🍞
Browse files
Replace usage of slower UDP packet functions with fast variants to reduce mutex locks and stutter
parent
9b3b346d
Changes
45
Hide whitespace changes
Inline
Side-by-side
indra/llinventory/lllandmark.cpp
View file @
e2f3fb1c
...
...
@@ -250,9 +250,9 @@ void LLLandmark::requestRegionHandle(
}
LL_DEBUGS
(
"Landmark"
)
<<
"Landmark requesting information about: "
<<
region_id
<<
LL_ENDL
;
msg
->
newMessage
(
"
RegionHandleRequest
"
);
msg
->
nextBlock
(
"
RequestBlock
"
);
msg
->
addUUID
(
"
RegionID
"
,
region_id
);
msg
->
newMessage
Fast
(
_PREHASH_
RegionHandleRequest
);
msg
->
nextBlock
Fast
(
_PREHASH_
RequestBlock
);
msg
->
addUUID
Fast
(
_PREHASH_
RegionID
,
region_id
);
msg
->
sendReliable
(
upstream_host
);
}
else
if
(
callback
)
...
...
@@ -280,12 +280,12 @@ void LLLandmark::setRegionHandle(const LLUUID& region_id, U64 region_handle)
void
LLLandmark
::
processRegionIDAndHandle
(
LLMessageSystem
*
msg
,
void
**
)
{
LLUUID
region_id
;
msg
->
getUUID
(
"
ReplyBlock
"
,
"
RegionID
"
,
region_id
);
msg
->
getUUID
Fast
(
_PREHASH_
ReplyBlock
,
_PREHASH_
RegionID
,
region_id
);
mRegions
.
erase
(
region_id
);
CacheInfo
info
;
const
F32
CACHE_EXPIRY_SECONDS
=
60.0
f
*
10.0
f
;
// ten minutes
info
.
mTimer
.
setTimerExpirySec
(
CACHE_EXPIRY_SECONDS
);
msg
->
getU64
(
"
ReplyBlock
"
,
"
RegionHandle
"
,
info
.
mRegionHandle
);
msg
->
getU64
Fast
(
_PREHASH_
ReplyBlock
,
_PREHASH_
RegionHandle
,
info
.
mRegionHandle
);
region_map_t
::
value_type
vt
(
region_id
,
info
);
mRegions
.
insert
(
vt
);
...
...
indra/llmessage/llcircuit.cpp
View file @
e2f3fb1c
...
...
@@ -951,7 +951,7 @@ BOOL LLCircuitData::updateWatchDogTimers(LLMessageSystem *msgsys)
// Send off the another ping.
pingTimerStart
();
msgsys
->
newMessageFast
(
_PREHASH_StartPingCheck
);
msgsys
->
nextBlock
(
_PREHASH_PingID
);
msgsys
->
nextBlock
Fast
(
_PREHASH_PingID
);
msgsys
->
addU8Fast
(
_PREHASH_PingID
,
nextPingID
());
msgsys
->
addU32Fast
(
_PREHASH_OldestUnacked
,
packet_id
);
msgsys
->
sendMessage
(
mHost
);
...
...
indra/llmessage/lltransfermanager.cpp
View file @
e2f3fb1c
...
...
@@ -81,10 +81,10 @@ void LLTransferManager::init()
mValid
=
TRUE
;
// Register message system handlers
gMessageSystem
->
setHandlerFunc
(
"
TransferRequest
"
,
processTransferRequest
,
NULL
);
gMessageSystem
->
setHandlerFunc
(
"
TransferInfo
"
,
processTransferInfo
,
NULL
);
gMessageSystem
->
setHandlerFunc
(
"
TransferPacket
"
,
processTransferPacket
,
NULL
);
gMessageSystem
->
setHandlerFunc
(
"
TransferAbort
"
,
processTransferAbort
,
NULL
);
gMessageSystem
->
setHandlerFunc
Fast
(
_PREHASH_
TransferRequest
,
processTransferRequest
,
NULL
);
gMessageSystem
->
setHandlerFunc
Fast
(
_PREHASH_
TransferInfo
,
processTransferInfo
,
NULL
);
gMessageSystem
->
setHandlerFunc
Fast
(
_PREHASH_
TransferPacket
,
processTransferPacket
,
NULL
);
gMessageSystem
->
setHandlerFunc
Fast
(
_PREHASH_
TransferAbort
,
processTransferAbort
,
NULL
);
}
...
...
@@ -212,17 +212,17 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **)
LLTransferChannelType
channel_type
;
F32
priority
;
msgp
->
getUUID
(
"
TransferInfo
"
,
"
TransferID
"
,
transfer_id
);
msgp
->
getUUID
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
TransferID
,
transfer_id
);
S32
temp_source_type
;
msgp
->
getS32
(
"
TransferInfo
"
,
"
SourceType
"
,
temp_source_type
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
SourceType
,
temp_source_type
);
source_type
=
(
LLTransferSourceType
)
temp_source_type
;
S32
temp_channel_type
;
msgp
->
getS32
(
"
TransferInfo
"
,
"
ChannelType
"
,
temp_channel_type
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
ChannelType
,
temp_channel_type
);
channel_type
=
(
LLTransferChannelType
)
temp_channel_type
;
msgp
->
getF32
(
"
TransferInfo
"
,
"
Priority
"
,
priority
);
msgp
->
getF32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Priority
,
priority
);
LLTransferSourceChannel
*
tscp
=
gTransferManager
.
getSourceChannel
(
msgp
->
getSender
(),
channel_type
);
...
...
@@ -238,7 +238,7 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **)
return
;
}
S32
size
=
msgp
->
getSize
(
"
TransferInfo
"
,
"
Params
"
);
S32
size
=
msgp
->
getSize
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Params
);
if
(
size
>
MAX_PARAMS_SIZE
)
{
LL_WARNS
()
<<
"LLTransferManager::processTransferRequest params too big."
...
...
@@ -258,7 +258,7 @@ void LLTransferManager::processTransferRequest(LLMessageSystem *msgp, void **)
return
;
}
U8
tmp
[
MAX_PARAMS_SIZE
];
msgp
->
getBinaryData
(
"
TransferInfo
"
,
"
Params
"
,
tmp
,
size
);
msgp
->
getBinaryData
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Params
,
tmp
,
size
);
LLDataPackerBinaryBuffer
dpb
(
tmp
,
MAX_PARAMS_SIZE
);
BOOL
unpack_ok
=
tsp
->
unpackParams
(
dpb
);
...
...
@@ -288,17 +288,17 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **)
LLTSCode
status
;
S32
size
;
msgp
->
getUUID
(
"
TransferInfo
"
,
"
TransferID
"
,
transfer_id
);
msgp
->
getUUID
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
TransferID
,
transfer_id
);
S32
temp_channel_type
;
msgp
->
getS32
(
"
TransferInfo
"
,
"
ChannelType
"
,
temp_channel_type
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
ChannelType
,
temp_channel_type
);
channel_type
=
(
LLTransferChannelType
)
temp_channel_type
;
S32
temp_status
;
msgp
->
getS32
(
"
TransferInfo
"
,
"
Status
"
,
temp_status
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Status
,
temp_status
);
status
=
(
LLTSCode
)
temp_status
;
msgp
->
getS32
(
"
TransferInfo
"
,
"
Size
"
,
size
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Size
,
size
);
//LL_INFOS() << transfer_id << ":" << target_type<< ":" << channel_type << LL_ENDL;
LLTransferTargetChannel
*
ttcp
=
gTransferManager
.
getTargetChannel
(
msgp
->
getSender
(),
channel_type
);
...
...
@@ -328,7 +328,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **)
}
// unpack the params
S32
params_size
=
msgp
->
getSize
(
"
TransferInfo
"
,
"
Params
"
);
S32
params_size
=
msgp
->
getSize
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Params
);
if
(
params_size
>
MAX_PARAMS_SIZE
)
{
LL_WARNS
()
<<
"LLTransferManager::processTransferInfo params too big."
...
...
@@ -338,7 +338,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **)
else
if
(
params_size
>
0
)
{
U8
tmp
[
MAX_PARAMS_SIZE
];
msgp
->
getBinaryData
(
"
TransferInfo
"
,
"
Params
"
,
tmp
,
params_size
);
msgp
->
getBinaryData
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
Params
,
tmp
,
params_size
);
LLDataPackerBinaryBuffer
dpb
(
tmp
,
MAX_PARAMS_SIZE
);
if
(
!
ttp
->
unpackParams
(
dpb
))
{
...
...
@@ -431,16 +431,16 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **)
S32
packet_id
;
LLTSCode
status
;
S32
size
;
msgp
->
getUUID
(
"
TransferData
"
,
"
TransferID
"
,
transfer_id
);
msgp
->
getUUID
Fast
(
_PREHASH_
TransferData
,
_PREHASH_
TransferID
,
transfer_id
);
S32
temp_channel_type
;
msgp
->
getS32
(
"
TransferData
"
,
"
ChannelType
"
,
temp_channel_type
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferData
,
_PREHASH_
ChannelType
,
temp_channel_type
);
channel_type
=
(
LLTransferChannelType
)
temp_channel_type
;
msgp
->
getS32
(
"
TransferData
"
,
"
Packet
"
,
packet_id
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferData
,
_PREHASH_
Packet
,
packet_id
);
S32
temp_status
;
msgp
->
getS32
(
"
TransferData
"
,
"
Status
"
,
temp_status
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferData
,
_PREHASH_
Status
,
temp_status
);
status
=
(
LLTSCode
)
temp_status
;
// Find the transfer associated with this packet.
...
...
@@ -461,7 +461,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **)
return
;
}
size
=
msgp
->
getSize
(
"
TransferData
"
,
"
Data
"
);
size
=
msgp
->
getSize
Fast
(
_PREHASH_
TransferData
,
_PREHASH_
Data
);
S32
msg_bytes
=
0
;
if
(
msgp
->
getReceiveCompressedSize
())
...
...
@@ -484,7 +484,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **)
if
(
size
>
0
)
{
// Only pull the data out if the size is > 0
msgp
->
getBinaryData
(
"
TransferData
"
,
"
Data
"
,
tmp_data
,
size
);
msgp
->
getBinaryData
Fast
(
_PREHASH_
TransferData
,
_PREHASH_
Data
,
tmp_data
,
size
);
}
if
((
!
ttp
->
gotInfo
())
||
(
ttp
->
getNextPacketID
()
!=
packet_id
))
...
...
@@ -589,10 +589,10 @@ void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **)
LLUUID
transfer_id
;
LLTransferChannelType
channel_type
;
msgp
->
getUUID
(
"
TransferInfo
"
,
"
TransferID
"
,
transfer_id
);
msgp
->
getUUID
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
TransferID
,
transfer_id
);
S32
temp_channel_type
;
msgp
->
getS32
(
"
TransferInfo
"
,
"
ChannelType
"
,
temp_channel_type
);
msgp
->
getS32
Fast
(
_PREHASH_
TransferInfo
,
_PREHASH_
ChannelType
,
temp_channel_type
);
channel_type
=
(
LLTransferChannelType
)
temp_channel_type
;
// See if it's a target that we're trying to abort
...
...
@@ -836,13 +836,13 @@ void LLTransferSourceChannel::updateTransfers()
// Send the data now, even if it's an error.
// The status code will tell the other end what to do.
gMessageSystem
->
newMessage
(
"
TransferPacket
"
);
gMessageSystem
->
nextBlock
(
"
TransferData
"
);
gMessageSystem
->
addUUID
(
"
TransferID
"
,
tsp
->
getID
());
gMessageSystem
->
addS32
(
"
ChannelType
"
,
getChannelType
());
gMessageSystem
->
addS32
(
"
Packet
"
,
packet_id
);
// HACK! Need to put in a REAL packet id
gMessageSystem
->
addS32
(
"
Status
"
,
status
);
gMessageSystem
->
addBinaryData
(
"
Data
"
,
datap
,
data_size
);
gMessageSystem
->
newMessage
Fast
(
_PREHASH_
TransferPacket
);
gMessageSystem
->
nextBlock
Fast
(
_PREHASH_
TransferData
);
gMessageSystem
->
addUUID
Fast
(
_PREHASH_
TransferID
,
tsp
->
getID
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
ChannelType
,
getChannelType
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
Packet
,
packet_id
);
// HACK! Need to put in a REAL packet id
gMessageSystem
->
addS32
Fast
(
_PREHASH_
Status
,
status
);
gMessageSystem
->
addBinaryData
Fast
(
_PREHASH_
Data
,
datap
,
data_size
);
sent_bytes
=
gMessageSystem
->
getCurrentSendTotal
();
gMessageSystem
->
sendReliable
(
getHost
(),
LL_DEFAULT_RELIABLE_RETRIES
,
TRUE
,
F32Seconds
(
0.
f
),
LLTransferManager
::
reliablePacketCallback
,
(
void
**
)
cb_uuid
);
...
...
@@ -1002,18 +1002,18 @@ void LLTransferTargetChannel::sendTransferRequest(LLTransferTarget *targetp,
llassert
(
targetp
);
llassert
(
targetp
->
getChannel
()
==
this
);
gMessageSystem
->
newMessage
(
"
TransferRequest
"
);
gMessageSystem
->
nextBlock
(
"
TransferInfo
"
);
gMessageSystem
->
addUUID
(
"
TransferID
"
,
targetp
->
getID
());
gMessageSystem
->
addS32
(
"
SourceType
"
,
params
.
getType
());
gMessageSystem
->
addS32
(
"
ChannelType
"
,
getChannelType
());
gMessageSystem
->
addF32
(
"
Priority
"
,
priority
);
gMessageSystem
->
newMessage
Fast
(
_PREHASH_
TransferRequest
);
gMessageSystem
->
nextBlock
Fast
(
_PREHASH_
TransferInfo
);
gMessageSystem
->
addUUID
Fast
(
_PREHASH_
TransferID
,
targetp
->
getID
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
SourceType
,
params
.
getType
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
ChannelType
,
getChannelType
());
gMessageSystem
->
addF32
Fast
(
_PREHASH_
Priority
,
priority
);
U8
tmp
[
MAX_PARAMS_SIZE
];
LLDataPackerBinaryBuffer
dp
(
tmp
,
MAX_PARAMS_SIZE
);
params
.
packParams
(
dp
);
S32
len
=
dp
.
getCurrentSize
();
gMessageSystem
->
addBinaryData
(
"
Params
"
,
tmp
,
len
);
gMessageSystem
->
addBinaryData
Fast
(
_PREHASH_
Params
,
tmp
,
len
);
gMessageSystem
->
sendReliable
(
mHost
);
}
...
...
@@ -1092,18 +1092,18 @@ LLTransferSource::~LLTransferSource()
void
LLTransferSource
::
sendTransferStatus
(
LLTSCode
status
)
{
gMessageSystem
->
newMessage
(
"
TransferInfo
"
);
gMessageSystem
->
nextBlock
(
"
TransferInfo
"
);
gMessageSystem
->
addUUID
(
"
TransferID
"
,
getID
());
gMessageSystem
->
addS32
(
"
TargetType
"
,
LLTTT_UNKNOWN
);
gMessageSystem
->
addS32
(
"
ChannelType
"
,
mChannelp
->
getChannelType
());
gMessageSystem
->
addS32
(
"
Status
"
,
status
);
gMessageSystem
->
addS32
(
"
Size
"
,
mSize
);
gMessageSystem
->
newMessage
Fast
(
_PREHASH_
TransferInfo
);
gMessageSystem
->
nextBlock
Fast
(
_PREHASH_
TransferInfo
);
gMessageSystem
->
addUUID
Fast
(
_PREHASH_
TransferID
,
getID
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
TargetType
,
LLTTT_UNKNOWN
);
gMessageSystem
->
addS32
Fast
(
_PREHASH_
ChannelType
,
mChannelp
->
getChannelType
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
Status
,
status
);
gMessageSystem
->
addS32
Fast
(
_PREHASH_
Size
,
mSize
);
U8
tmp
[
MAX_PARAMS_SIZE
];
LLDataPackerBinaryBuffer
dp
(
tmp
,
MAX_PARAMS_SIZE
);
packParams
(
dp
);
S32
len
=
dp
.
getCurrentSize
();
gMessageSystem
->
addBinaryData
(
"
Params
"
,
tmp
,
len
);
gMessageSystem
->
addBinaryData
Fast
(
_PREHASH_
Params
,
tmp
,
len
);
gMessageSystem
->
sendReliable
(
mChannelp
->
getHost
());
// Abort if there was as asset system issue.
...
...
@@ -1122,10 +1122,10 @@ void LLTransferSource::abortTransfer()
{
// Send a message down, call the completion callback
LL_INFOS
()
<<
"LLTransferSource::Aborting transfer "
<<
getID
()
<<
" to "
<<
mChannelp
->
getHost
()
<<
LL_ENDL
;
gMessageSystem
->
newMessage
(
"
TransferAbort
"
);
gMessageSystem
->
nextBlock
(
"
TransferInfo
"
);
gMessageSystem
->
addUUID
(
"
TransferID
"
,
getID
());
gMessageSystem
->
addS32
(
"
ChannelType
"
,
mChannelp
->
getChannelType
());
gMessageSystem
->
newMessage
Fast
(
_PREHASH_
TransferAbort
);
gMessageSystem
->
nextBlock
Fast
(
_PREHASH_
TransferInfo
);
gMessageSystem
->
addUUID
Fast
(
_PREHASH_
TransferID
,
getID
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
ChannelType
,
mChannelp
->
getChannelType
());
gMessageSystem
->
sendReliable
(
mChannelp
->
getHost
());
completionCallback
(
LLTS_ABORT
);
...
...
@@ -1255,10 +1255,10 @@ void LLTransferTarget::abortTransfer()
{
// Send a message up, call the completion callback
LL_INFOS
()
<<
"LLTransferTarget::Aborting transfer "
<<
getID
()
<<
" from "
<<
mChannelp
->
getHost
()
<<
LL_ENDL
;
gMessageSystem
->
newMessage
(
"
TransferAbort
"
);
gMessageSystem
->
nextBlock
(
"
TransferInfo
"
);
gMessageSystem
->
addUUID
(
"
TransferID
"
,
getID
());
gMessageSystem
->
addS32
(
"
ChannelType
"
,
mChannelp
->
getChannelType
());
gMessageSystem
->
newMessage
Fast
(
_PREHASH_
TransferAbort
);
gMessageSystem
->
nextBlock
Fast
(
_PREHASH_
TransferInfo
);
gMessageSystem
->
addUUID
Fast
(
_PREHASH_
TransferID
,
getID
());
gMessageSystem
->
addS32
Fast
(
_PREHASH_
ChannelType
,
mChannelp
->
getChannelType
());
gMessageSystem
->
sendReliable
(
mChannelp
->
getHost
());
completionCallback
(
LLTS_ABORT
);
...
...
indra/llmessage/llxfer_file.cpp
View file @
e2f3fb1c
...
...
@@ -172,9 +172,9 @@ S32 LLXfer_File::startDownload()
gMessageSystem
->
nextBlockFast
(
_PREHASH_XferID
);
gMessageSystem
->
addU64Fast
(
_PREHASH_ID
,
mID
);
gMessageSystem
->
addStringFast
(
_PREHASH_Filename
,
mRemoteFilename
);
gMessageSystem
->
addU8
(
"
FilePath
"
,
(
U8
)
mRemotePath
);
gMessageSystem
->
addBOOL
(
"
DeleteOnCompletion
"
,
mDeleteRemoteOnCompletion
);
gMessageSystem
->
addBOOL
(
"
UseBigPackets
"
,
BOOL
(
mChunkSize
==
LL_XFER_LARGE_PAYLOAD
));
gMessageSystem
->
addU8
Fast
(
_PREHASH_
FilePath
,
(
U8
)
mRemotePath
);
gMessageSystem
->
addBOOL
Fast
(
_PREHASH_
DeleteOnCompletion
,
mDeleteRemoteOnCompletion
);
gMessageSystem
->
addBOOL
Fast
(
_PREHASH_
UseBigPackets
,
BOOL
(
mChunkSize
==
LL_XFER_LARGE_PAYLOAD
));
gMessageSystem
->
addUUIDFast
(
_PREHASH_VFileID
,
LLUUID
::
null
);
gMessageSystem
->
addS16Fast
(
_PREHASH_VFileType
,
-
1
);
...
...
indra/llmessage/llxfer_mem.cpp
View file @
e2f3fb1c
...
...
@@ -162,9 +162,9 @@ S32 LLXfer_Mem::startDownload()
gMessageSystem
->
nextBlockFast
(
_PREHASH_XferID
);
gMessageSystem
->
addU64Fast
(
_PREHASH_ID
,
mID
);
gMessageSystem
->
addStringFast
(
_PREHASH_Filename
,
mRemoteFilename
);
gMessageSystem
->
addU8
(
"
FilePath
"
,
(
U8
)
mRemotePath
);
gMessageSystem
->
addBOOL
(
"
DeleteOnCompletion
"
,
mDeleteRemoteOnCompletion
);
gMessageSystem
->
addBOOL
(
"
UseBigPackets
"
,
BOOL
(
mChunkSize
==
LL_XFER_LARGE_PAYLOAD
));
gMessageSystem
->
addU8
Fast
(
_PREHASH_
FilePath
,
(
U8
)
mRemotePath
);
gMessageSystem
->
addBOOL
Fast
(
_PREHASH_
DeleteOnCompletion
,
mDeleteRemoteOnCompletion
);
gMessageSystem
->
addBOOL
Fast
(
_PREHASH_
UseBigPackets
,
BOOL
(
mChunkSize
==
LL_XFER_LARGE_PAYLOAD
));
gMessageSystem
->
addUUIDFast
(
_PREHASH_VFileID
,
LLUUID
::
null
);
gMessageSystem
->
addS16Fast
(
_PREHASH_VFileType
,
-
1
);
...
...
indra/llmessage/llxfer_vfile.cpp
View file @
e2f3fb1c
...
...
@@ -154,9 +154,9 @@ S32 LLXfer_VFile::startDownload()
gMessageSystem
->
nextBlockFast
(
_PREHASH_XferID
);
gMessageSystem
->
addU64Fast
(
_PREHASH_ID
,
mID
);
gMessageSystem
->
addStringFast
(
_PREHASH_Filename
,
""
);
gMessageSystem
->
addU8
(
"
FilePath
"
,
(
U8
)
LL_PATH_NONE
);
gMessageSystem
->
addBOOL
(
"
DeleteOnCompletion
"
,
FALSE
);
gMessageSystem
->
addBOOL
(
"
UseBigPackets
"
,
BOOL
(
mChunkSize
==
LL_XFER_LARGE_PAYLOAD
));
gMessageSystem
->
addU8
Fast
(
_PREHASH_
FilePath
,
(
U8
)
LL_PATH_NONE
);
gMessageSystem
->
addBOOL
Fast
(
_PREHASH_
DeleteOnCompletion
,
FALSE
);
gMessageSystem
->
addBOOL
Fast
(
_PREHASH_
UseBigPackets
,
BOOL
(
mChunkSize
==
LL_XFER_LARGE_PAYLOAD
));
gMessageSystem
->
addUUIDFast
(
_PREHASH_VFileID
,
mRemoteID
);
gMessageSystem
->
addS16Fast
(
_PREHASH_VFileType
,
(
S16
)
mType
);
...
...
indra/llmessage/message.cpp
View file @
e2f3fb1c
...
...
@@ -1767,7 +1767,7 @@ void process_start_ping_check(LLMessageSystem *msgsystem, void** /*user_data*/)
// Send off the response
msgsystem
->
newMessageFast
(
_PREHASH_CompletePingCheck
);
msgsystem
->
nextBlockFast
(
_PREHASH_PingID
);
msgsystem
->
addU8
(
_PREHASH_PingID
,
ping_id
);
msgsystem
->
addU8
Fast
(
_PREHASH_PingID
,
ping_id
);
msgsystem
->
sendMessage
(
msgsystem
->
getSender
());
}
...
...
@@ -2001,17 +2001,17 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,
void
LLMessageSystem
::
processError
(
LLMessageSystem
*
msg
,
void
**
)
{
S32
error_code
=
0
;
msg
->
getS32
(
"
Data
"
,
"
Code
"
,
error_code
);
msg
->
getS32
Fast
(
_PREHASH_
Data
,
_PREHASH_
Code
,
error_code
);
std
::
string
error_token
;
msg
->
getString
(
"
Data
"
,
"
Token
"
,
error_token
);
msg
->
getString
Fast
(
_PREHASH_
Data
,
_PREHASH_
Token
,
error_token
);
LLUUID
error_id
;
msg
->
getUUID
(
"
Data
"
,
"
ID
"
,
error_id
);
msg
->
getUUID
Fast
(
_PREHASH_
Data
,
_PREHASH_
ID
,
error_id
);
std
::
string
error_system
;
msg
->
getString
(
"
Data
"
,
"
System
"
,
error_system
);
msg
->
getString
Fast
(
_PREHASH_
Data
,
_PREHASH_
System
,
error_system
);
std
::
string
error_message
;
msg
->
getString
(
"
Data
"
,
"
Message
"
,
error_message
);
msg
->
getString
Fast
(
_PREHASH_
Data
,
_PREHASH_
Message
,
error_message
);
LL_WARNS
(
"Messaging"
)
<<
"Message error from "
<<
msg
->
getSender
()
<<
" - "
<<
error_code
<<
" "
<<
error_token
<<
" "
<<
error_id
<<
"
\"
"
...
...
@@ -2539,13 +2539,12 @@ bool start_messaging_system(
gMessageSystem
->
setHandlerFuncFast
(
_PREHASH_DenyTrustedCircuit
,
process_deny_trusted_circuit
,
NULL
);
gMessageSystem
->
setHandlerFunc
(
"
Error
"
,
LLMessageSystem
::
processError
);
gMessageSystem
->
setHandlerFunc
Fast
(
_PREHASH_
Error
,
LLMessageSystem
::
processError
);
// We can hand this to the null_message_callback since it is a
// trusted message, so it will automatically be denied if it isn't
// trusted and ignored if it is -- exactly what we want.
gMessageSystem
->
setHandlerFunc
(
"RequestTrustedCircuit"
,
gMessageSystem
->
setHandlerFuncFast
(
_PREHASH_RequestTrustedCircuit
,
null_message_callback
,
NULL
);
...
...
indra/llui/llurlentry.cpp
View file @
e2f3fb1c
...
...
@@ -1036,12 +1036,12 @@ void LLUrlEntryParcel::sendParcelInfoRequest(const LLUUID& parcel_id)
if
(
sRegionHost
.
isInvalid
()
||
sDisconnected
)
return
;
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
ParcelInfoRequest
"
);
msg
->
newMessage
Fast
(
_PREHASH_
ParcelInfoRequest
);
msg
->
nextBlockFast
(
_PREHASH_AgentData
);
msg
->
addUUIDFast
(
_PREHASH_AgentID
,
sAgentID
);
msg
->
addUUID
(
"
SessionID
"
,
sSessionID
);
msg
->
nextBlock
(
"
Data
"
);
msg
->
addUUID
(
"
ParcelID
"
,
parcel_id
);
msg
->
addUUID
Fast
(
_PREHASH_
SessionID
,
sSessionID
);
msg
->
nextBlock
Fast
(
_PREHASH_
Data
);
msg
->
addUUID
Fast
(
_PREHASH_
ParcelID
,
parcel_id
);
msg
->
sendReliable
(
sRegionHost
);
}
...
...
indra/newview/alavataractions.cpp
View file @
e2f3fb1c
...
...
@@ -650,13 +650,13 @@ bool ALAvatarActions::handleParcelFreeze(const LLSD& notification, const LLSD& r
const
auto
&
id
=
it
->
asUUID
();
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
FreezeUser
"
);
msg
->
nextBlock
(
"
AgentData
"
);
msg
->
addUUID
(
"
AgentID
"
,
gAgent
.
getID
());
msg
->
addUUID
(
"
SessionID
"
,
gAgent
.
getSessionID
());
msg
->
nextBlock
(
"
Data
"
);
msg
->
addUUID
(
"
TargetID
"
,
id
);
msg
->
addU32
(
"
Flags
"
,
flags
);
msg
->
newMessage
Fast
(
_PREHASH_
FreezeUser
);
msg
->
nextBlock
Fast
(
_PREHASH_
AgentData
);
msg
->
addUUID
Fast
(
_PREHASH_
AgentID
,
gAgent
.
getID
());
msg
->
addUUID
Fast
(
_PREHASH_
SessionID
,
gAgent
.
getSessionID
());
msg
->
nextBlock
Fast
(
_PREHASH_
Data
);
msg
->
addUUID
Fast
(
_PREHASH_
TargetID
,
id
);
msg
->
addU32
Fast
(
_PREHASH_
Flags
,
flags
);
gAgent
.
sendReliableMessage
();
}
}
...
...
@@ -679,13 +679,13 @@ bool ALAvatarActions::handleParcelEject(const LLSD& notification, const LLSD& re
const
auto
&
id
=
it
->
asUUID
();
U32
flags
=
(
1
==
option
&&
ban_enabled
)
?
0x1
:
0x0
;
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
EjectUser
"
);
msg
->
nextBlock
(
"
AgentData
"
);
msg
->
addUUID
(
"
AgentID
"
,
gAgent
.
getID
());
msg
->
addUUID
(
"
SessionID
"
,
gAgent
.
getSessionID
());
msg
->
nextBlock
(
"
Data
"
);
msg
->
addUUID
(
"
TargetID
"
,
id
);
msg
->
addU32
(
"
Flags
"
,
flags
);
msg
->
newMessage
Fast
(
_PREHASH_
EjectUser
);
msg
->
nextBlock
Fast
(
_PREHASH_
AgentData
);
msg
->
addUUID
Fast
(
_PREHASH_
AgentID
,
gAgent
.
getID
());
msg
->
addUUID
Fast
(
_PREHASH_
SessionID
,
gAgent
.
getSessionID
());
msg
->
nextBlock
Fast
(
_PREHASH_
Data
);
msg
->
addUUID
Fast
(
_PREHASH_
TargetID
,
id
);
msg
->
addU32
Fast
(
_PREHASH_
Flags
,
flags
);
gAgent
.
sendReliableMessage
();
}
return
false
;
...
...
indra/newview/llagent.cpp
View file @
e2f3fb1c
...
...
@@ -3155,13 +3155,13 @@ BOOL LLAgent::setGroupContribution(const LLUUID& group_id, S32 contribution)
{
mGroups
[
i
].
mContribution
=
contribution
;
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
SetGroupContribution
"
);
msg
->
nextBlock
(
"
AgentData
"
);
msg
->
addUUID
(
"
AgentID
"
,
gAgentID
);
msg
->
addUUID
(
"
SessionID
"
,
gAgentSessionID
);
msg
->
nextBlock
(
"
Data
"
);
msg
->
addUUID
(
"
GroupID
"
,
group_id
);
msg
->
addS32
(
"
Contribution
"
,
contribution
);
msg
->
newMessage
Fast
(
_PREHASH_
SetGroupContribution
);
msg
->
nextBlock
Fast
(
_PREHASH_
AgentData
);
msg
->
addUUID
Fast
(
_PREHASH_
AgentID
,
gAgentID
);
msg
->
addUUID
Fast
(
_PREHASH_
SessionID
,
gAgentSessionID
);
msg
->
nextBlock
Fast
(
_PREHASH_
Data
);
msg
->
addUUID
Fast
(
_PREHASH_
GroupID
,
group_id
);
msg
->
addS32
Fast
(
_PREHASH_
Contribution
,
contribution
);
sendReliableMessage
();
return
TRUE
;
}
...
...
@@ -3179,15 +3179,15 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO
mGroups
[
i
].
mAcceptNotices
=
accept_notices
;
mGroups
[
i
].
mListInProfile
=
list_in_profile
;
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
SetGroupAcceptNotices
"
);
msg
->
nextBlock
(
"
AgentData
"
);
msg
->
addUUID
(
"
AgentID
"
,
gAgentID
);
msg
->
addUUID
(
"
SessionID
"
,
gAgentSessionID
);
msg
->
nextBlock
(
"
Data
"
);
msg
->
addUUID
(
"
GroupID
"
,
group_id
);
msg
->
addBOOL
(
"
AcceptNotices
"
,
accept_notices
);
msg
->
nextBlock
(
"
NewData
"
);
msg
->
addBOOL
(
"
ListInProfile
"
,
list_in_profile
);
msg
->
newMessage
Fast
(
_PREHASH_
SetGroupAcceptNotices
);
msg
->
nextBlock
Fast
(
_PREHASH_
AgentData
);
msg
->
addUUID
Fast
(
_PREHASH_
AgentID
,
gAgentID
);
msg
->
addUUID
Fast
(
_PREHASH_
SessionID
,
gAgentSessionID
);
msg
->
nextBlock
Fast
(
_PREHASH_
Data
);
msg
->
addUUID
Fast
(
_PREHASH_
GroupID
,
group_id
);
msg
->
addBOOL
Fast
(
_PREHASH_
AcceptNotices
,
accept_notices
);
msg
->
nextBlock
Fast
(
_PREHASH_
NewData
);
msg
->
addBOOL
Fast
(
_PREHASH_
ListInProfile
,
list_in_profile
);
sendReliableMessage
();
return
TRUE
;
}
...
...
@@ -3780,8 +3780,8 @@ void LLAgent::processAgentDataUpdate(LLMessageSystem *msg, void **)
if
(
active_id
.
notNull
())
{
gAgent
.
mGroupID
=
active_id
;
msg
->
getU64
(
_PREHASH_AgentData
,
"
GroupPowers
"
,
gAgent
.
mGroupPowers
);
msg
->
getString
(
_PREHASH_AgentData
,
_PREHASH_GroupName
,
gAgent
.
mGroupName
);
msg
->
getU64
Fast
(
_PREHASH_AgentData
,
_PREHASH_
GroupPowers
,
gAgent
.
mGroupPowers
);
msg
->
getString
Fast
(
_PREHASH_AgentData
,
_PREHASH_GroupName
,
gAgent
.
mGroupName
);
}
else
{
...
...
@@ -4320,19 +4320,19 @@ void LLAgent::teleportRequest(const U64& region_handle, const LLVector3& pos_loc
LL_INFOS
(
"Teleport"
)
<<
"Sending TeleportLocationRequest: '"
<<
region_handle
<<
"':"
<<
pos_local
<<
LL_ENDL
;
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
TeleportLocationRequest
"
);
msg
->
newMessage
Fast
(
_PREHASH_
TeleportLocationRequest
);
msg
->
nextBlockFast
(
_PREHASH_AgentData
);
msg
->
addUUIDFast
(
_PREHASH_AgentID
,
getID
());
msg
->
addUUIDFast
(
_PREHASH_SessionID
,
getSessionID
());
msg
->
nextBlockFast
(
_PREHASH_Info
);
msg
->
addU64
(
"
RegionHandle
"
,
region_handle
);
msg
->
addVector3
(
"
Position
"
,
pos_local
);
msg
->
addU64
Fast
(
_PREHASH_
RegionHandle
,
region_handle
);
msg
->
addVector3
Fast
(
_PREHASH_
Position
,
pos_local
);
// LLVector3 look_at(0,1,0);
// if (look_at_from_camera)
// {
// look_at = LLViewerCamera::getInstance()->getAtAxis();
// }
msg
->
addVector3
(
"
LookAt
"
,
look_at
);
msg
->
addVector3
Fast
(
_PREHASH_
LookAt
,
look_at
);
sendReliableMessage
();
}
}
...
...
@@ -4411,7 +4411,7 @@ void LLAgent::doTeleportViaLure(const LLUUID& lure_id, BOOL godlike)
msg
->
addUUIDFast
(
_PREHASH_SessionID
,
getSessionID
());
msg
->
addUUIDFast
(
_PREHASH_LureID
,
lure_id
);
// teleport_flags is a legacy field, now derived sim-side:
msg
->
addU32
(
"
TeleportFlags
"
,
teleport_flags
);
msg
->
addU32
Fast
(
_PREHASH_
TeleportFlags
,
teleport_flags
);
sendReliableMessage
();
}
}
...
...
@@ -4429,7 +4429,7 @@ void LLAgent::teleportCancel()
// send the message
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
TeleportCancel
"
);
msg
->
newMessage
Fast
(
_PREHASH_
TeleportCancel
);
msg
->
nextBlockFast
(
_PREHASH_Info
);
msg
->
addUUIDFast
(
_PREHASH_AgentID
,
getID
());
msg
->
addUUIDFast
(
_PREHASH_SessionID
,
getSessionID
());
...
...
@@ -4929,7 +4929,7 @@ void LLAgent::sendAgentUpdateUserInfoMessage(bool im_via_email, const std::strin
gMessageSystem
->
addUUIDFast
(
_PREHASH_SessionID
,
getSessionID
());
gMessageSystem
->
nextBlockFast
(
_PREHASH_UserData
);
gMessageSystem
->
addBOOLFast
(
_PREHASH_IMViaEMail
,
im_via_email
);
gMessageSystem
->
addString
(
"
DirectoryVisibility
"
,
directory_visibility
);
gMessageSystem
->
addString
Fast
(
_PREHASH_
DirectoryVisibility
,
directory_visibility
);
gAgent
.
sendReliableMessage
();
}
...
...
indra/newview/llagentwearables.cpp
View file @
e2f3fb1c
...
...
@@ -1457,7 +1457,7 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo
return
;
LL_DEBUGS
(
"Avatar"
)
<<
"ATT [ObjectDetach] removing "
<<
objects_to_remove
.
size
()
<<
" objects"
<<
LL_ENDL
;
gMessageSystem
->
newMessage
(
"
ObjectDetach
"
);
gMessageSystem
->
newMessage
Fast
(
_PREHASH_
ObjectDetach
);
gMessageSystem
->
nextBlockFast
(
_PREHASH_AgentData
);
gMessageSystem
->
addUUIDFast
(
_PREHASH_AgentID
,
gAgent
.
getID
());
gMessageSystem
->
addUUIDFast
(
_PREHASH_SessionID
,
gAgent
.
getSessionID
());
...
...
indra/newview/llcallingcard.cpp
View file @
e2f3fb1c
...
...
@@ -296,12 +296,12 @@ void LLAvatarTracker::terminateBuddy(const LLUUID& id)
if
(
!
buddy
)
return
;
mBuddyInfo
.
erase
(
id
);
LLMessageSystem
*
msg
=
gMessageSystem
;
msg
->
newMessage
(
"
TerminateFriendship
"
);
msg
->
nextBlock
(
"
AgentData
"
);
msg
->
addUUID
(
"
AgentID
"
,
gAgent
.
getID
());
msg
->
addUUID
(
"
SessionID
"
,
gAgent
.
getSessionID
());
msg
->
nextBlock
(
"
ExBlock
"
);
msg
->
addUUID
(
"
OtherID
"
,
id
);
msg
->
newMessage
Fast
(
_PREHASH_
TerminateFriendship
);
msg
->
nextBlock
Fast
(
_PREHASH_
AgentData
);
msg
->
addUUID
Fast
(
_PREHASH_
AgentID
,
gAgent
.
getID
());
msg
->
addUUID
Fast
(
_PREHASH_
SessionID
,
gAgent
.
getSessionID
());
msg
->
nextBlock
Fast
(
_PREHASH_
ExBlock
);
msg
->
addUUID
Fast
(
_PREHASH_
OtherID
,
id
);
gAgent
.
sendReliableMessage
();
addChangedMask
(
LLFriendObserver
::
REMOVE
,
id
);
...
...
@@ -781,7 +781,7 @@ void LLAvatarTracker::formFriendship(const LLUUID& id)
void
LLAvatarTracker
::
processTerminateFriendship
(
LLMessageSystem
*
msg
,
void
**
)
{