aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorMelanie2010-08-30 02:30:28 +0100
committerMelanie2010-08-30 02:30:28 +0100
commit79bfa275da6b8be03678bfa284bd205410296b6a (patch)
tree1ce2f9f2da9bb0e3a8f5628d54f44e45bfc33044 /OpenSim/Region/ClientStack/LindenUDP
parentRemove CRLF endings (diff)
parentFix a casting operation to use ToString() (diff)
downloadopensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.zip
opensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.tar.gz
opensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.tar.bz2
opensim-SC-79bfa275da6b8be03678bfa284bd205410296b6a.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs145
1 files changed, 80 insertions, 65 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 87ed90f..105501f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -37,6 +37,7 @@ using System.Xml;
37using log4net; 37using log4net;
38using OpenMetaverse; 38using OpenMetaverse;
39using OpenMetaverse.Packets; 39using OpenMetaverse.Packets;
40using OpenMetaverse.Messages.Linden;
40using OpenMetaverse.StructuredData; 41using OpenMetaverse.StructuredData;
41using OpenSim.Framework; 42using OpenSim.Framework;
42using OpenSim.Framework.Client; 43using OpenSim.Framework.Client;
@@ -328,7 +329,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
328 /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an 329 /// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
329 /// ownerless phantom. 330 /// ownerless phantom.
330 /// 331 ///
331 /// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock 332 /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock
332 /// 333 ///
333 /// </value> 334 /// </value>
334 protected HashSet<uint> m_killRecord; 335 protected HashSet<uint> m_killRecord;
@@ -394,18 +395,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
394 public string ActiveGroupName { get { return m_activeGroupName; } } 395 public string ActiveGroupName { get { return m_activeGroupName; } }
395 public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } 396 public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } }
396 public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } 397 public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); }
398
397 /// <summary> 399 /// <summary>
398 /// First name of the agent/avatar represented by the client 400 /// First name of the agent/avatar represented by the client
399 /// </summary> 401 /// </summary>
400 public string FirstName { get { return m_firstName; } } 402 public string FirstName { get { return m_firstName; } }
403
401 /// <summary> 404 /// <summary>
402 /// Last name of the agent/avatar represented by the client 405 /// Last name of the agent/avatar represented by the client
403 /// </summary> 406 /// </summary>
404 public string LastName { get { return m_lastName; } } 407 public string LastName { get { return m_lastName; } }
408
405 /// <summary> 409 /// <summary>
406 /// Full name of the client (first name and last name) 410 /// Full name of the client (first name and last name)
407 /// </summary> 411 /// </summary>
408 public string Name { get { return FirstName + " " + LastName; } } 412 public string Name { get { return FirstName + " " + LastName; } }
413
409 public uint CircuitCode { get { return m_circuitCode; } } 414 public uint CircuitCode { get { return m_circuitCode; } }
410 public int MoneyBalance { get { return m_moneyBalance; } } 415 public int MoneyBalance { get { return m_moneyBalance; } }
411 public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } 416 public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } }
@@ -2743,6 +2748,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2743 DirPlacesReplyPacket.StatusDataBlock[] status = 2748 DirPlacesReplyPacket.StatusDataBlock[] status =
2744 new DirPlacesReplyPacket.StatusDataBlock[0]; 2749 new DirPlacesReplyPacket.StatusDataBlock[0];
2745 2750
2751 packet.QueryReplies = replies;
2752 packet.StatusData = status;
2753
2746 foreach (DirPlacesReplyData d in data) 2754 foreach (DirPlacesReplyData d in data)
2747 { 2755 {
2748 int idx = replies.Length; 2756 int idx = replies.Length;
@@ -2781,7 +2789,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2781 } 2789 }
2782 } 2790 }
2783 2791
2784 if (replies.Length > 0) 2792 if (replies.Length > 0 || data.Length == 0)
2785 OutPacket(packet, ThrottleOutPacketType.Task); 2793 OutPacket(packet, ThrottleOutPacketType.Task);
2786 } 2794 }
2787 2795
@@ -4213,94 +4221,101 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4213 4221
4214 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 4222 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
4215 { 4223 {
4216 ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ParcelProperties); 4224 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
4217 // TODO: don't create new blocks if recycling an old packet
4218 4225
4219 updatePacket.ParcelData.AABBMax = landData.AABBMax; 4226 updateMessage.AABBMax = landData.AABBMax;
4220 updatePacket.ParcelData.AABBMin = landData.AABBMin; 4227 updateMessage.AABBMin = landData.AABBMin;
4221 updatePacket.ParcelData.Area = landData.Area; 4228 updateMessage.Area = landData.Area;
4222 updatePacket.ParcelData.AuctionID = landData.AuctionID; 4229 updateMessage.AuctionID = landData.AuctionID;
4223 updatePacket.ParcelData.AuthBuyerID = landData.AuthBuyerID; 4230 updateMessage.AuthBuyerID = landData.AuthBuyerID;
4224 4231
4225 updatePacket.ParcelData.Bitmap = landData.Bitmap; 4232 updateMessage.Bitmap = landData.Bitmap;
4226 4233
4227 updatePacket.ParcelData.Desc = Utils.StringToBytes(landData.Description); 4234 updateMessage.Desc = landData.Description;
4228 updatePacket.ParcelData.Category = (byte)landData.Category; 4235 updateMessage.Category = landData.Category;
4229 updatePacket.ParcelData.ClaimDate = landData.ClaimDate; 4236 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
4230 updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice; 4237 updateMessage.ClaimPrice = landData.ClaimPrice;
4231 updatePacket.ParcelData.GroupID = landData.GroupID; 4238 updateMessage.GroupID = landData.GroupID;
4232 updatePacket.ParcelData.GroupPrims = landData.GroupPrims; 4239 updateMessage.GroupPrims = landData.GroupPrims;
4233 updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned; 4240 updateMessage.IsGroupOwned = landData.IsGroupOwned;
4234 updatePacket.ParcelData.LandingType = landData.LandingType; 4241 updateMessage.LandingType = (LandingType) landData.LandingType;
4235 updatePacket.ParcelData.LocalID = landData.LocalID; 4242 updateMessage.LocalID = landData.LocalID;
4236 4243
4237 if (landData.Area > 0) 4244 if (landData.Area > 0)
4238 { 4245 {
4239 updatePacket.ParcelData.MaxPrims = parcelObjectCapacity; 4246 updateMessage.MaxPrims = parcelObjectCapacity;
4240 } 4247 }
4241 else 4248 else
4242 { 4249 {
4243 updatePacket.ParcelData.MaxPrims = 0; 4250 updateMessage.MaxPrims = 0;
4244 } 4251 }
4245 4252
4246 updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale; 4253 updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale);
4247 updatePacket.ParcelData.MediaID = landData.MediaID; 4254 updateMessage.MediaID = landData.MediaID;
4248 updatePacket.ParcelData.MediaURL = Util.StringToBytes256(landData.MediaURL); 4255 updateMessage.MediaURL = landData.MediaURL;
4249 updatePacket.ParcelData.MusicURL = Util.StringToBytes256(landData.MusicURL); 4256 updateMessage.MusicURL = landData.MusicURL;
4250 updatePacket.ParcelData.Name = Util.StringToBytes256(landData.Name); 4257 updateMessage.Name = landData.Name;
4251 updatePacket.ParcelData.OtherCleanTime = landData.OtherCleanTime; 4258 updateMessage.OtherCleanTime = landData.OtherCleanTime;
4252 updatePacket.ParcelData.OtherCount = 0; //TODO: Unimplemented 4259 updateMessage.OtherCount = 0; //TODO: Unimplemented
4253 updatePacket.ParcelData.OtherPrims = landData.OtherPrims; 4260 updateMessage.OtherPrims = landData.OtherPrims;
4254 updatePacket.ParcelData.OwnerID = landData.OwnerID; 4261 updateMessage.OwnerID = landData.OwnerID;
4255 updatePacket.ParcelData.OwnerPrims = landData.OwnerPrims; 4262 updateMessage.OwnerPrims = landData.OwnerPrims;
4256 updatePacket.ParcelData.ParcelFlags = landData.Flags; 4263 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
4257 updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor; 4264 updateMessage.ParcelPrimBonus = simObjectBonusFactor;
4258 updatePacket.ParcelData.PassHours = landData.PassHours; 4265 updateMessage.PassHours = landData.PassHours;
4259 updatePacket.ParcelData.PassPrice = landData.PassPrice; 4266 updateMessage.PassPrice = landData.PassPrice;
4260 updatePacket.ParcelData.PublicCount = 0; //TODO: Unimplemented 4267 updateMessage.PublicCount = 0; //TODO: Unimplemented
4261 4268
4262 updatePacket.ParcelData.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; 4269 updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0;
4263 updatePacket.ParcelData.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0; 4270 updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0;
4264 updatePacket.ParcelData.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0; 4271
4265 updatePacket.ParcelData.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; 4272 //updateMessage.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0;
4266 4273 //updateMessage.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0;
4267 updatePacket.ParcelData.RentPrice = 0; 4274
4268 updatePacket.ParcelData.RequestResult = request_result; 4275 updateMessage.RentPrice = 0;
4269 updatePacket.ParcelData.SalePrice = landData.SalePrice; 4276 updateMessage.RequestResult = (ParcelResult) request_result;
4270 updatePacket.ParcelData.SelectedPrims = landData.SelectedPrims; 4277 updateMessage.SalePrice = landData.SalePrice;
4271 updatePacket.ParcelData.SelfCount = 0; //TODO: Unimplemented 4278 updateMessage.SelectedPrims = landData.SelectedPrims;
4272 updatePacket.ParcelData.SequenceID = sequence_id; 4279 updateMessage.SelfCount = 0; //TODO: Unimplemented
4280 updateMessage.SequenceID = sequence_id;
4273 if (landData.SimwideArea > 0) 4281 if (landData.SimwideArea > 0)
4274 { 4282 {
4275 updatePacket.ParcelData.SimWideMaxPrims = parcelObjectCapacity; 4283 updateMessage.SimWideMaxPrims = parcelObjectCapacity;
4276 } 4284 }
4277 else 4285 else
4278 { 4286 {
4279 updatePacket.ParcelData.SimWideMaxPrims = 0; 4287 updateMessage.SimWideMaxPrims = 0;
4280 } 4288 }
4281 updatePacket.ParcelData.SimWideTotalPrims = landData.SimwidePrims; 4289 updateMessage.SimWideTotalPrims = landData.SimwidePrims;
4282 updatePacket.ParcelData.SnapSelection = snap_selection; 4290 updateMessage.SnapSelection = snap_selection;
4283 updatePacket.ParcelData.SnapshotID = landData.SnapshotID; 4291 updateMessage.SnapshotID = landData.SnapshotID;
4284 updatePacket.ParcelData.Status = (byte)landData.Status; 4292 updateMessage.Status = (ParcelStatus) landData.Status;
4285 updatePacket.ParcelData.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims + 4293 updateMessage.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims +
4286 landData.SelectedPrims; 4294 landData.SelectedPrims;
4287 updatePacket.ParcelData.UserLocation = landData.UserLocation; 4295 updateMessage.UserLocation = landData.UserLocation;
4288 updatePacket.ParcelData.UserLookAt = landData.UserLookAt; 4296 updateMessage.UserLookAt = landData.UserLookAt;
4289 updatePacket.Header.Zerocoded = true; 4297
4298 updateMessage.MediaType = landData.MediaType;
4299 updateMessage.MediaDesc = landData.MediaDescription;
4300 updateMessage.MediaWidth = landData.MediaWidth;
4301 updateMessage.MediaHeight = landData.MediaHeight;
4302 updateMessage.MediaLoop = landData.MediaLoop;
4303 updateMessage.ObscureMusic = landData.ObscureMusic;
4304 updateMessage.ObscureMedia = landData.ObscureMedia;
4290 4305
4291 try 4306 try
4292 { 4307 {
4293 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 4308 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
4294 if (eq != null) 4309 if (eq != null)
4295 { 4310 {
4296 eq.ParcelProperties(updatePacket, this.AgentId); 4311 eq.ParcelProperties(updateMessage, this.AgentId);
4297 } 4312 } else {
4313 m_log.Warn("No EQ Interface when sending parcel data.");
4314 }
4298 } 4315 }
4299 catch (Exception ex) 4316 catch (Exception ex)
4300 { 4317 {
4301 m_log.Error("Unable to send parcel data via eventqueue - exception: " + ex.ToString()); 4318 m_log.Error("Unable to send parcel data via eventqueue - exception: " + ex.ToString());
4302 m_log.Warn("sending parcel data via UDP");
4303 OutPacket(updatePacket, ThrottleOutPacketType.Task);
4304 } 4319 }
4305 } 4320 }
4306 4321
@@ -8993,7 +9008,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8993 if (handlerGodKickUser != null) 9008 if (handlerGodKickUser != null)
8994 { 9009 {
8995 handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, 9010 handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID,
8996 gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); 9011 gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason);
8997 } 9012 }
8998 } 9013 }
8999 else 9014 else