aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/CheckSumServer.cs100
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs39
-rw-r--r--OpenSim/Region/Application/OpenSimMainConsole.cs1
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs2
7 files changed, 21 insertions, 135 deletions
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs
index 86bdfba..63059f0 100644
--- a/OpenSim/Framework/Servers/CheckSumServer.cs
+++ b/OpenSim/Framework/Servers/CheckSumServer.cs
@@ -24,103 +24,3 @@
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27
28namespace OpenSim.Framework.Servers
29{
30 /*
31 public class CheckSumServer : UDPServerBase
32 {
33 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
34
35 public CheckSumServer(int port)
36 : base(port)
37 {
38 }
39
40 protected override void OnReceivedData(IAsyncResult result)
41 {
42 ipeSender = new IPEndPoint(IPAddress.Any, 0);
43 epSender = (EndPoint)ipeSender;
44 Packet packet = null;
45 int numBytes = Server.EndReceiveFrom(result, ref epSender);
46 int packetEnd = numBytes - 1;
47
48 packet = Packet.BuildPacket(RecvBuffer, ref packetEnd, ZeroBuffer);
49
50 if (packet.Type == PacketType.SecuredTemplateChecksumRequest)
51 {
52 SecuredTemplateChecksumRequestPacket checksum = (SecuredTemplateChecksumRequestPacket)packet;
53 TemplateChecksumReplyPacket checkreply = new TemplateChecksumReplyPacket();
54 checkreply.DataBlock.Checksum = 3220703154;//180572585;
55 checkreply.DataBlock.Flags = 0;
56 checkreply.DataBlock.MajorVersion = 1;
57 checkreply.DataBlock.MinorVersion = 15;
58 checkreply.DataBlock.PatchVersion = 0;
59 checkreply.DataBlock.ServerVersion = 0;
60 checkreply.TokenBlock.Token = checksum.TokenBlock.Token;
61 this.SendPacket(checkreply, epSender);
62
63 /*
64 //if we wanted to echo the the checksum/ version from the client (so that any client worked)
65 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket();
66 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
67 this.SendPacket(checkrequest, epSender);
68
69 }
70 else if (packet.Type == PacketType.TemplateChecksumReply)
71 {
72 //echo back the client checksum reply (Hegemon's method)
73 TemplateChecksumReplyPacket checksum2 = (TemplateChecksumReplyPacket)packet;
74 TemplateChecksumReplyPacket checkreply2 = new TemplateChecksumReplyPacket();
75 checkreply2.DataBlock.Checksum = checksum2.DataBlock.Checksum;
76 checkreply2.DataBlock.Flags = checksum2.DataBlock.Flags;
77 checkreply2.DataBlock.MajorVersion = checksum2.DataBlock.MajorVersion;
78 checkreply2.DataBlock.MinorVersion = checksum2.DataBlock.MinorVersion;
79 checkreply2.DataBlock.PatchVersion = checksum2.DataBlock.PatchVersion;
80 checkreply2.DataBlock.ServerVersion = checksum2.DataBlock.ServerVersion;
81 checkreply2.TokenBlock.Token = checksum2.TokenBlock.Token;
82 this.SendPacket(checkreply2, epSender);
83 }
84 else
85 {
86 }
87
88 Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null);
89 }
90
91 private void SendPacket(Packet Pack, EndPoint endp)
92 {
93 if (!Pack.Header.Resent)
94 {
95 Pack.Header.Sequence = 1;
96 }
97
98 byte[] ZeroOutBuffer = new byte[4096];
99 byte[] sendbuffer;
100 sendbuffer = Pack.ToBytes();
101
102 try
103 {
104 if (Pack.Header.Zerocoded)
105 {
106 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
107 this.SendPackTo(ZeroOutBuffer, packetsize, SocketFlags.None, endp);
108 }
109 else
110 {
111 this.SendPackTo(sendbuffer, sendbuffer.Length, SocketFlags.None, endp);
112 }
113 }
114 catch (Exception)
115 {
116 m_log.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection ");
117 }
118 }
119
120 private void SendPackTo(byte[] buffer, int size, SocketFlags flags, EndPoint endp)
121 {
122 this.Server.SendTo(buffer, size, flags, endp);
123 }
124 * }
125 */
126}
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 7924421..5b44813 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -40,7 +40,6 @@ using OpenSim.Framework.Communications.Cache;
40using OpenSim.Framework.Servers; 40using OpenSim.Framework.Servers;
41using OpenSim.Framework.Statistics; 41using OpenSim.Framework.Statistics;
42using OpenSim.Region.ClientStack; 42using OpenSim.Region.ClientStack;
43using OpenSim.Region.ClientStack.LindenUDP;
44using OpenSim.Region.Communications.Local; 43using OpenSim.Region.Communications.Local;
45using OpenSim.Region.Communications.OGS1; 44using OpenSim.Region.Communications.OGS1;
46using OpenSim.Region.Environment; 45using OpenSim.Region.Environment;
@@ -106,7 +105,7 @@ namespace OpenSim
106 get { return m_httpServer; } 105 get { return m_httpServer; }
107 } 106 }
108 107
109 public List<IClientNetworkServer> UdpServers 108 public List<IClientNetworkServer> ClientServers
110 { 109 {
111 get { return m_clientServers; } 110 get { return m_clientServers; }
112 } 111 }
@@ -409,12 +408,6 @@ namespace OpenSim
409 plugin.Initialise(this); 408 plugin.Initialise(this);
410 m_plugins.Add(plugin); 409 m_plugins.Add(plugin);
411 } 410 }
412
413 // Start UDP servers
414 //for (int i = 0; i < m_udpServers.Count; i++)
415 //{
416 // m_udpServers[i].ServerListener();
417 // }
418 } 411 }
419 412
420 protected override void Initialize() 413 protected override void Initialize()
@@ -496,8 +489,8 @@ namespace OpenSim
496 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); 489 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
497 } 490 }
498 491
499 IClientNetworkServer udpServer; 492 IClientNetworkServer clientServer;
500 Scene scene = SetupScene(regionInfo, proxyOffset, out udpServer, m_permissions); 493 Scene scene = SetupScene(regionInfo, proxyOffset, out clientServer, m_permissions);
501 494
502 m_log.Info("[MODULES]: Loading Region's modules"); 495 m_log.Info("[MODULES]: Loading Region's modules");
503 496
@@ -549,9 +542,9 @@ namespace OpenSim
549 542
550 m_sceneManager.Add(scene); 543 m_sceneManager.Add(scene);
551 544
552 m_clientServers.Add(udpServer); 545 m_clientServers.Add(clientServer);
553 m_regionData.Add(regionInfo); 546 m_regionData.Add(regionInfo);
554 udpServer.Start(); 547 clientServer.Start();
555 548
556 if (do_post_init) 549 if (do_post_init)
557 { 550 {
@@ -561,7 +554,7 @@ namespace OpenSim
561 } 554 }
562 } 555 }
563 556
564 return udpServer; 557 return clientServer;
565 } 558 }
566 559
567 protected override StorageManager CreateStorageManager(string connectionstring) 560 protected override StorageManager CreateStorageManager(string connectionstring)
@@ -583,24 +576,23 @@ namespace OpenSim
583 public void handleRestartRegion(RegionInfo whichRegion) 576 public void handleRestartRegion(RegionInfo whichRegion)
584 { 577 {
585 m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager"); 578 m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager");
586 // Shutting down the UDP server 579 // Shutting down the client server
587 bool foundUDPServer = false; 580 bool foundClientServer = false;
588 int UDPServerElement = 0; 581 int clientServerElement = 0;
589 582
590 for (int i = 0; i < m_clientServers.Count; i++) 583 for (int i = 0; i < m_clientServers.Count; i++)
591 { 584 {
592 if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle))) 585 if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle)))
593 { 586 {
594 UDPServerElement = i; 587 clientServerElement = i;
595 foundUDPServer = true; 588 foundClientServer = true;
596 break; 589 break;
597 } 590 }
598 } 591 }
599 if (foundUDPServer) 592 if (foundClientServer)
600 { 593 {
601 // m_udpServers[UDPServerElement].Server.End 594 m_clientServers[clientServerElement].Server.Close();
602 m_clientServers[UDPServerElement].Server.Close(); 595 m_clientServers.RemoveAt(clientServerElement);
603 m_clientServers.RemoveAt(UDPServerElement);
604 } 596 }
605 597
606 //Removing the region from the sim's database of regions.. 598 //Removing the region from the sim's database of regions..
@@ -618,9 +610,6 @@ namespace OpenSim
618 } 610 }
619 611
620 CreateRegion(whichRegion, true); 612 CreateRegion(whichRegion, true);
621 //UDPServer restartingRegion = CreateRegion(whichRegion);
622 //restartingRegion.ServerListener();
623 //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle);
624 } 613 }
625 614
626 # region Setup methods 615 # region Setup methods
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs
index 586e2cb..38cae66 100644
--- a/OpenSim/Region/Application/OpenSimMainConsole.cs
+++ b/OpenSim/Region/Application/OpenSimMainConsole.cs
@@ -38,7 +38,6 @@ using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Console; 39using OpenSim.Framework.Console;
40using OpenSim.Framework.Statistics; 40using OpenSim.Framework.Statistics;
41using OpenSim.Region.ClientStack.LindenUDP;
42using OpenSim.Region.Environment.Interfaces; 41using OpenSim.Region.Environment.Interfaces;
43using OpenSim.Region.Environment.Scenes; 42using OpenSim.Region.Environment.Scenes;
44using Timer=System.Timers.Timer; 43using Timer=System.Timers.Timer;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 5d45d99..f4dd127 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4915,7 +4915,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4915 } 4915 }
4916 catch (Exception) 4916 catch (Exception)
4917 { 4917 {
4918 //MainLog.Instance.Debug("UDPSERVER", e.ToString()); 4918
4919 } 4919 }
4920 4920
4921 m_needAck.Add(key, packet); 4921 m_needAck.Add(key, packet);
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index 3fa2371..ba0b9b4 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 IClientNetworkServer udpServer, bool m_permissions) 110 protected Scene SetupScene(RegionInfo regionInfo, out IClientNetworkServer clientServer, bool m_permissions)
111 { 111 {
112 return SetupScene(regionInfo, 0, out udpServer, m_permissions); 112 return SetupScene(regionInfo, 0, out clientServer, m_permissions);
113 } 113 }
114 114
115 protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out IClientNetworkServer udpServer, bool m_permissions) 115 protected Scene SetupScene(RegionInfo regionInfo, int proxyOffset, out IClientNetworkServer clientServer, 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;
@@ -120,12 +120,12 @@ namespace OpenSim.Region.ClientStack
120 // listenIP = IPAddress.Parse("0.0.0.0"); 120 // listenIP = IPAddress.Parse("0.0.0.0");
121 121
122 uint port = (uint) regionInfo.InternalEndPoint.Port; 122 uint port = (uint) regionInfo.InternalEndPoint.Port;
123 udpServer = new LLUDPServer(listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager); 123 clientServer = new LLUDPServer(listenIP, ref port, proxyOffset, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager);
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.AddScene(scene); 128 clientServer.AddScene(scene);
129 129
130 scene.LoadWorldMap(); 130 scene.LoadWorldMap();
131 131
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 532d646..7d66bf4 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1594,8 +1594,6 @@ namespace OpenSim.Region.Environment.Scenes
1594 client.OnMoveInventoryItem += MoveInventoryItem; 1594 client.OnMoveInventoryItem += MoveInventoryItem;
1595 client.OnRemoveInventoryItem += RemoveInventoryItem; 1595 client.OnRemoveInventoryItem += RemoveInventoryItem;
1596 client.OnRemoveInventoryFolder += RemoveInventoryFolder; 1596 client.OnRemoveInventoryFolder += RemoveInventoryFolder;
1597 // client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
1598 // client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
1599 client.OnRezScript += RezScript; 1597 client.OnRezScript += RezScript;
1600 1598
1601 client.OnRequestTaskInventory += RequestTaskInventory; 1599 client.OnRequestTaskInventory += RequestTaskInventory;
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 74e9cdc..6a50336 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -224,7 +224,7 @@ namespace OpenSim.Region.Environment.Scenes
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
227 /// This works out to be the ClientView object associated with this avatar, or it's UDP connection manager 227 /// This works out to be the ClientView object associated with this avatar, or it's client connection manager
228 /// </summary> 228 /// </summary>
229 private IClientAPI m_controllingClient; 229 private IClientAPI m_controllingClient;
230 230