From a7db93cb698d81ea5005ed4be453fbddd65e0cc0 Mon Sep 17 00:00:00 2001
From: andreykproductengine <akleshchev@productengine.com>
Date: Thu, 19 Jun 2014 21:23:14 +0300
Subject: [PATCH] MAINT-4182 FIXED The group ban list always appears empty

---
 indra/newview/llgroupmgr.cpp | 33 +++++++++++++--------------------
 1 file changed, 13 insertions(+), 20 deletions(-)

diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 61c3bbb13ac..50e3ab6dd84 100755
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -1868,8 +1868,8 @@ class GroupBanDataResponder : public LLHTTPClient::Responder
 public:
 	GroupBanDataResponder(const LLUUID& gropup_id, BOOL force_refresh=false);
 	virtual ~GroupBanDataResponder() {}
-	virtual void result(const LLSD& pContent);
-	virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent);
+	virtual void httpSuccess();
+	virtual void httpFailure();
 private:
 	LLUUID mGroupID;
 	BOOL mForceRefresh;
@@ -1880,34 +1880,27 @@ GroupBanDataResponder::GroupBanDataResponder(const LLUUID& gropup_id, BOOL force
 	mForceRefresh(force_refresh)
 {}
 
-void GroupBanDataResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent)
+void GroupBanDataResponder::httpFailure()
 {
 	LL_WARNS("GrpMgr") << "Error receiving group member data [status:" 
-		<< pStatus << "]: " << pContent << LL_ENDL;
+		<< mStatus << "]: " << mContent << LL_ENDL;
 }
 
-void GroupBanDataResponder::result(const LLSD& content)
+void GroupBanDataResponder::httpSuccess()
 {
-	if ( content.size())
+	if ( mContent.size())
 	{
-		if (content.has("ban_list"))
+		if (mContent.has("ban_list"))
 		{
-			// group data received
-			LLGroupMgr::processGroupBanRequest(content);
-		}
-		// no group data received, this is either CREATE or DELETE operation
-		// complete confirmation. Local data may be obsolete.
-		else if (mForceRefresh)
-		{
-			// providing mGroupId and not extracting it from content since it is not
-			// included into CREATE and DELETE responses 
-			LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID);
+			// group ban data received
+			LLGroupMgr::processGroupBanRequest(mContent);
+			mForceRefresh = false;
 		}
 	}
-	else
+	if (mForceRefresh)
 	{
-		LL_WARNS("GrpMgr") << "No group member data received." << LL_ENDL;
-		return;
+		// no ban data received, refreshing data after successful operation 
+		LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID);
 	}
 }
 
-- 
GitLab