cleanup a bit

LSLKeyTest
UbitUmarov 2016-07-01 19:20:04 +01:00
parent 7b7483ec7e
commit 3af437c8bc
4 changed files with 2 additions and 91 deletions

View File

@ -579,12 +579,6 @@ namespace OpenSim.Region.ClientStack.Linden
Enqueue(item, avatarID);
}
public void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
{
OSD item = EventQueueHelper.GroupMembership(groupUpdate);
Enqueue(item, avatarID);
}
public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
{
OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, data);

View File

@ -333,40 +333,6 @@ namespace OpenSim.Region.ClientStack.Linden
return chatterBoxSessionAgentListUpdates;
}
public static OSD GroupMembership(AgentGroupDataUpdatePacket groupUpdatePacket)
{
OSDMap groupUpdate = new OSDMap();
groupUpdate.Add("message", OSD.FromString("AgentGroupDataUpdate"));
OSDMap body = new OSDMap();
OSDArray agentData = new OSDArray();
OSDMap agentDataMap = new OSDMap();
agentDataMap.Add("AgentID", OSD.FromUUID(groupUpdatePacket.AgentData.AgentID));
agentData.Add(agentDataMap);
body.Add("AgentData", agentData);
OSDArray groupData = new OSDArray();
foreach (AgentGroupDataUpdatePacket.GroupDataBlock groupDataBlock in groupUpdatePacket.GroupData)
{
OSDMap groupDataMap = new OSDMap();
groupDataMap.Add("ListInProfile", OSD.FromBoolean(false));
groupDataMap.Add("GroupID", OSD.FromUUID(groupDataBlock.GroupID));
groupDataMap.Add("GroupInsigniaID", OSD.FromUUID(groupDataBlock.GroupInsigniaID));
groupDataMap.Add("Contribution", OSD.FromInteger(groupDataBlock.Contribution));
groupDataMap.Add("GroupPowers", OSD.FromBinary(ulongToByteArray(groupDataBlock.GroupPowers)));
groupDataMap.Add("GroupName", OSD.FromString(Utils.BytesToString(groupDataBlock.GroupName)));
groupDataMap.Add("AcceptNotices", OSD.FromBoolean(groupDataBlock.AcceptNotices));
groupData.Add(groupDataMap);
}
body.Add("GroupData", groupData);
groupUpdate.Add("body", body);
return groupUpdate;
}
public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
{
OSDArray AgentData = new OSDArray(1);

View File

@ -2756,51 +2756,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendGroupMembership(GroupMembershipData[] GroupMembership)
{
// maybe removed in future, use SendAgentGroupDataUpdate instead ( but make sure to update groupPowers )
AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket();
AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length];
lock(m_groupPowers)
{
m_groupPowers.Clear();
for (int i = 0; i < GroupMembership.Length; i++)
{
m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers;
AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock();
Group.AcceptNotices = GroupMembership[i].AcceptNotices;
Group.Contribution = GroupMembership[i].Contribution;
Group.GroupID = GroupMembership[i].GroupID;
Group.GroupInsigniaID = GroupMembership[i].GroupPicture;
Group.GroupName = Util.StringToBytes256(GroupMembership[i].GroupName);
Group.GroupPowers = GroupMembership[i].GroupPowers;
Groups[i] = Group;
}
}
Groupupdate.GroupData = Groups;
Groupupdate.AgentData = new AgentGroupDataUpdatePacket.AgentDataBlock();
Groupupdate.AgentData.AgentID = AgentId;
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
try
{
if (eq != null)
{
eq.GroupMembership(Groupupdate, this.AgentId);
}
}
catch (Exception ex)
{
m_log.Error("Unable to send group membership data via eventqueue - exception: " + ex.ToString());
m_log.Warn("sending group membership data via UDP");
eq = null;
}
if(eq == null) // udp if no eq
OutPacket(Groupupdate, ThrottleOutPacketType.Task);
UpdateGroupMembership(GroupMembership);
SendAgentGroupDataUpdate(AgentId,GroupMembership);
}
public void SendPartPhysicsProprieties(ISceneEntity entity)
@ -11015,7 +10972,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_GroupsModule != null)
{
m_GroupsModule.ActivateGroup(this, activateGroupPacket.AgentData.GroupID);
m_GroupsModule.SendAgentGroupDataUpdate(this);
}
return true;

View File

@ -157,11 +157,6 @@ namespace OpenSim.Tests.Common
AddEvent(avatarID, "ParcelProperties", parcelPropertiesMessage);
}
public void GroupMembership (OpenMetaverse.Packets.AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
{
AddEvent(avatarID, "GroupMembership", groupUpdate);
}
public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
{
AddEvent(receiverAgent, "AgentGroupDataUpdate", data);