diff options
author | Oz Linden <oz@lindenlab.com> | 2011-04-13 12:03:53 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-04-13 12:03:53 -0400 |
commit | 6bdfc3d0482b3bbfb55abdb71220ea19391fbe14 (patch) | |
tree | e0557f36fe0f02e0fdeb2952d2477c01a7498a63 /indra/newview/llavatarpropertiesprocessor.cpp | |
parent | 19f356202a9516664c1cacb9b50e9b6e1e072375 (diff) | |
parent | c77fcfb7a8aeb2f271b050171bf0d6a9bd4c955b (diff) |
merge out changes up to but not including the STORM-610 change
Diffstat (limited to 'indra/newview/llavatarpropertiesprocessor.cpp')
-rw-r--r-- | indra/newview/llavatarpropertiesprocessor.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 99aeb4cbad..b1cd83a1fb 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -160,6 +160,12 @@ void LLAvatarPropertiesProcessor::sendAvatarClassifiedsRequest(const LLUUID& ava void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props) { + if (!gAgent.isInitialized() || (gAgent.getID() == LLUUID::null)) + { + llwarns << "Sending avatarinfo update DENIED - invalid agent" << llendl; + return; + } + llinfos << "Sending avatarinfo update" << llendl; // This value is required by sendAvatarPropertiesUpdate method. @@ -168,20 +174,21 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesUpdate(const LLAvatarData* LLMessageSystem *msg = gMessageSystem; - msg->newMessageFast(_PREHASH_AvatarPropertiesUpdate); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast( _PREHASH_AgentID, gAgent.getID() ); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID() ); - msg->nextBlockFast(_PREHASH_PropertiesData); + msg->newMessageFast (_PREHASH_AvatarPropertiesUpdate); + msg->nextBlockFast (_PREHASH_AgentData); + msg->addUUIDFast (_PREHASH_AgentID, gAgent.getID() ); + msg->addUUIDFast (_PREHASH_SessionID, gAgent.getSessionID() ); + msg->nextBlockFast (_PREHASH_PropertiesData); - msg->addUUIDFast( _PREHASH_ImageID, avatar_props->image_id); - msg->addUUIDFast( _PREHASH_FLImageID, avatar_props->fl_image_id); - msg->addStringFast( _PREHASH_AboutText, avatar_props->about_text); - msg->addStringFast( _PREHASH_FLAboutText, avatar_props->fl_about_text); + msg->addUUIDFast (_PREHASH_ImageID, avatar_props->image_id); + msg->addUUIDFast (_PREHASH_FLImageID, avatar_props->fl_image_id); + msg->addStringFast (_PREHASH_AboutText, avatar_props->about_text); + msg->addStringFast (_PREHASH_FLAboutText, avatar_props->fl_about_text); msg->addBOOL(_PREHASH_AllowPublish, avatar_props->allow_publish); msg->addBOOL(_PREHASH_MaturePublish, mature); msg->addString(_PREHASH_ProfileURL, avatar_props->profile_url); + gAgent.sendReliableMessage(); } |