aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs10
-rw-r--r--OpenSim/Region/ClientStack/IClientNetworkServer.cs5
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs22
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs8
4 files changed, 30 insertions, 15 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 1f67c6a..7924421 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -453,7 +453,7 @@ namespace OpenSim
453 /// <param name="regionInfo"></param> 453 /// <param name="regionInfo"></param>
454 /// <param name="portadd_flag"></param> 454 /// <param name="portadd_flag"></param>
455 /// <returns></returns> 455 /// <returns></returns>
456 public LLUDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag) 456 public IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_flag)
457 { 457 {
458 return CreateRegion(regionInfo, portadd_flag, false); 458 return CreateRegion(regionInfo, portadd_flag, false);
459 } 459 }
@@ -464,7 +464,7 @@ namespace OpenSim
464 /// <param name="regionInfo"></param> 464 /// <param name="regionInfo"></param>
465 /// <param name="portadd_flag"></param> 465 /// <param name="portadd_flag"></param>
466 /// <returns></returns> 466 /// <returns></returns>
467 public LLUDPServer CreateRegion(RegionInfo regionInfo) 467 public IClientNetworkServer CreateRegion(RegionInfo regionInfo)
468 { 468 {
469 return CreateRegion(regionInfo, false, true); 469 return CreateRegion(regionInfo, false, true);
470 } 470 }
@@ -476,7 +476,7 @@ namespace OpenSim
476 /// <param name="portadd_flag"></param> 476 /// <param name="portadd_flag"></param>
477 /// <param name="do_post_init"></param> 477 /// <param name="do_post_init"></param>
478 /// <returns></returns> 478 /// <returns></returns>
479 public LLUDPServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init) 479 public IClientNetworkServer CreateRegion(RegionInfo regionInfo, bool portadd_flag, bool do_post_init)
480 { 480 {
481 int port = regionInfo.InternalEndPoint.Port; 481 int port = regionInfo.InternalEndPoint.Port;
482 482
@@ -496,7 +496,7 @@ namespace OpenSim
496 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); 496 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
497 } 497 }
498 498
499 LLUDPServer udpServer; 499 IClientNetworkServer udpServer;
500 Scene scene = SetupScene(regionInfo, proxyOffset, out udpServer, m_permissions); 500 Scene scene = SetupScene(regionInfo, proxyOffset, out udpServer, m_permissions);
501 501
502 m_log.Info("[MODULES]: Loading Region's modules"); 502 m_log.Info("[MODULES]: Loading Region's modules");
@@ -551,7 +551,7 @@ namespace OpenSim
551 551
552 m_clientServers.Add(udpServer); 552 m_clientServers.Add(udpServer);
553 m_regionData.Add(regionInfo); 553 m_regionData.Add(regionInfo);
554 udpServer.ServerListener(); 554 udpServer.Start();
555 555
556 if (do_post_init) 556 if (do_post_init)
557 { 557 {
diff --git a/OpenSim/Region/ClientStack/IClientNetworkServer.cs b/OpenSim/Region/ClientStack/IClientNetworkServer.cs
index f15404c..4f6f638 100644
--- a/OpenSim/Region/ClientStack/IClientNetworkServer.cs
+++ b/OpenSim/Region/ClientStack/IClientNetworkServer.cs
@@ -1,5 +1,6 @@
1using System.Net.Sockets; 1using System.Net.Sockets;
2using OpenSim.Framework; 2using OpenSim.Framework;
3using OpenSim.Region.Environment.Scenes;
3 4
4namespace OpenSim.Region.ClientStack 5namespace OpenSim.Region.ClientStack
5{ 6{
@@ -7,5 +8,9 @@ namespace OpenSim.Region.ClientStack
7 { 8 {
8 Socket Server { get; } 9 Socket Server { get; }
9 bool HandlesRegion(Location x); 10 bool HandlesRegion(Location x);
11 void AddScene(Scene x);
12
13 void Start();
14 void Stop();
10 } 15 }
11} \ No newline at end of file 16} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index f85dcc2..b5ace50 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -35,6 +35,7 @@ using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
37using OpenSim.Region.ClientStack.LindenUDP; 37using OpenSim.Region.ClientStack.LindenUDP;
38using OpenSim.Region.Environment.Scenes;
38 39
39namespace OpenSim.Region.ClientStack.LindenUDP 40namespace OpenSim.Region.ClientStack.LindenUDP
40{ 41{
@@ -95,6 +96,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
95 return x == m_location; 96 return x == m_location;
96 } 97 }
97 98
99 public void AddScene(Scene x)
100 {
101 LocalScene = x;
102 }
103
104 public void Start()
105 {
106 ServerListener();
107 }
108
109 public void Stop()
110 {
111 m_socket.Close();
112 }
113
98 public LLUDPServer() 114 public LLUDPServer()
99 { 115 {
100 } 116 }
@@ -318,12 +334,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
318 ack_it.Header.Reliable = false; 334 ack_it.Header.Reliable = false;
319 SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code); 335 SendPacketTo(ack_it.ToBytes(),ack_it.ToBytes().Length,SocketFlags.None,p.CircuitCode.Code);
320 } 336 }
321 else
322 {
323 // invalid client
324 //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now
325 //m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString());
326 }
327 } 337 }
328 catch (Exception) 338 catch (Exception)
329 { 339 {
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 1102fb4..3fa2371 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -107,12 +107,12 @@ namespace OpenSim.Region.ClientStack
107 return physicsPluginManager.GetPhysicsScene(engine, meshEngine); 107 return physicsPluginManager.GetPhysicsScene(engine, meshEngine);
108 } 108 }
109 109
110 protected Scene SetupScene(RegionInfo regionInfo, out LLUDPServer udpServer, bool m_permissions) 110 protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer udpServer, bool m_permissions)
111 { 111 {
112 return SetupScene(regionInfo, 0, out udpServer, m_permissions); 112 return SetupScene(regionInfo, 0, out udpServer, m_permissions);
113 } 113 }
114 114
115 protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out LLUDPServer udpServer, bool m_permissions) 115 protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out IClientNetworkServer udpServer, bool m_permissions)
116 { 116 {
117 AgentCircuitManager circuitManager = new AgentCircuitManager(); 117 AgentCircuitManager circuitManager = new AgentCircuitManager();
118 IPAddress listenIP = regionInfo.InternalEndPoint.Address; 118 IPAddress listenIP = regionInfo.InternalEndPoint.Address;
@@ -124,8 +124,8 @@ namespace OpenSim.Region.ClientStack
124 regionInfo.InternalEndPoint.Port = (int)port; 124 regionInfo.InternalEndPoint.Port = (int)port;
125 125
126 Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); 126 Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager);
127 127
128 udpServer.LocalScene = scene; 128 udpServer.AddScene(scene);
129 129
130 scene.LoadWorldMap(); 130 scene.LoadWorldMap();
131 131