diff options
| author | andreykproductengine <akleshchev@productengine.com> | 2014-04-23 19:47:19 +0300 | 
|---|---|---|
| committer | andreykproductengine <akleshchev@productengine.com> | 2014-04-23 19:47:19 +0300 | 
| commit | b1cffda8f3ac9ce95525ae926272c0ecbbc5b24e (patch) | |
| tree | 4a347b363ef6116fe55ce21be818f5f4d4b20305 | |
| parent | 331663458fbf0a434701b1bb1dd15901eb1c20fe (diff) | |
MAINT-2361 FIXED One and the same user shown in Allowed and in Banned Residents lists
| -rwxr-xr-x | indra/llinventory/llparcel.cpp | 4 | ||||
| -rwxr-xr-x | indra/newview/llfloaterland.cpp | 24 | 
2 files changed, 18 insertions, 10 deletions
| diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 5eb5fb442d..d6bfec5bec 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -793,8 +793,6 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)  		}  	} -    removeFromBanList(agent_id); -          LLAccessEntry new_entry;      new_entry.mID			 = agent_id;      new_entry.mTime	 = time; @@ -838,8 +836,6 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)          }      } -    removeFromAccessList(agent_id); -          LLAccessEntry new_entry;      new_entry.mID			 = agent_id;      new_entry.mTime	 = time; diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index d79eee6be3..6b549b06de 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2776,10 +2776,16 @@ void LLPanelLandAccess::callbackAvatarCBAccess(const uuid_vec_t& ids)  	{  		LLUUID id = ids[0];  		LLParcel* parcel = mParcel->getParcel(); -		if (parcel) +		if (parcel && parcel->addToAccessList(id, 0))  		{ -			parcel->addToAccessList(id, 0); -			LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_ACCESS); +			U32 lists_to_update = AL_ACCESS; +			// agent was successfully added to access list +			// but we also need to check ban list to ensure that agent will not be in two lists simultaneously +			if(parcel->removeFromBanList(id)) +			{ +				lists_to_update |= AL_BAN; +			} +			LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);  			refresh();  		}  	} @@ -2828,10 +2834,16 @@ void LLPanelLandAccess::callbackAvatarCBBanned(const uuid_vec_t& ids)  	{  		LLUUID id = ids[0];  		LLParcel* parcel = mParcel->getParcel(); -		if (parcel) +		if (parcel && parcel->addToBanList(id, 0))  		{ -			parcel->addToBanList(id, 0); -			LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(AL_BAN); +			U32 lists_to_update = AL_BAN; +			// agent was successfully added to ban list +			// but we also need to check access list to ensure that agent will not be in two lists simultaneously +			if (parcel->removeFromAccessList(id)) +			{ +				lists_to_update |= AL_ACCESS; +			} +			LLViewerParcelMgr::getInstance()->sendParcelAccessListUpdate(lists_to_update);  			refresh();  		}  	} | 
