aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorlbsa712007-06-12 18:47:36 +0000
committerlbsa712007-06-12 18:47:36 +0000
commit4d1d5eb0c6fb34f8bfa38bda4123eb425757ace4 (patch)
treeda37fa07f7a31a38b98a03342ac7e17aa58fcf44 /OpenSim
parent*Reverting back to 977 -- will look into this later (diff)
downloadopensim-SC_OLD-4d1d5eb0c6fb34f8bfa38bda4123eb425757ace4.zip
opensim-SC_OLD-4d1d5eb0c6fb34f8bfa38bda4123eb425757ace4.tar.gz
opensim-SC_OLD-4d1d5eb0c6fb34f8bfa38bda4123eb425757ace4.tar.bz2
opensim-SC_OLD-4d1d5eb0c6fb34f8bfa38bda4123eb425757ace4.tar.xz
* ignored data recieved from closed sockets
* removed some warnings
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs4
-rw-r--r--OpenSim/OpenSim.RegionServer/Simulator/World.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/UDPServer.cs25
4 files changed, 27 insertions, 6 deletions
diff --git a/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs b/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs
index 514435a..0bccbc2 100644
--- a/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs
+++ b/OpenSim/OpenSim.RegionServer/Client/ClientView.Grid.cs
@@ -98,7 +98,7 @@ namespace OpenSim.RegionServer.Client
98 enablesimpacket.SimulatorInfo.Port = neighbourPort; 98 enablesimpacket.SimulatorInfo.Port = neighbourPort;
99 enablePackets.Add(enablesimpacket); 99 enablePackets.Add(enablesimpacket);
100 } 100 }
101 catch (Exception e) 101 catch
102 { 102 {
103 MainConsole.Instance.Notice("Could not connect to neighbour " + neighbour["sim_ip"] + ":" + neighbour["sim_port"] + ", continuing."); 103 MainConsole.Instance.Notice("Could not connect to neighbour " + neighbour["sim_ip"] + ":" + neighbour["sim_port"] + ", continuing.");
104 } 104 }
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs b/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs
index 8620e8c..ace0d20 100644
--- a/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs
+++ b/OpenSim/OpenSim.RegionServer/Simulator/ParcelManager.cs
@@ -237,7 +237,7 @@ namespace OpenSim.RegionServer.Simulator
237 } 237 }
238 } 238 }
239 } 239 }
240 catch (Exception e) 240 catch
241 { 241 {
242 return false; //Exception. For now, lets skip subdivision 242 return false; //Exception. For now, lets skip subdivision
243 } 243 }
@@ -294,7 +294,7 @@ namespace OpenSim.RegionServer.Simulator
294 startParcel = getParcel(start_x, start_y); 294 startParcel = getParcel(start_x, start_y);
295 endParcel = getParcel(end_x, end_y); 295 endParcel = getParcel(end_x, end_y);
296 } 296 }
297 catch (Exception e) 297 catch
298 { 298 {
299 return false; //Error occured when trying to get the start and end parcels 299 return false; //Error occured when trying to get the start and end parcels
300 } 300 }
diff --git a/OpenSim/OpenSim.RegionServer/Simulator/World.cs b/OpenSim/OpenSim.RegionServer/Simulator/World.cs
index 765c74e..ac64c79 100644
--- a/OpenSim/OpenSim.RegionServer/Simulator/World.cs
+++ b/OpenSim/OpenSim.RegionServer/Simulator/World.cs
@@ -478,7 +478,7 @@ namespace OpenSim.RegionServer.Simulator
478 this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile); 478 this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile);
479 this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier; 479 this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier;
480 } 480 }
481 catch (Exception e) 481 catch
482 { 482 {
483 Console.WriteLine("Unable to load default terrain, procedurally generating instead..."); 483 Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
484 Terrain.hills(); 484 Terrain.hills();
diff --git a/OpenSim/OpenSim.RegionServer/UDPServer.cs b/OpenSim/OpenSim.RegionServer/UDPServer.cs
index 6b3e7b1..f0d3367 100644
--- a/OpenSim/OpenSim.RegionServer/UDPServer.cs
+++ b/OpenSim/OpenSim.RegionServer/UDPServer.cs
@@ -135,7 +135,28 @@ namespace OpenSim.RegionServer
135 ipeSender = new IPEndPoint(IPAddress.Any, 0); 135 ipeSender = new IPEndPoint(IPAddress.Any, 0);
136 epSender = (EndPoint)ipeSender; 136 epSender = (EndPoint)ipeSender;
137 Packet packet = null; 137 Packet packet = null;
138 int numBytes = Server.EndReceiveFrom(result, ref epSender); 138
139 int numBytes;
140
141 try
142 {
143 numBytes = Server.EndReceiveFrom(result, ref epSender);
144 }
145 catch (SocketException e)
146 {
147 switch( e.SocketErrorCode )
148 {
149 case SocketError.NotConnected:
150 case SocketError.ConnectionReset:
151 // At this point, we should clear the client connection altogether.
152 // The app should hook a disconnect event into the UDPServer.
153 // But for now, just ignore it.
154 return;
155 default:
156 throw;
157 }
158 }
159
139 int packetEnd = numBytes - 1; 160 int packetEnd = numBytes - 1;
140 161
141 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer); 162 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
@@ -181,7 +202,7 @@ namespace OpenSim.RegionServer
181 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort); 202 ServerIncoming = new IPEndPoint(IPAddress.Any, listenPort);
182 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); 203 Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
183 Server.Bind(ServerIncoming); 204 Server.Bind(ServerIncoming);
184 205
185 m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen"); 206 m_console.Notice("UDPServer.cs:ServerListener() - UDP socket bound, getting ready to listen");
186 207
187 ipeSender = new IPEndPoint(IPAddress.Any, 0); 208 ipeSender = new IPEndPoint(IPAddress.Any, 0);