Commit 34380651 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Start to clean up UDP message function usage to reduce LLSingleton mutex locks

parent e7c975b2
......@@ -540,7 +540,7 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
S8 type;
msg->getS8Fast(block, _PREHASH_Type, type, block_num);
mType = static_cast<LLAssetType::EType>(type);
msg->getS8(block, "InvType", type, block_num);
msg->getS8Fast(block, _PREHASH_InvType, type, block_num);
mInventoryType = static_cast<LLInventoryType::EType>(type);
mPermissions.initMasks(mInventoryType);
......@@ -555,12 +555,12 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
S32 date;
msg->getS32(block, "CreationDate", date, block_num);
msg->getS32Fast(block, _PREHASH_CreationDate, date, block_num);
mCreationDate = date;
U32 local_crc = getCRC32();
U32 remote_crc = 0;
msg->getU32(block, "CRC", remote_crc, block_num);
msg->getU32Fast(block, _PREHASH_CRC, remote_crc, block_num);
//#define CRC_CHECK
#ifdef CRC_CHECK
if(local_crc == remote_crc)
......
......@@ -485,7 +485,7 @@ void LLParcel::packMessage(LLMessageSystem* msg)
msg->addStringFast( _PREHASH_Desc, getDesc() );
msg->addStringFast( _PREHASH_MusicURL, getMusicURL() );
msg->addStringFast( _PREHASH_MediaURL, getMediaURL() );
msg->addU8 ( "MediaAutoScale", getMediaAutoScale () );
msg->addU8Fast ( _PREHASH_MediaAutoScale, getMediaAutoScale () );
msg->addUUIDFast( _PREHASH_MediaID, getMediaID() );
msg->addUUIDFast( _PREHASH_GroupID, getGroupID() );
msg->addS32Fast( _PREHASH_PassPrice, mPassPrice );
......@@ -571,7 +571,7 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
setHaveNewParcelLimitData(have_new_parcel_limit_data);
// non-optimized version
msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale );
msg->getU8Fast (_PREHASH_ParcelData, _PREHASH_MediaAutoScale, mMediaAutoScale );
msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_MediaID, mMediaID );
msg->getUUIDFast( _PREHASH_ParcelData,_PREHASH_GroupID, mGroupID );
......
......@@ -330,7 +330,7 @@ BOOL LLPartSysData::isNullPS(const S32 block_num)
S32 size;
// Check size of block
size = gMessageSystem->getSize("ObjectData", block_num, "PSBlock");
size = gMessageSystem->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_PSBlock);
if (!size)
{
......@@ -343,7 +343,7 @@ BOOL LLPartSysData::isNullPS(const S32 block_num)
return TRUE;
}
gMessageSystem->getBinaryData("ObjectData", "PSBlock", ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE);
gMessageSystem->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_PSBlock, ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE);
LLDataPackerBinaryBuffer dp(ps_data_block, size);
if (size > PS_LEGACY_DATA_BLOCK_SIZE)
......@@ -372,7 +372,7 @@ BOOL LLPartSysData::unpackBlock(const S32 block_num)
U8 ps_data_block[PS_MAX_DATA_BLOCK_SIZE];
// Check size of block
S32 size = gMessageSystem->getSize("ObjectData", block_num, "PSBlock");
S32 size = gMessageSystem->getSizeFast(_PREHASH_ObjectData, block_num, _PREHASH_PSBlock);
if (size > PS_MAX_DATA_BLOCK_SIZE)
{
......@@ -381,7 +381,7 @@ BOOL LLPartSysData::unpackBlock(const S32 block_num)
}
// Get from message
gMessageSystem->getBinaryData("ObjectData", "PSBlock", ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE);
gMessageSystem->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_PSBlock, ps_data_block, size, block_num, PS_MAX_DATA_BLOCK_SIZE);
LLDataPackerBinaryBuffer dp(ps_data_block, size);
......
......@@ -759,7 +759,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
S16 type_s16;
BOOL b_use_big_packets;
mesgsys->getBOOL("XferID", "UseBigPackets", b_use_big_packets);
mesgsys->getBOOLFast(_PREHASH_XferID, _PREHASH_UseBigPackets, b_use_big_packets);
mesgsys->getU64Fast(_PREHASH_XferID, _PREHASH_ID, id);
char U64_BUF[MAX_STRING]; /* Flawfinder : ignore */
......@@ -770,7 +770,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
{
U8 local_path_u8;
mesgsys->getU8("XferID", "FilePath", local_path_u8);
mesgsys->getU8Fast(_PREHASH_XferID, _PREHASH_FilePath, local_path_u8);
local_path = (ELLPath)local_path_u8;
}
......@@ -854,7 +854,7 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
LL_INFOS("Xfer") << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << LL_ENDL;
BOOL delete_local_on_completion = FALSE;
mesgsys->getBOOL("XferID", "DeleteOnCompletion", delete_local_on_completion);
mesgsys->getBOOLFast(_PREHASH_XferID, _PREHASH_DeleteOnCompletion, delete_local_on_completion);
// -1 chunk_size causes it to use the default
xferp = (LLXfer *)new LLXfer_File(expanded_filename, delete_local_on_completion, b_use_big_packets ? LL_XFER_LARGE_PAYLOAD : -1);
......
......@@ -3672,9 +3672,9 @@ void LLAgent::processAgentGroupDataUpdate(LLMessageSystem *msg, void **)
{
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group.mID, i);
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupInsigniaID, group.mInsigniaID, i);
msg->getU64(_PREHASH_GroupData, "GroupPowers", group.mPowers, i);
msg->getBOOL(_PREHASH_GroupData, "AcceptNotices", group.mAcceptNotices, i);
msg->getS32(_PREHASH_GroupData, "Contribution", group.mContribution, i);
msg->getU64Fast(_PREHASH_GroupData, _PREHASH_GroupPowers, group.mPowers, i);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_AcceptNotices, group.mAcceptNotices, i);
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_Contribution, group.mContribution, i);
msg->getStringFast(_PREHASH_GroupData, _PREHASH_GroupName, group.mName, i);
if(group.mID.notNull())
......@@ -3796,19 +3796,19 @@ void LLAgent::processAgentDataUpdate(LLMessageSystem *msg, void **)
// static
void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **)
{
S32 block_count = msg->getNumberOfBlocks("Data");
S32 block_count = msg->getNumberOfBlocksFast(_PREHASH_Data);
for (S32 block_index = 0; block_index < block_count; block_index++)
{
BOOL take_controls;
U32 controls;
BOOL passon;
U32 i;
msg->getBOOL("Data", "TakeControls", take_controls, block_index);
msg->getBOOLFast(_PREHASH_Data, _PREHASH_TakeControls, take_controls, block_index);
if (take_controls)
{
// take controls
msg->getU32("Data", "Controls", controls, block_index );
msg->getBOOL("Data", "PassToAgent", passon, block_index );
msg->getU32Fast(_PREHASH_Data, _PREHASH_Controls, controls, block_index );
msg->getBOOLFast(_PREHASH_Data, _PREHASH_PassToAgent, passon, block_index );
U32 total_count = 0;
for (i = 0; i < TOTAL_CONTROLS; i++)
{
......@@ -3829,8 +3829,8 @@ void LLAgent::processScriptControlChange(LLMessageSystem *msg, void **)
else
{
// release controls
msg->getU32("Data", "Controls", controls, block_index );
msg->getBOOL("Data", "PassToAgent", passon, block_index );
msg->getU32Fast(_PREHASH_Data, _PREHASH_Controls, controls, block_index );
msg->getBOOLFast(_PREHASH_Data, _PREHASH_PassToAgent, passon, block_index );
for (i = 0; i < TOTAL_CONTROLS; i++)
{
if (controls & ( 1 << i))
......@@ -3944,10 +3944,10 @@ BOOL LLAgent::isControlGrabbed(S32 control_index) const
void LLAgent::forceReleaseControls()
{
gMessageSystem->newMessage("ForceScriptControlRelease");
gMessageSystem->nextBlock("AgentData");
gMessageSystem->addUUID("AgentID", getID());
gMessageSystem->addUUID("SessionID", getSessionID());
gMessageSystem->newMessageFast(_PREHASH_ForceScriptControlRelease);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID());
sendReliableMessage();
}
......
......@@ -618,8 +618,8 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
std::string first_name;
std::string last_name;
msg->getUUID("AgentData", "AgentID", agent_id);
msg->getUUID("AgentData", "QueryID", query_id);
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_QueryID, query_id);
// Not for us
if (agent_id != gAgent.getID()) return;
......@@ -641,7 +641,7 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
}
BOOL found_one = FALSE;
S32 num_new_rows = msg->getNumberOfBlocks("Data");
S32 num_new_rows = msg->getNumberOfBlocksFast(_PREHASH_Data);
for (S32 i = 0; i < num_new_rows; i++)
{
msg->getUUIDFast( _PREHASH_Data,_PREHASH_AvatarID, avatar_id, i);
......
......@@ -236,7 +236,7 @@ void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_BillableFactor, billable_factor);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
if (msg->has(_PREHASH_RegionInfo3))
if (msg->hasFast(_PREHASH_RegionInfo3))
{
msg->getU64Fast(_PREHASH_RegionInfo3, _PREHASH_RegionFlagsExtended, region_flags);
}
......@@ -328,10 +328,10 @@ void LLFloaterGodTools::sendRegionInfoRequest()
mUpdateTimer.reset();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("RequestRegionInfo");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->newMessageFast(_PREHASH_RequestRegionInfo);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gAgent.sendReliableMessage();
}
......@@ -351,7 +351,7 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo()
LLPanelRegionTools *rtool = god_tools->mPanelRegionTools;
U64 region_flags = computeRegionFlags();
msg->newMessage("GodUpdateRegionInfo");
msg->newMessageFast(_PREHASH_GodUpdateRegionInfo);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
......
......@@ -1436,8 +1436,8 @@ void send_return_objects_message(S32 parcel_local_id, S32 return_type,
msg->addU32Fast(_PREHASH_ReturnType, (U32) return_type);
// Dummy task id, not used
msg->nextBlock("TaskIDs");
msg->addUUID("TaskID", LLUUID::null);
msg->nextBlockFast(_PREHASH_TaskIDs);
msg->addUUIDFast(_PREHASH_TaskID, LLUUID::null);
// Throw all return ids into the packet.
// TODO: Check for too many ids.
......@@ -3109,7 +3109,7 @@ void LLPanelLandCovenant::refresh()
// Note: LLPanelLandCovenant doesn't change Covenant's content and any
// changes made by Estate floater should be requested by Estate floater
LLMessageSystem *msg = gMessageSystem;
msg->newMessage("EstateCovenantRequest");
msg->newMessageFast(_PREHASH_EstateCovenantRequest);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
......
......@@ -439,34 +439,34 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
F32 terrain_lower_limit;
BOOL use_estate_sun;
F32 sun_hour;
msg->getString("RegionInfo", "SimName", sim_name);
msg->getU8("RegionInfo", "MaxAgents", agent_limit);
msg->getS32("RegionInfo2", "HardMaxAgents", hard_agent_limit);
msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor);
msg->getU8("RegionInfo", "SimAccess", sim_access);
msg->getStringFast(_PREHASH_RegionInfo, _PREHASH_SimName, sim_name);
msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_MaxAgents, agent_limit);
msg->getS32Fast(_PREHASH_RegionInfo2, _PREHASH_HardMaxAgents, hard_agent_limit);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_ObjectBonusFactor, object_bonus_factor);
msg->getU8Fast(_PREHASH_RegionInfo, _PREHASH_SimAccess, sim_access);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainRaiseLimit, terrain_raise_limit);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_TerrainLowerLimit, terrain_lower_limit);
msg->getBOOL("RegionInfo", "UseEstateSun", use_estate_sun);
msg->getBOOLFast(_PREHASH_RegionInfo, _PREHASH_UseEstateSun, use_estate_sun);
// actually the "last set" sun hour, not the current sun hour. JC
msg->getF32("RegionInfo", "SunHour", sun_hour);
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_SunHour, sun_hour);
// the only reasonable way to decide if we actually have any data is to
// check to see if any of these fields have nonzero sizes
if (msg->getSize("RegionInfo2", "ProductSKU") > 0 ||
msg->getSize("RegionInfo2", "ProductName") > 0)
if (msg->getSizeFast(_PREHASH_RegionInfo2, _PREHASH_ProductSKU) > 0 ||
msg->getSizeFast(_PREHASH_RegionInfo2, _PREHASH_ProductName) > 0)
{
msg->getString("RegionInfo2", "ProductName", sim_type);
msg->getStringFast(_PREHASH_RegionInfo2, _PREHASH_ProductName, sim_type);
LLTrans::findString(sim_type, sim_type); // try localizing sim product name
}
if (msg->has(_PREHASH_RegionInfo3))
if (msg->hasFast(_PREHASH_RegionInfo3))
{
msg->getU64("RegionInfo3", "RegionFlagsExtended", region_flags);
msg->getU64Fast(_PREHASH_RegionInfo3, _PREHASH_RegionFlagsExtended, region_flags);
}
else
{
U32 flags = 0;
msg->getU32("RegionInfo", "RegionFlags", flags);
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_RegionFlags, flags);
region_flags = flags;
}
......@@ -499,7 +499,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
// detect teen grid for maturity
U32 parent_estate_id;
msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id);
msg->getU32Fast(_PREHASH_RegionInfo, _PREHASH_ParentEstateID, parent_estate_id);
BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that
panel->getChildView("access_combo")->setEnabled(gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid));
panel->setCtrlsEnabled(allow_modify);
......
......@@ -233,15 +233,15 @@ void LLFloaterTelehub::processTelehubInfo(LLMessageSystem* msg, void**)
void LLFloaterTelehub::unpackTelehubInfo(LLMessageSystem* msg)
{
msg->getUUID("TelehubBlock", "ObjectID", mTelehubObjectID);
msg->getString("TelehubBlock", "ObjectName", mTelehubObjectName);
msg->getVector3("TelehubBlock", "TelehubPos", mTelehubPos);
msg->getQuat("TelehubBlock", "TelehubRot", mTelehubRot);
msg->getUUIDFast(_PREHASH_TelehubBlock, _PREHASH_ObjectID, mTelehubObjectID);
msg->getStringFast(_PREHASH_TelehubBlock, _PREHASH_ObjectName, mTelehubObjectName);
msg->getVector3Fast(_PREHASH_TelehubBlock, _PREHASH_TelehubPos, mTelehubPos);
msg->getQuatFast(_PREHASH_TelehubBlock, _PREHASH_TelehubRot, mTelehubRot);
mNumSpawn = msg->getNumberOfBlocks("SpawnPointBlock");
mNumSpawn = msg->getNumberOfBlocksFast(_PREHASH_SpawnPointBlock);
for (S32 i = 0; i < mNumSpawn; i++)
{
msg->getVector3("SpawnPointBlock", "SpawnPointPos", mSpawnPointPos[i], i);
msg->getVector3Fast(_PREHASH_SpawnPointBlock, _PREHASH_SpawnPointPos, mSpawnPointPos[i], i);
}
// Update parts of the UI that change only when message received.
......
......@@ -159,7 +159,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_TotalObjectCount, total_count);
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode);
S32 block_count = msg->getNumberOfBlocks("ReportData");
S32 block_count = msg->getNumberOfBlocksFast(_PREHASH_ReportData);
for (S32 block = 0; block < block_count; ++block)
{
U32 task_local_id;
......
......@@ -607,21 +607,21 @@ bool packRoleUpdateMessageBlock(LLMessageSystem* msg,
{
if (start_message)
{
msg->newMessage("GroupRoleUpdate");
msg->nextBlock("AgentData");
msg->addUUID("AgentID",gAgent.getID());
msg->addUUID("SessionID",gAgent.getSessionID());
msg->addUUID("GroupID",group_id);
msg->newMessageFast(_PREHASH_GroupRoleUpdate);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID,gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_GroupID,group_id);
start_message = false;
}
msg->nextBlock("RoleData");
msg->addUUID("RoleID",role_id);
msg->addString("Name", role_data.mRoleName);
msg->addString("Description", role_data.mRoleDescription);
msg->addString("Title", role_data.mRoleTitle);
msg->addU64("Powers", role_data.mRolePowers);
msg->addU8("UpdateType", (U8)role_data.mChangeType);
msg->nextBlockFast(_PREHASH_RoleData);
msg->addUUIDFast(_PREHASH_RoleID,role_id);
msg->addStringFast(_PREHASH_Name, role_data.mRoleName);
msg->addStringFast(_PREHASH_Description, role_data.mRoleDescription);
msg->addStringFast(_PREHASH_Title, role_data.mRoleTitle);
msg->addU64Fast(_PREHASH_Powers, role_data.mRolePowers);
msg->addU8Fast(_PREHASH_UpdateType, (U8)role_data.mChangeType);
if (msg->isSendFullFast())
{
......@@ -954,7 +954,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
return;
}
msg->getS32(_PREHASH_GroupData, "MemberCount", group_datap->mMemberCount );
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_MemberCount, group_datap->mMemberCount );
if (group_datap->mMemberCount > 0)
{
......@@ -970,11 +970,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
LLUUID member_id;
msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_AgentID, member_id, i );
msg->getS32(_PREHASH_MemberData, _PREHASH_Contribution, contribution, i);
msg->getU64(_PREHASH_MemberData, "AgentPowers", agent_powers, i);
msg->getS32Fast(_PREHASH_MemberData, _PREHASH_Contribution, contribution, i);
msg->getU64Fast(_PREHASH_MemberData, _PREHASH_AgentPowers, agent_powers, i);
msg->getStringFast(_PREHASH_MemberData, _PREHASH_OnlineStatus, online_status, i);
msg->getString(_PREHASH_MemberData, "Title", title, i);
msg->getBOOL(_PREHASH_MemberData,"IsOwner",is_owner,i);
msg->getStringFast(_PREHASH_MemberData, _PREHASH_Title, title, i);
msg->getBOOLFast(_PREHASH_MemberData, _PREHASH_IsOwner, is_owner,i);
if (member_id.notNull())
{
......@@ -1084,11 +1084,11 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data)
msg->getU32Fast(_PREHASH_GroupData, _PREHASH_MembershipFee, membership_fee );
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_OpenEnrollment, open_enrollment );
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_GroupMembershipCount, num_group_members);
msg->getS32(_PREHASH_GroupData, "GroupRolesCount", num_group_roles);
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_GroupRolesCount, num_group_roles);
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_Money, money);
msg->getBOOL("GroupData", "AllowPublish", allow_publish);
msg->getBOOL("GroupData", "MaturePublish", mature);
msg->getUUID(_PREHASH_GroupData, "OwnerRole", owner_role);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_AllowPublish, allow_publish);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_MaturePublish, mature);
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_OwnerRole, owner_role);
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->createGroupData(group_id);
......@@ -1149,7 +1149,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
return;
}
msg->getS32(_PREHASH_GroupData, "RoleCount", group_datap->mRoleCount );
msg->getS32Fast(_PREHASH_GroupData, _PREHASH_RoleCount, group_datap->mRoleCount );
std::string name;
std::string title;
......@@ -1158,17 +1158,17 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data)
U32 member_count = 0;
LLUUID role_id;
U32 num_blocks = msg->getNumberOfBlocks("RoleData");
U32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_RoleData);
U32 i = 0;
for (i=0; i< num_blocks; ++i)
{
msg->getUUID("RoleData", "RoleID", role_id, i );
msg->getUUIDFast(_PREHASH_RoleData, _PREHASH_RoleID, role_id, i );
msg->getString("RoleData","Name",name,i);
msg->getString("RoleData","Title",title,i);
msg->getString("RoleData","Description",desc,i);
msg->getU64("RoleData","Powers",powers,i);
msg->getU32("RoleData","Members",member_count,i);
msg->getStringFast(_PREHASH_RoleData, _PREHASH_Name, name,i);
msg->getStringFast(_PREHASH_RoleData, _PREHASH_Title, title,i);
msg->getStringFast(_PREHASH_RoleData,_PREHASH_Description, desc,i);
msg->getU64Fast(_PREHASH_RoleData, _PREHASH_Powers, powers,i);
msg->getU32Fast(_PREHASH_RoleData, _PREHASH_Members, member_count,i);
//there are 3 predifined roles - Owners, Officers, Everyone
//there names are defined in lldatagroups.cpp
......@@ -1231,7 +1231,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_GroupID, group_id );
U32 total_pairs;
msg->getU32(_PREHASH_AgentData, "TotalPairs", total_pairs);
msg->getU32Fast(_PREHASH_AgentData, _PREHASH_TotalPairs, total_pairs);
LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id);
if (!group_datap || (group_datap->mRoleMembersRequestID != request_id))
......@@ -1240,7 +1240,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
return;
}
U32 num_blocks = msg->getNumberOfBlocks("MemberData");
U32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_MemberData);
U32 i;
LLUUID member_id;
LLUUID role_id;
......@@ -1255,8 +1255,8 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data)
{
for (i = 0;i < num_blocks; ++i)
{
msg->getUUID("MemberData","RoleID",role_id,i);
msg->getUUID("MemberData","MemberID",member_id,i);
msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_RoleID, role_id, i);
msg->getUUIDFast(_PREHASH_MemberData, _PREHASH_MemberID, member_id, i);
if (role_id.notNull() && member_id.notNull() )
{
......@@ -1355,9 +1355,9 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data)
S32 blocks = msg->getNumberOfBlocksFast(_PREHASH_GroupData);
for (i=0; i<blocks; ++i)
{
msg->getString("GroupData","Title",title.mTitle,i);
msg->getUUID("GroupData","RoleID",title.mRoleID,i);
msg->getBOOL("GroupData","Selected",title.mSelected,i);
msg->getStringFast(_PREHASH_GroupData, _PREHASH_Title, title.mTitle,i);
msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_RoleID, title.mRoleID,i);
msg->getBOOLFast(_PREHASH_GroupData, _PREHASH_Selected, title.mSelected,i);
if (!title.mTitle.empty())
{
......@@ -1818,17 +1818,17 @@ void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id)
{
if (start_message)
{
msg->newMessage("GroupRoleChanges");
msg->newMessageFast(_PREHASH_GroupRoleChanges);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID,gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID,gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_GroupID,group_id);
start_message = false;
}
msg->nextBlock("RoleChange");
msg->addUUID("RoleID",citer->second.mRole);
msg->addUUID("MemberID",citer->second.mMember);
msg->addU32("Change",(U32)citer->second.mChange);
msg->nextBlockFast(_PREHASH_RoleChange);
msg->addUUIDFast(_PREHASH_RoleID,citer->second.mRole);
msg->addUUIDFast(_PREHASH_MemberID,citer->second.mMember);
msg->addU32Fast(_PREHASH_Change,(U32)citer->second.mChange);
if (msg->isSendFullFast())
{
......
......@@ -410,7 +410,7 @@ void LLPanelGroupLandMoney::impl::contributionKeystrokeCallback(LLLineEditor* ca
//static
void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
{
S32 count = msg->getNumberOfBlocks("QueryData");
S32 count = msg->getNumberOfBlocksFast(_PREHASH_QueryData);
if(count > 0)
{
S32 first_block = 0;
......@@ -418,8 +418,8 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
LLUUID owner_id;
LLUUID trans_id;
msg->getUUID("QueryData", "OwnerID", owner_id, 0);
msg->getUUID("TransactionData", "TransactionID", trans_id);
msg->getUUIDFast(_PREHASH_QueryData, _PREHASH_OwnerID, owner_id, 0);
msg->getUUIDFast(_PREHASH_TransactionData, _PREHASH_TransactionID, trans_id);
if(owner_id.isNull())
{
......@@ -431,19 +431,19 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
if(count == 1)
{
msg->getS32("QueryData", "BillableArea", committed, 0);
msg->getS32Fast(_PREHASH_QueryData, _PREHASH_BillableArea, committed, 0);
}
else
{
for(S32 i = first_block; i < count; ++i)
{
msg->getS32("QueryData", "BillableArea", billable_area, i);
msg->getS32Fast(_PREHASH_QueryData, _PREHASH_BillableArea, billable_area, i);
committed+=billable_area;
}
}
S32 total_contribution;
msg->getS32("QueryData", "ActualArea", total_contribution, 0);
msg->getS32Fast(_PREHASH_QueryData, _PREHASH_ActualArea, total_contribution, 0);
mPanel.getChild<LLUICtrl>("total_contributed_land_value")->setTextArg("[AREA]", llformat("%d", total_contribution));
mPanel.getChild<LLUICtrl>("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed));
......
......@@ -521,7 +521,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
U8 asset_type;
S32 i=0;
S32 count = msg->getNumberOfBlocks("Data");
S32 count = msg->getNumberOfBlocksFast(_PREHASH_Data);
mNoticesList->setEnabled(TRUE);
......@@ -532,7 +532,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
for (;i<count;++i)
{
msg->getUUID("Data","NoticeID",id,i);
msg->getUUIDFast(_PREHASH_Data, _PREHASH_NoticeID, id, i);
if (1 == count && id.isNull())
{
// Only one entry, the dummy entry.
......@@ -548,11 +548,11 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
if(pos!=-1)//if items with this ID already in the list - skip it
continue;
msg->getString("Data","Subject",subj,i);
msg->getString("Data","FromName",name,i);