diff options
Diffstat (limited to 'indra/newview/llgroupmgr.cpp')
-rwxr-xr-x | indra/newview/llgroupmgr.cpp | 114 |
1 files changed, 58 insertions, 56 deletions
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index cbd844cdac..67778ebcab 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -41,6 +41,7 @@ #include "llui.h" #include "message.h" #include "roles_constants.h" +#include "llhttpclient.h" #include "lltransactiontypes.h" #include "llstatusbar.h" #include "lleconomy.h" @@ -50,6 +51,7 @@ #include "llnotificationsutil.h" #include "lluictrlfactory.h" #include "lltrans.h" +#include "llviewerregion.h" #include <boost/regex.hpp> #if LL_MSVC @@ -327,7 +329,7 @@ void LLGroupMgrGroupData::setRoleData(const LLUUID& role_id, LLRoleData role_dat } else { - llwarns << "Change being made to non-existant role " << role_id << llendl; + LL_WARNS() << "Change being made to non-existant role " << role_id << LL_ENDL; } } @@ -341,7 +343,7 @@ void LLGroupMgrGroupData::createRole(const LLUUID& role_id, LLRoleData role_data { if (mRoleChanges.find(role_id) != mRoleChanges.end()) { - llwarns << "create role for existing role! " << role_id << llendl; + LL_WARNS() << "create role for existing role! " << role_id << LL_ENDL; } else { @@ -378,7 +380,7 @@ void LLGroupMgrGroupData::addRolePower(const LLUUID &role_id, U64 power) } else { - llwarns << "addRolePower: no role data found for " << role_id << llendl; + LL_WARNS() << "addRolePower: no role data found for " << role_id << LL_ENDL; } } @@ -392,7 +394,7 @@ void LLGroupMgrGroupData::removeRolePower(const LLUUID &role_id, U64 power) } else { - llwarns << "removeRolePower: no role data found for " << role_id << llendl; + LL_WARNS() << "removeRolePower: no role data found for " << role_id << LL_ENDL; } } @@ -405,7 +407,7 @@ U64 LLGroupMgrGroupData::getRolePowers(const LLUUID& role_id) } else { - llwarns << "getRolePowers: no role data found for " << role_id << llendl; + LL_WARNS() << "getRolePowers: no role data found for " << role_id << LL_ENDL; return GP_NO_POWERS; } } @@ -489,8 +491,8 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, if (ri == mRoles.end() || mi == mMembers.end() ) { - if (ri == mRoles.end()) llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't find role " << role_id << llendl; - if (mi == mMembers.end()) llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't find member " << member_id << llendl; + if (ri == mRoles.end()) LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't find role " << role_id << LL_ENDL; + if (mi == mMembers.end()) LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't find member " << member_id << LL_ENDL; return false; } @@ -499,13 +501,13 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, if (!grd || !gmd) { - llwarns << "LLGroupMgrGroupData::changeRoleMember couldn't get member or role data." << llendl; + LL_WARNS() << "LLGroupMgrGroupData::changeRoleMember couldn't get member or role data." << LL_ENDL; return false; } if (RMC_ADD == rmc) { - llinfos << " adding member to role." << llendl; + LL_INFOS() << " adding member to role." << LL_ENDL; grd->addMember(member_id); gmd->addRole(role_id,grd); @@ -515,7 +517,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, } else if (RMC_REMOVE == rmc) { - llinfos << " removing member from role." << llendl; + LL_INFOS() << " removing member from role." << LL_ENDL; grd->removeMember(member_id); gmd->removeRole(role_id); @@ -534,9 +536,9 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, if (it->second.mChange == rmc) { // Already recorded this change? Weird. - llinfos << "Received duplicate change for " + LL_INFOS() << "Received duplicate change for " << " role: " << role_id << " member " << member_id - << " change " << (rmc == RMC_ADD ? "ADD" : "REMOVE") << llendl; + << " change " << (rmc == RMC_ADD ? "ADD" : "REMOVE") << LL_ENDL; } else { @@ -544,7 +546,7 @@ bool LLGroupMgrGroupData::changeRoleMember(const LLUUID& role_id, // If that changes this will need more logic if (rmc == RMC_NONE) { - llwarns << "changeRoleMember: existing entry with 'RMC_NONE' change! This shouldn't happen." << llendl; + LL_WARNS() << "changeRoleMember: existing entry with 'RMC_NONE' change! This shouldn't happen." << LL_ENDL; LLRoleMemberChange rc(role_id,member_id,rmc); mRoleMemberChanges[role_member] = rc; } @@ -862,12 +864,12 @@ static void formatDateString(std::string &date_string) // static void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupMembersReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupMembersReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group members reply for another agent!" << llendl; + LL_WARNS() << "Got group members reply for another agent!" << LL_ENDL; return; } @@ -880,7 +882,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mMemberRequestID != request_id)) { - llwarns << "processGroupMembersReply: Received incorrect (stale?) group or request id" << llendl; + LL_WARNS() << "processGroupMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL; return; } @@ -918,7 +920,7 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) formatDateString(online_status); // reformat for sorting, e.g. 12/25/2008 -> 2008/12/25 } - //llinfos << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << llendl; + //LL_INFOS() << "Member " << member_id << " has powers " << std::hex << agent_powers << std::dec << LL_ENDL; LLGroupMemberData* newdata = new LLGroupMemberData(member_id, contribution, agent_powers, @@ -929,14 +931,14 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData::member_list_t::iterator mit = group_datap->mMembers.find(member_id); if (mit != group_datap->mMembers.end()) { - llinfos << " *** Received duplicate member data for agent " << member_id << llendl; + LL_INFOS() << " *** Received duplicate member data for agent " << member_id << LL_ENDL; } #endif group_datap->mMembers[member_id] = newdata; } else { - llinfos << "Received null group member data." << llendl; + LL_INFOS() << "Received null group member data." << LL_ENDL; } } @@ -968,12 +970,12 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data) //static void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupPropertiesReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupPropertiesReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group properties reply for another agent!" << llendl; + LL_WARNS() << "Got group properties reply for another agent!" << LL_ENDL; return; } @@ -1035,12 +1037,12 @@ void LLGroupMgr::processGroupPropertiesReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupRoleDataReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupRoleDataReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group role data reply for another agent!" << llendl; + LL_WARNS() << "Got group role data reply for another agent!" << LL_ENDL; return; } @@ -1053,7 +1055,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mRoleDataRequestID != request_id)) { - llwarns << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << llendl; + LL_WARNS() << "processGroupPropertiesReply: Received incorrect (stale?) group or request id" << LL_ENDL; return; } @@ -1096,7 +1098,7 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) - lldebugs << "Adding role data: " << name << " {" << role_id << "}" << llendl; + LL_DEBUGS() << "Adding role data: " << name << " {" << role_id << "}" << LL_ENDL; LLGroupRoleData* rd = new LLGroupRoleData(role_id,name,title,desc,powers,member_count); group_datap->mRoles[role_id] = rd; } @@ -1120,12 +1122,12 @@ void LLGroupMgr::processGroupRoleDataReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupRoleMembersReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupRoleMembersReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group role members reply for another agent!" << llendl; + LL_WARNS() << "Got group role members reply for another agent!" << LL_ENDL; return; } @@ -1141,7 +1143,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mRoleMembersRequestID != request_id)) { - llwarns << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << llendl; + LL_WARNS() << "processGroupRoleMembersReply: Received incorrect (stale?) group or request id" << LL_ENDL; return; } @@ -1181,14 +1183,14 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) if (rd && md) { - lldebugs << "Adding role-member pair: " << role_id << ", " << member_id << llendl; + LL_DEBUGS() << "Adding role-member pair: " << role_id << ", " << member_id << LL_ENDL; rd->addMember(member_id); md->addRole(role_id,rd); } else { - if (!rd) llwarns << "Received role data for unknown role " << role_id << " in group " << group_id << llendl; - if (!md) llwarns << "Received role data for unknown member " << member_id << " in group " << group_id << llendl; + if (!rd) LL_WARNS() << "Received role data for unknown role " << role_id << " in group " << group_id << LL_ENDL; + if (!md) LL_WARNS() << "Received role data for unknown member " << member_id << " in group " << group_id << LL_ENDL; } } } @@ -1202,7 +1204,7 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) LLGroupRoleData* everyone = group_datap->mRoles[LLUUID::null]; if (!everyone) { - llwarns << "Everyone role not found!" << llendl; + LL_WARNS() << "Everyone role not found!" << LL_ENDL; } else { @@ -1228,12 +1230,12 @@ void LLGroupMgr::processGroupRoleMembersReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) { - lldebugs << "LLGroupMgr::processGroupTitlesReply" << llendl; + LL_DEBUGS() << "LLGroupMgr::processGroupTitlesReply" << LL_ENDL; LLUUID agent_id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group properties reply for another agent!" << llendl; + LL_WARNS() << "Got group properties reply for another agent!" << LL_ENDL; return; } @@ -1245,7 +1247,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap || (group_datap->mTitlesRequestID != request_id)) { - llwarns << "processGroupTitlesReply: Received incorrect (stale?) group" << llendl; + LL_WARNS() << "processGroupTitlesReply: Received incorrect (stale?) group" << LL_ENDL; return; } @@ -1261,7 +1263,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) if (!title.mTitle.empty()) { - lldebugs << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << llendl; + LL_DEBUGS() << "LLGroupMgr adding title: " << title.mTitle << ", " << title.mRoleID << ", " << (title.mSelected ? 'Y' : 'N') << LL_ENDL; group_datap->mTitles.push_back(title); } } @@ -1273,7 +1275,7 @@ void LLGroupMgr::processGroupTitlesReply(LLMessageSystem* msg, void** data) // static void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data) { - lldebugs << "processEjectGroupMemberReply" << llendl; + LL_DEBUGS() << "processEjectGroupMemberReply" << LL_ENDL; LLUUID group_id; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); BOOL success; @@ -1289,7 +1291,7 @@ void LLGroupMgr::processEjectGroupMemberReply(LLMessageSystem* msg, void ** data // static void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data) { - lldebugs << "processJoinGroupReply" << llendl; + LL_DEBUGS() << "processJoinGroupReply" << LL_ENDL; LLUUID group_id; BOOL success; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); @@ -1309,7 +1311,7 @@ void LLGroupMgr::processJoinGroupReply(LLMessageSystem* msg, void ** data) // static void LLGroupMgr::processLeaveGroupReply(LLMessageSystem* msg, void ** data) { - lldebugs << "processLeaveGroupReply" << llendl; + LL_DEBUGS() << "processLeaveGroupReply" << LL_ENDL; LLUUID group_id; BOOL success; msg->getUUIDFast(_PREHASH_GroupData, _PREHASH_GroupID, group_id); @@ -1471,7 +1473,7 @@ void LLGroupMgr::addGroup(LLGroupMgrGroupData* group_datap) void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupPropertiesRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupPropertiesRequest" << LL_ENDL; // This will happen when we get the reply //LLGroupMgrGroupData* group_datap = createGroupData(group_id); @@ -1487,7 +1489,7 @@ void LLGroupMgr::sendGroupPropertiesRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupMembersRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupMembersRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mMemberRequestID.isNull()) { @@ -1509,7 +1511,7 @@ void LLGroupMgr::sendGroupMembersRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleDataRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleDataRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mRoleDataRequestID.isNull()) { @@ -1530,7 +1532,7 @@ void LLGroupMgr::sendGroupRoleDataRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleMembersRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleMembersRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mRoleMembersRequestID.isNull()) @@ -1540,9 +1542,9 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) || !group_datap->isRoleDataComplete()) { // *TODO: KLW FIXME: Should we start a member or role data request? - llinfos << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N") + LL_INFOS() << " Pending: " << (group_datap->mPendingRoleMemberRequest ? "Y" : "N") << " MemberDataComplete: " << (group_datap->mMemberDataComplete ? "Y" : "N") - << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << llendl; + << " RoleDataComplete: " << (group_datap->mRoleDataComplete ? "Y" : "N") << LL_ENDL; group_datap->mPendingRoleMemberRequest = TRUE; return; } @@ -1564,7 +1566,7 @@ void LLGroupMgr::sendGroupRoleMembersRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupTitlesRequest" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupTitlesRequest" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); group_datap->mTitles.clear(); @@ -1583,7 +1585,7 @@ void LLGroupMgr::sendGroupTitlesRequest(const LLUUID& group_id) void LLGroupMgr::sendGroupTitleUpdate(const LLUUID& group_id, const LLUUID& title_role_id) { - lldebugs << "LLGroupMgr::sendGroupTitleUpdate" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupTitleUpdate" << LL_ENDL; LLMessageSystem* msg = gMessageSystem; msg->newMessage("GroupTitleUpdate"); @@ -1642,7 +1644,7 @@ void LLGroupMgr::sendCreateGroupRequest(const std::string& name, void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendUpdateGroupInfo" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendUpdateGroupInfo" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); LLMessageSystem* msg = gMessageSystem; @@ -1671,7 +1673,7 @@ void LLGroupMgr::sendUpdateGroupInfo(const LLUUID& group_id) void LLGroupMgr::sendGroupRoleMemberChanges(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleMemberChanges" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleMemberChanges" << LL_ENDL; LLGroupMgrGroupData* group_datap = createGroupData(group_id); if (group_datap->mRoleMemberChanges.empty()) return; @@ -2025,7 +2027,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::sendGroupRoleChanges" << llendl; + LL_DEBUGS() << "LLGroupMgr::sendGroupRoleChanges" << LL_ENDL; LLGroupMgrGroupData* group_datap = getGroupData(group_id); if (group_datap && group_datap->pendingRoleChanges()) @@ -2040,7 +2042,7 @@ void LLGroupMgr::sendGroupRoleChanges(const LLUUID& group_id) void LLGroupMgr::cancelGroupRoleChanges(const LLUUID& group_id) { - lldebugs << "LLGroupMgr::cancelGroupRoleChanges" << llendl; + LL_DEBUGS() << "LLGroupMgr::cancelGroupRoleChanges" << LL_ENDL; LLGroupMgrGroupData* group_datap = getGroupData(group_id); if (group_datap) group_datap->cancelRoleChanges(); @@ -2055,7 +2057,7 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) if (!success || !root || !root->hasName( "role_actions" )) { - llerrs << "Problem reading UI role_actions file: " << xml_filename << llendl; + LL_ERRS() << "Problem reading UI role_actions file: " << xml_filename << LL_ENDL; return false; } @@ -2074,12 +2076,12 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) std::string action_set_name; if (action_set->getAttributeString("name", action_set_name)) { - lldebugs << "Loading action set " << action_set_name << llendl; + LL_DEBUGS() << "Loading action set " << action_set_name << LL_ENDL; role_action_data->mName = action_set_name; } else { - llwarns << "Unable to parse action set with no name" << llendl; + LL_WARNS() << "Unable to parse action set with no name" << LL_ENDL; delete role_action_set; delete role_action_data; continue; @@ -2115,12 +2117,12 @@ bool LLGroupMgr::parseRoleActions(const std::string& xml_filename) std::string action_name; if (action->getAttributeString("name", action_name)) { - lldebugs << "Loading action " << action_name << llendl; + LL_DEBUGS() << "Loading action " << action_name << LL_ENDL; role_action->mName = action_name; } else { - llwarns << "Unable to parse action with no name" << llendl; + LL_WARNS() << "Unable to parse action with no name" << LL_ENDL; delete role_action; continue; } |