aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2016-10-24 10:23:31 +0100
committerUbitUmarov2016-10-24 10:23:31 +0100
commitd550b485f1409030149447c71b3de881232d4897 (patch)
tree2bd710e1e5dd0957f05860aa93cf1a52485c6334 /OpenSim/Region/ClientStack
parentignore prims with shape type none on max size check for physics (diff)
downloadopensim-SC-d550b485f1409030149447c71b3de881232d4897.zip
opensim-SC-d550b485f1409030149447c71b3de881232d4897.tar.gz
opensim-SC-d550b485f1409030149447c71b3de881232d4897.tar.bz2
opensim-SC-d550b485f1409030149447c71b3de881232d4897.tar.xz
viewer crash bug fix: fis the udp packets split of SendEstateList() large lists; Enforce size limits on the estate lists since currently required for viewers compatibily; improve handling of changes with large selected items. This is still bad, users may need to close and reopen the region/estate information to get correct Allowed and Banned lists after a change. This happens because of viewer resent/outOfOrder packets that completly break this lists updates protocol
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs129
1 files changed, 58 insertions, 71 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index fd3f997..ad25bc8 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5072,52 +5072,74 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5072 } 5072 }
5073 5073
5074 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) 5074 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
5075
5076 { 5075 {
5077 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 5076 int TotalnumberIDs = Data.Length;
5078 packet.AgentData.TransactionID = UUID.Random(); 5077 int numberIDs;
5079 packet.AgentData.AgentID = AgentId; 5078 int IDIndex = 0;
5080 packet.AgentData.SessionID = SessionId;
5081 packet.MethodData.Invoice = invoice;
5082 packet.MethodData.Method = Utils.StringToBytes("setaccess");
5083 5079
5084 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + Data.Length]; 5080 do
5085
5086 for (int i = 0; i < (6 + Data.Length); i++)
5087 { 5081 {
5088 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); 5082 if(TotalnumberIDs > 63)
5089 } 5083 numberIDs = 63;
5090 int j = 0; 5084 else
5085 numberIDs = TotalnumberIDs;
5091 5086
5092 returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; 5087 TotalnumberIDs -= numberIDs;
5093 returnblock[j].Parameter = Utils.StringToBytes(code.ToString()); j++;
5094 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5095 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5096 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5097 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5098 5088
5099 j = 2; // Agents 5089 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
5100 if ((code & 2) != 0) 5090 packet.AgentData.TransactionID = UUID.Random();
5101 j = 3; // Groups 5091 packet.AgentData.AgentID = AgentId;
5102 if ((code & 8) != 0) 5092 packet.AgentData.SessionID = SessionId;
5103 j = 5; // Managers 5093 packet.MethodData.Invoice = invoice;
5094 packet.MethodData.Method = Utils.StringToBytes("setaccess");
5104 5095
5105 returnblock[j].Parameter = Utils.StringToBytes(Data.Length.ToString()); 5096 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + numberIDs];
5106 j = 6;
5107 5097
5108 for (int i = 0; i < Data.Length; i++) 5098 for (int i = 0; i < (6 + numberIDs); i++)
5109 { 5099 {
5110 returnblock[j].Parameter = Data[i].GetBytes(); j++; 5100 returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock();
5111 } 5101 }
5112 packet.ParamList = returnblock; 5102
5113 packet.Header.Reliable = true; 5103 returnblock[0].Parameter = Utils.StringToBytes(estateID.ToString());
5114 OutPacket(packet, ThrottleOutPacketType.Task); 5104 returnblock[1].Parameter = Utils.StringToBytes(code.ToString());
5105
5106 if((code & 1) != 0) // allowagents
5107 returnblock[2].Parameter = Utils.StringToBytes(numberIDs.ToString());
5108 else
5109 returnblock[2].Parameter = Utils.StringToBytes("0");
5110
5111 if((code & 2) != 0) // groups
5112 returnblock[3].Parameter = Utils.StringToBytes(numberIDs.ToString());
5113 else
5114 returnblock[3].Parameter = Utils.StringToBytes("0");
5115
5116 if((code & 4) != 0) // bans
5117 returnblock[4].Parameter = Utils.StringToBytes(numberIDs.ToString());
5118 else
5119 returnblock[4].Parameter = Utils.StringToBytes("0");
5120
5121 if((code & 8) != 0) // managers
5122 returnblock[5].Parameter = Utils.StringToBytes(numberIDs.ToString());
5123 else
5124 returnblock[5].Parameter = Utils.StringToBytes("0");
5125
5126 int j = 6;
5127
5128 for (int i = 0; i < numberIDs; i++)
5129 {
5130 returnblock[j].Parameter = Data[IDIndex].GetBytes();
5131 j++;
5132 IDIndex++;
5133 }
5134 packet.ParamList = returnblock;
5135 packet.Header.Reliable = true;
5136 OutPacket(packet, ThrottleOutPacketType.Task);
5137 } while (TotalnumberIDs > 0);
5115 } 5138 }
5116 5139
5117 public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID) 5140 public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
5118 { 5141 {
5119 List<UUID> BannedUsers = new List<UUID>(); 5142 List<UUID> BannedUsers = new List<UUID>();
5120
5121 for (int i = 0; i < bl.Length; i++) 5143 for (int i = 0; i < bl.Length; i++)
5122 { 5144 {
5123 if (bl[i] == null) 5145 if (bl[i] == null)
@@ -5125,44 +5147,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5125 if (bl[i].BannedUserID == UUID.Zero) 5147 if (bl[i].BannedUserID == UUID.Zero)
5126 continue; 5148 continue;
5127 BannedUsers.Add(bl[i].BannedUserID); 5149 BannedUsers.Add(bl[i].BannedUserID);
5128
5129 if (BannedUsers.Count >= 50 || (i == (bl.Length - 1) && BannedUsers.Count > 0))
5130 {
5131 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
5132 packet.AgentData.TransactionID = UUID.Random();
5133 packet.AgentData.AgentID = AgentId;
5134 packet.AgentData.SessionID = SessionId;
5135 packet.MethodData.Invoice = invoice;
5136 packet.MethodData.Method = Utils.StringToBytes("setaccess");
5137
5138 EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + BannedUsers.Count];
5139
5140 int j;
5141 for (j = 0; j < (6 + BannedUsers.Count); j++)
5142 {
5143 returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock();
5144 }
5145 j = 0;
5146
5147 returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++;
5148 returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++;
5149 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5150 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5151 returnblock[j].Parameter = Utils.StringToBytes(BannedUsers.Count.ToString()); j++;
5152 returnblock[j].Parameter = Utils.StringToBytes("0"); j++;
5153
5154 foreach (UUID banned in BannedUsers)
5155 {
5156 returnblock[j].Parameter = banned.GetBytes(); j++;
5157 }
5158 packet.ParamList = returnblock;
5159 packet.Header.Reliable = true;
5160 OutPacket(packet, ThrottleOutPacketType.Task);
5161
5162 BannedUsers.Clear();
5163 }
5164 } 5150 }
5165 5151 SendEstateList(invoice, 4, BannedUsers.ToArray(), estateID);
5166 } 5152 }
5167 5153
5168 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 5154 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
@@ -10240,6 +10226,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10240 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10226 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10241 { 10227 {
10242 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); 10228 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
10229
10243 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter))); 10230 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
10244 10231
10245 } 10232 }