diff options
author | Teravus Ovares | 2007-12-20 14:44:59 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-20 14:44:59 +0000 |
commit | 2641f78a205733dd2730302b84f46d01262bc2ec (patch) | |
tree | de8122235d7794213e0358f0465ff03172bbcee3 /OpenSim/Region | |
parent | * removed comment (diff) | |
download | opensim-SC-2641f78a205733dd2730302b84f46d01262bc2ec.zip opensim-SC-2641f78a205733dd2730302b84f46d01262bc2ec.tar.gz opensim-SC-2641f78a205733dd2730302b84f46d01262bc2ec.tar.bz2 opensim-SC-2641f78a205733dd2730302b84f46d01262bc2ec.tar.xz |
* Fixed a null NewPack error in ClientView.InPacket (object pool returning null objects?)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 60 | ||||
-rw-r--r-- | OpenSim/Region/Environment/LandManagement/LandManager.cs | 5 |
2 files changed, 37 insertions, 28 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 58cb9a2..7161942 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -2217,44 +2217,48 @@ namespace OpenSim.Region.ClientStack | |||
2217 | public virtual void InPacket(Packet NewPack) | 2217 | public virtual void InPacket(Packet NewPack) |
2218 | { | 2218 | { |
2219 | // Handle appended ACKs | 2219 | // Handle appended ACKs |
2220 | if (NewPack.Header.AppendedAcks) | 2220 | if (NewPack != null) |
2221 | { | 2221 | { |
2222 | lock (m_needAck) | 2222 | if (NewPack.Header.AppendedAcks) |
2223 | { | 2223 | { |
2224 | foreach (uint ack in NewPack.Header.AckList) | 2224 | lock (m_needAck) |
2225 | { | 2225 | { |
2226 | m_needAck.Remove(ack); | 2226 | foreach (uint ack in NewPack.Header.AckList) |
2227 | { | ||
2228 | m_needAck.Remove(ack); | ||
2229 | } | ||
2227 | } | 2230 | } |
2228 | } | 2231 | } |
2229 | } | 2232 | |
2230 | |||
2231 | // Handle PacketAck packets | ||
2232 | if (NewPack.Type == PacketType.PacketAck) | ||
2233 | { | ||
2234 | PacketAckPacket ackPacket = (PacketAckPacket) NewPack; | ||
2235 | 2233 | ||
2236 | lock (m_needAck) | 2234 | // Handle PacketAck packets |
2235 | if (NewPack.Type == PacketType.PacketAck) | ||
2237 | { | 2236 | { |
2238 | foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) | 2237 | PacketAckPacket ackPacket = (PacketAckPacket) NewPack; |
2238 | |||
2239 | lock (m_needAck) | ||
2239 | { | 2240 | { |
2240 | m_needAck.Remove(block.ID); | 2241 | foreach (PacketAckPacket.PacketsBlock block in ackPacket.Packets) |
2242 | { | ||
2243 | m_needAck.Remove(block.ID); | ||
2244 | } | ||
2241 | } | 2245 | } |
2242 | } | 2246 | } |
2243 | } | 2247 | else if ((NewPack.Type == PacketType.StartPingCheck)) |
2244 | else if ((NewPack.Type == PacketType.StartPingCheck)) | 2248 | { |
2245 | { | 2249 | //reply to pingcheck |
2246 | //reply to pingcheck | 2250 | StartPingCheckPacket startPing = (StartPingCheckPacket) NewPack; |
2247 | StartPingCheckPacket startPing = (StartPingCheckPacket) NewPack; | 2251 | CompletePingCheckPacket endPing = new CompletePingCheckPacket(); |
2248 | CompletePingCheckPacket endPing = new CompletePingCheckPacket(); | 2252 | endPing.PingID.PingID = startPing.PingID.PingID; |
2249 | endPing.PingID.PingID = startPing.PingID.PingID; | 2253 | OutPacket(endPing, ThrottleOutPacketType.Task); |
2250 | OutPacket(endPing, ThrottleOutPacketType.Task); | 2254 | } |
2251 | } | 2255 | else |
2252 | else | 2256 | { |
2253 | { | 2257 | QueItem item = new QueItem(); |
2254 | QueItem item = new QueItem(); | 2258 | item.Packet = NewPack; |
2255 | item.Packet = NewPack; | 2259 | item.Incoming = true; |
2256 | item.Incoming = true; | 2260 | m_packetQueue.Enqueue(item); |
2257 | m_packetQueue.Enqueue(item); | 2261 | } |
2258 | } | 2262 | } |
2259 | } | 2263 | } |
2260 | 2264 | ||
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index 72c449b..310d29b 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -242,6 +242,9 @@ namespace OpenSim.Region.Environment.LandManagement | |||
242 | 242 | ||
243 | if (x >= 64 || y >= 64 || x < 0 || y < 0) | 243 | if (x >= 64 || y >= 64 || x < 0 || y < 0) |
244 | { | 244 | { |
245 | // These exceptions here will cause a lot of complaints from the users specifically because | ||
246 | // they happen every time at border crossings | ||
247 | |||
245 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 248 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
246 | } | 249 | } |
247 | else | 250 | else |
@@ -255,6 +258,8 @@ namespace OpenSim.Region.Environment.LandManagement | |||
255 | { | 258 | { |
256 | if (x >= 256 || y >= 256 || x < 0 || y < 0) | 259 | if (x >= 256 || y >= 256 || x < 0 || y < 0) |
257 | { | 260 | { |
261 | // These exceptions here will cause a lot of complaints from the users specifically because | ||
262 | // they happen every time at border crossings | ||
258 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 263 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
259 | } | 264 | } |
260 | else | 265 | else |