aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llgroupmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llgroupmgr.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/linden/indra/newview/llgroupmgr.cpp b/linden/indra/newview/llgroupmgr.cpp
index 8e49749..d1116b6 100644
--- a/linden/indra/newview/llgroupmgr.cpp
+++ b/linden/indra/newview/llgroupmgr.cpp
@@ -2,6 +2,8 @@
2 * @file llgroupmgr.cpp 2 * @file llgroupmgr.cpp
3 * @brief LLGroupMgr class implementation 3 * @brief LLGroupMgr class implementation
4 * 4 *
5 * $LicenseInfo:firstyear=2004&license=viewergpl$
6 *
5 * Copyright (c) 2004-2007, Linden Research, Inc. 7 * Copyright (c) 2004-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29/** 32/**
@@ -215,6 +218,7 @@ LLGroupMgrGroupData::LLGroupMgrGroupData(const LLUUID& id) :
215 mOpenEnrollment(FALSE), 218 mOpenEnrollment(FALSE),
216 mMembershipFee(0), 219 mMembershipFee(0),
217 mAllowPublish(FALSE), 220 mAllowPublish(FALSE),
221 mListInProfile(FALSE),
218 mMaturePublish(FALSE), 222 mMaturePublish(FALSE),
219 mChanged(FALSE), 223 mChanged(FALSE),
220 mMemberCount(0), 224 mMemberCount(0),
@@ -776,7 +780,10 @@ void LLGroupMgr::removeObserver(LLGroupMgrObserver* observer)
776 mObservers.erase(it); 780 mObservers.erase(it);
777 break; 781 break;
778 } 782 }
779 ++it; 783 else
784 {
785 ++it;
786 }
780 } 787 }
781} 788}
782 789
@@ -1260,6 +1267,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
1260 // This isn't actually too bad because real data will come down in 2 or 3 miliseconds and replace this. 1267 // This isn't actually too bad because real data will come down in 2 or 3 miliseconds and replace this.
1261 LLGroupData gd; 1268 LLGroupData gd;
1262 gd.mAcceptNotices = TRUE; 1269 gd.mAcceptNotices = TRUE;
1270 gd.mListInProfile = TRUE;
1263 gd.mContribution = 0; 1271 gd.mContribution = 0;
1264 gd.mID = group_id; 1272 gd.mID = group_id;
1265 gd.mName = "new group"; 1273 gd.mName = "new group";
@@ -1272,7 +1280,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
1272 } 1280 }
1273 else 1281 else
1274 { 1282 {
1275 // XUI:translate 1283 // *TODO:translate
1276 LLString::format_map_t args; 1284 LLString::format_map_t args;
1277 args["[MESSAGE]"] = message; 1285 args["[MESSAGE]"] = message;
1278 gViewerWindow->alertXml("UnableToCreateGroup", args); 1286 gViewerWindow->alertXml("UnableToCreateGroup", args);
@@ -1282,6 +1290,7 @@ void LLGroupMgr::processCreateGroupReply(LLMessageSystem* msg, void ** data)
1282LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id) 1290LLGroupMgrGroupData* LLGroupMgr::createGroupData(const LLUUID& id)
1283{ 1291{
1284 LLGroupMgrGroupData* group_datap; 1292 LLGroupMgrGroupData* group_datap;
1293
1285 group_iter existing_group = gGroupMgr->mGroups.find(id); 1294 group_iter existing_group = gGroupMgr->mGroups.find(id);
1286 if (existing_group == gGroupMgr->mGroups.end()) 1295 if (existing_group == gGroupMgr->mGroups.end())
1287 { 1296 {
@@ -1315,7 +1324,6 @@ void LLGroupMgr::notifyObservers(LLGroupChange gc)
1315 1324
1316void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap) 1325void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
1317{ 1326{
1318 mGroups[group_datap->getID()] = group_datap;
1319 if (mGroups.size() > MAX_CACHED_GROUPS) 1327 if (mGroups.size() > MAX_CACHED_GROUPS)
1320 { 1328 {
1321 // get rid of groups that aren't observed 1329 // get rid of groups that aren't observed
@@ -1325,8 +1333,8 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
1325 if (oi == mObservers.end()) 1333 if (oi == mObservers.end())
1326 { 1334 {
1327 // not observed 1335 // not observed
1328 LLGroupMgrGroupData* group_datap = gi->second; 1336 LLGroupMgrGroupData* unobserved_groupp = gi->second;
1329 delete group_datap; 1337 delete unobserved_groupp;
1330 mGroups.erase(gi++); 1338 mGroups.erase(gi++);
1331 } 1339 }
1332 else 1340 else
@@ -1335,6 +1343,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap)
1335 } 1343 }
1336 } 1344 }
1337 } 1345 }
1346 mGroups[group_datap->getID()] = group_datap;
1338} 1347}
1339 1348
1340 1349
@@ -1848,3 +1857,4 @@ void LLGroupMgr::debugClearAllGroups(void*)
1848 LLGroupMgr::parseRoleActions("role_actions.xml"); 1857 LLGroupMgr::parseRoleActions("role_actions.xml");
1849} 1858}
1850 1859
1860