From 4dd471d055bea672f5eb21cfcc4d07e6b3ba3f9b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 6 Apr 2011 14:38:55 -0700 Subject: WEB-3750 FIX - Gone profile * Added agent validation around calls to update avatar data * Removed references to profile panel save options Reviewed by Richard --- indra/newview/llavatarpropertiesprocessor.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.cpp') 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(); } -- cgit v1.2.3