diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-02-05 16:47:38 -0800 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-02-05 16:47:38 -0800 |
commit | 91b2ff00ae874f938919373c0db3de0721c7bf25 (patch) | |
tree | e0c4c8e11cd4a158c1f7d53fea7434eee3781d97 /indra/newview/llgroupmgr.cpp | |
parent | 617a7a0ebdd47aeea578456f4ed0d91ab8582a0b (diff) | |
parent | 68ea862c96a96be631505e88ae870d6aab066eb9 (diff) |
Merge
Diffstat (limited to 'indra/newview/llgroupmgr.cpp')
-rw-r--r-- | indra/newview/llgroupmgr.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 8bd0e520c3..4c1019a882 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1708,12 +1708,18 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, bool start_message = true; LLMessageSystem* msg = gMessageSystem; + + LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap) return; for (std::vector<LLUUID>::iterator it = member_ids.begin(); it != member_ids.end(); ++it) { + LLUUID& ejected_member_id = (*it); + + llwarns << "LLGroupMgr::sendGroupMemberEjects -- ejecting member" << ejected_member_id << llendl; + // Can't use 'eject' to leave a group. if ((*it) == gAgent.getID()) continue; @@ -1734,7 +1740,7 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, } msg->nextBlock("EjectData"); - msg->addUUID("EjecteeID",(*it)); + msg->addUUID("EjecteeID",ejected_member_id); if (msg->isSendFull()) { @@ -1746,13 +1752,18 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, for (LLGroupMemberData::role_list_t::iterator rit = (*mit).second->roleBegin(); rit != (*mit).second->roleEnd(); ++rit) { - if ((*rit).first.notNull()) + if ((*rit).first.notNull() && (*rit).second!=0) { - (*rit).second->removeMember(*it); + (*rit).second->removeMember(ejected_member_id); + + llwarns << "LLGroupMgr::sendGroupMemberEjects - removing member from role " << llendl; } } - delete (*mit).second; + group_datap->mMembers.erase(*it); + + llwarns << "LLGroupMgr::sendGroupMemberEjects - deleting memnber data " << llendl; + delete (*mit).second; } } @@ -1760,6 +1771,8 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, { gAgent.sendReliableMessage(); } + + llwarns << "LLGroupMgr::sendGroupMemberEjects - done " << llendl; } void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) |