diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 272 |
1 files changed, 18 insertions, 254 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 41e19fd..cb05e8f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -473,17 +473,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
473 | } | 473 | } |
474 | #endregion BinaryStats | 474 | #endregion BinaryStats |
475 | 475 | ||
476 | <<<<<<< HEAD | 476 | Throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps * 10e-3f); |
477 | // FIXME: Can't add info here because don't know scene yet. | ||
478 | // m_throttle | ||
479 | // = new TokenBucket( | ||
480 | // string.Format("server throttle bucket for {0}", Scene.Name), null, sceneThrottleBps); | ||
481 | |||
482 | Throttle = new TokenBucket("server throttle bucket", null, 0, sceneThrottleBps); | ||
483 | |||
484 | ======= | ||
485 | m_throttle = new TokenBucket(null, sceneThrottleBps, sceneThrottleBps * 10e-3f); | ||
486 | >>>>>>> avn/ubitvar | ||
487 | ThrottleRates = new ThrottleRates(configSource); | 477 | ThrottleRates = new ThrottleRates(configSource); |
488 | 478 | ||
489 | Random rnd = new Random(Util.EnvironmentTickCount()); | 479 | Random rnd = new Random(Util.EnvironmentTickCount()); |
@@ -784,151 +774,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
784 | if (UsePools) | 774 | if (UsePools) |
785 | EnablePoolStats(); | 775 | EnablePoolStats(); |
786 | 776 | ||
787 | <<<<<<< HEAD | 777 | |
788 | LLUDPServerCommands commands = new LLUDPServerCommands(MainConsole.Instance, this); | 778 | LLUDPServerCommands commands = new LLUDPServerCommands(MainConsole.Instance, this); |
789 | commands.Register(); | 779 | commands.Register(); |
790 | ======= | ||
791 | MainConsole.Instance.Commands.AddCommand( | ||
792 | "Debug", false, "debug lludp packet", | ||
793 | "debug lludp packet [--default] <level> [<avatar-first-name> <avatar-last-name>]", | ||
794 | "Turn on packet debugging", | ||
795 | "If level > 255 then all incoming and outgoing packets are logged.\n" | ||
796 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" | ||
797 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" | ||
798 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" | ||
799 | + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" | ||
800 | + "If level <= 0 then no packets are logged.\n" | ||
801 | + "If --default is specified then the level becomes the default logging level for all subsequent agents.\n" | ||
802 | + "In this case, you cannot also specify an avatar name.\n" | ||
803 | + "If an avatar name is given then only packets from that avatar are logged.", | ||
804 | HandlePacketCommand); | ||
805 | |||
806 | MainConsole.Instance.Commands.AddCommand( | ||
807 | "Debug", | ||
808 | false, | ||
809 | "debug lludp start", | ||
810 | "debug lludp start <in|out|all>", | ||
811 | "Control LLUDP packet processing.", | ||
812 | "No effect if packet processing has already started.\n" | ||
813 | + "in - start inbound processing.\n" | ||
814 | + "out - start outbound processing.\n" | ||
815 | + "all - start in and outbound processing.\n", | ||
816 | HandleStartCommand); | ||
817 | |||
818 | MainConsole.Instance.Commands.AddCommand( | ||
819 | "Debug", | ||
820 | false, | ||
821 | "debug lludp stop", | ||
822 | "debug lludp stop <in|out|all>", | ||
823 | "Stop LLUDP packet processing.", | ||
824 | "No effect if packet processing has already stopped.\n" | ||
825 | + "in - stop inbound processing.\n" | ||
826 | + "out - stop outbound processing.\n" | ||
827 | + "all - stop in and outbound processing.\n", | ||
828 | HandleStopCommand); | ||
829 | |||
830 | MainConsole.Instance.Commands.AddCommand( | ||
831 | "Debug", | ||
832 | false, | ||
833 | "debug lludp pool", | ||
834 | "debug lludp pool <on|off>", | ||
835 | "Turn object pooling within the lludp component on or off.", | ||
836 | HandlePoolCommand); | ||
837 | |||
838 | MainConsole.Instance.Commands.AddCommand( | ||
839 | "Debug", | ||
840 | false, | ||
841 | "debug lludp status", | ||
842 | "debug lludp status", | ||
843 | "Return status of LLUDP packet processing.", | ||
844 | HandleStatusCommand); | ||
845 | /* disabled | ||
846 | MainConsole.Instance.Commands.AddCommand( | ||
847 | "Debug", | ||
848 | false, | ||
849 | "debug lludp toggle agentupdate", | ||
850 | "debug lludp toggle agentupdate", | ||
851 | "Toggle whether agentupdate packets are processed or simply discarded.", | ||
852 | HandleAgentUpdateCommand); | ||
853 | */ | ||
854 | } | ||
855 | |||
856 | private void HandlePacketCommand(string module, string[] args) | ||
857 | { | ||
858 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) | ||
859 | return; | ||
860 | |||
861 | bool setAsDefaultLevel = false; | ||
862 | OptionSet optionSet = new OptionSet().Add("default", o => setAsDefaultLevel = o != null); | ||
863 | List<string> filteredArgs = optionSet.Parse(args); | ||
864 | |||
865 | string name = null; | ||
866 | |||
867 | if (filteredArgs.Count == 6) | ||
868 | { | ||
869 | if (!setAsDefaultLevel) | ||
870 | { | ||
871 | name = string.Format("{0} {1}", filteredArgs[4], filteredArgs[5]); | ||
872 | } | ||
873 | else | ||
874 | { | ||
875 | MainConsole.Instance.OutputFormat("ERROR: Cannot specify a user name when setting default logging level"); | ||
876 | return; | ||
877 | } | ||
878 | } | ||
879 | |||
880 | if (filteredArgs.Count > 3) | ||
881 | { | ||
882 | int newDebug; | ||
883 | if (int.TryParse(filteredArgs[3], out newDebug)) | ||
884 | { | ||
885 | if (setAsDefaultLevel) | ||
886 | { | ||
887 | DefaultClientPacketDebugLevel = newDebug; | ||
888 | MainConsole.Instance.OutputFormat( | ||
889 | "Debug packet debug for new clients set to {0} in {1}", DefaultClientPacketDebugLevel, m_scene.Name); | ||
890 | } | ||
891 | else | ||
892 | { | ||
893 | m_scene.ForEachScenePresence(sp => | ||
894 | { | ||
895 | if (name == null || sp.Name == name) | ||
896 | { | ||
897 | MainConsole.Instance.OutputFormat( | ||
898 | "Packet debug for {0} ({1}) set to {2} in {3}", | ||
899 | sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_scene.Name); | ||
900 | |||
901 | sp.ControllingClient.DebugPacketLevel = newDebug; | ||
902 | } | ||
903 | }); | ||
904 | } | ||
905 | } | ||
906 | else | ||
907 | { | ||
908 | MainConsole.Instance.Output("Usage: debug lludp packet [--default] 0..255 [<first-name> <last-name>]"); | ||
909 | } | ||
910 | } | ||
911 | } | ||
912 | 780 | ||
913 | private void HandleStartCommand(string module, string[] args) | ||
914 | { | ||
915 | if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) | ||
916 | return; | ||
917 | |||
918 | if (args.Length != 4) | ||
919 | { | ||
920 | MainConsole.Instance.Output("Usage: debug lludp start <in|out|all>"); | ||
921 | return; | ||
922 | } | ||
923 | |||
924 | string subCommand = args[3]; | ||
925 | |||
926 | if (subCommand == "in" || subCommand == "all") | ||
927 | StartInbound(); | ||
928 | |||
929 | if (subCommand == "out" || subCommand == "all") | ||
930 | StartOutbound(); | ||
931 | >>>>>>> avn/ubitvar | ||
932 | } | 781 | } |
933 | 782 | ||
934 | public bool HandlesRegion(Location x) | 783 | public bool HandlesRegion(Location x) |
@@ -1126,36 +975,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1126 | // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will | 975 | // If a Linden Lab 1.23.5 client receives an update packet after a kill packet for an object, it will |
1127 | // continue to display the deleted object until relog. Therefore, we need to always queue a kill object | 976 | // continue to display the deleted object until relog. Therefore, we need to always queue a kill object |
1128 | // packet so that it isn't sent before a queued update packet. | 977 | // packet so that it isn't sent before a queued update packet. |
1129 | <<<<<<< HEAD | ||
1130 | bool forceQueue = (type == PacketType.KillObject); | ||
1131 | 978 | ||
1132 | // if (type == PacketType.ImprovedTerseObjectUpdate) | ||
1133 | // { | ||
1134 | // m_log.DebugFormat("Direct send ITOU to {0} in {1}", udpClient.AgentID, Scene.Name); | ||
1135 | // SendPacketFinal(outgoingPacket); | ||
1136 | // return false; | ||
1137 | // } | ||
1138 | // else | ||
1139 | // { | ||
1140 | if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, forceQueue)) | ||
1141 | ======= | ||
1142 | bool requestQueue = type == PacketType.KillObject; | 979 | bool requestQueue = type == PacketType.KillObject; |
1143 | if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue, highPriority)) | 980 | if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue, highPriority)) |
1144 | >>>>>>> avn/ubitvar | ||
1145 | { | 981 | { |
1146 | SendPacketFinal(outgoingPacket); | 982 | SendPacketFinal(outgoingPacket); |
1147 | return true; | 983 | return true; |
1148 | } | 984 | } |
1149 | <<<<<<< HEAD | ||
1150 | else | ||
1151 | { | ||
1152 | return false; | ||
1153 | } | ||
1154 | // } | ||
1155 | ======= | ||
1156 | 985 | ||
1157 | return false; | 986 | return false; |
1158 | >>>>>>> avn/ubitvar | ||
1159 | 987 | ||
1160 | #endregion Queue or Send | 988 | #endregion Queue or Send |
1161 | } | 989 | } |
@@ -1462,7 +1290,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1462 | 1290 | ||
1463 | // If there is already a client for this endpoint, don't process UseCircuitCode | 1291 | // If there is already a client for this endpoint, don't process UseCircuitCode |
1464 | IClientAPI client = null; | 1292 | IClientAPI client = null; |
1465 | if (!m_scene.TryGetClient(endPoint, out client) || !(client is LLClientView)) | 1293 | if (!Scene.TryGetClient(endPoint, out client) || !(client is LLClientView)) |
1466 | { | 1294 | { |
1467 | // UseCircuitCode handling | 1295 | // UseCircuitCode handling |
1468 | if (packet.Type == PacketType.UseCircuitCode) | 1296 | if (packet.Type == PacketType.UseCircuitCode) |
@@ -1473,12 +1301,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1473 | if (m_pendingCache.Contains(endPoint)) | 1301 | if (m_pendingCache.Contains(endPoint)) |
1474 | return; | 1302 | return; |
1475 | 1303 | ||
1476 | <<<<<<< HEAD | ||
1477 | Util.FireAndForget(HandleUseCircuitCode, array, "LLUDPServer.HandleUseCircuitCode"); | ||
1478 | ======= | ||
1479 | m_pendingCache.AddOrUpdate(endPoint, new Queue<UDPPacketBuffer>(), 60); | 1304 | m_pendingCache.AddOrUpdate(endPoint, new Queue<UDPPacketBuffer>(), 60); |
1480 | } | 1305 | } |
1481 | >>>>>>> avn/ubitvar | ||
1482 | 1306 | ||
1483 | // We need to copy the endpoint so that it doesn't get changed when another thread reuses the | 1307 | // We need to copy the endpoint so that it doesn't get changed when another thread reuses the |
1484 | // buffer. | 1308 | // buffer. |
@@ -1507,14 +1331,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1507 | // Send ack straight away to let the viewer know that we got it. | 1331 | // Send ack straight away to let the viewer know that we got it. |
1508 | SendAckImmediate(endPoint, packet.Header.Sequence); | 1332 | SendAckImmediate(endPoint, packet.Header.Sequence); |
1509 | 1333 | ||
1510 | <<<<<<< HEAD | ||
1511 | Util.FireAndForget( | ||
1512 | HandleCompleteMovementIntoRegion, array, "LLUDPServer.HandleCompleteMovementIntoRegion"); | ||
1513 | ======= | ||
1514 | // We need to copy the endpoint so that it doesn't get changed when another thread reuses the | 1334 | // We need to copy the endpoint so that it doesn't get changed when another thread reuses the |
1515 | // buffer. | 1335 | // buffer. |
1516 | object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; | 1336 | object[] array = new object[] { new IPEndPoint(endPoint.Address, endPoint.Port), packet }; |
1517 | >>>>>>> avn/ubitvar | ||
1518 | 1337 | ||
1519 | Util.FireAndForget(HandleCompleteMovementIntoRegion, array); | 1338 | Util.FireAndForget(HandleCompleteMovementIntoRegion, array); |
1520 | 1339 | ||
@@ -1524,12 +1343,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1524 | } | 1343 | } |
1525 | 1344 | ||
1526 | // Determine which agent this packet came from | 1345 | // Determine which agent this packet came from |
1527 | <<<<<<< HEAD | ||
1528 | IClientAPI client; | ||
1529 | if (!Scene.TryGetClient(endPoint, out client) || !(client is LLClientView)) | ||
1530 | ======= | ||
1531 | if (client == null || !(client is LLClientView)) | 1346 | if (client == null || !(client is LLClientView)) |
1532 | >>>>>>> avn/ubitvar | ||
1533 | { | 1347 | { |
1534 | //m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); | 1348 | //m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet from an unrecognized source: " + address + " in " + m_scene.RegionInfo.RegionName); |
1535 | 1349 | ||
@@ -1547,7 +1361,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1547 | 1361 | ||
1548 | if (!udpClient.IsConnected) | 1362 | if (!udpClient.IsConnected) |
1549 | { | 1363 | { |
1550 | m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet for a unConnected client in " + m_scene.RegionInfo.RegionName); | 1364 | m_log.Debug("[LLUDPSERVER]: Received a " + packet.Type + " packet for a unConnected client in " + Scene.RegionInfo.RegionName); |
1551 | return; | 1365 | return; |
1552 | } | 1366 | } |
1553 | 1367 | ||
@@ -1652,28 +1466,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1652 | LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length); | 1466 | LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length); |
1653 | #endregion BinaryStats | 1467 | #endregion BinaryStats |
1654 | 1468 | ||
1655 | <<<<<<< HEAD | ||
1656 | if (packet.Type == PacketType.AgentUpdate) | ||
1657 | { | ||
1658 | if (DiscardInboundAgentUpdates) | ||
1659 | return; | ||
1660 | |||
1661 | ((LLClientView)client).TotalAgentUpdates++; | ||
1662 | 1469 | ||
1663 | AgentUpdatePacket agentUpdate = (AgentUpdatePacket)packet; | 1470 | //Ubit AgentUpdate mess removed from here |
1664 | 1471 | ||
1665 | LLClientView llClient = client as LLClientView; | ||
1666 | if (agentUpdate.AgentData.SessionID != client.SessionId | ||
1667 | || agentUpdate.AgentData.AgentID != client.AgentId | ||
1668 | || !(llClient == null || llClient.CheckAgentUpdateSignificance(agentUpdate.AgentData)) ) | ||
1669 | { | ||
1670 | PacketPool.Instance.ReturnPacket(packet); | ||
1671 | return; | ||
1672 | } | ||
1673 | } | ||
1674 | ======= | ||
1675 | // AgentUpdate mess removed from here | ||
1676 | >>>>>>> avn/ubitvar | ||
1677 | 1472 | ||
1678 | #region Ping Check Handling | 1473 | #region Ping Check Handling |
1679 | 1474 | ||
@@ -1853,7 +1648,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1853 | AuthenticateResponse sessionInfo; | 1648 | AuthenticateResponse sessionInfo; |
1854 | if (IsClientAuthorized(uccp, out sessionInfo)) | 1649 | if (IsClientAuthorized(uccp, out sessionInfo)) |
1855 | { | 1650 | { |
1856 | AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); | 1651 | AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); |
1857 | 1652 | ||
1858 | // Begin the process of adding the client to the simulator | 1653 | // Begin the process of adding the client to the simulator |
1859 | client | 1654 | client |
@@ -1868,7 +1663,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1868 | // an existing child agent, and there is no circuit data | 1663 | // an existing child agent, and there is no circuit data |
1869 | if (client != null && aCircuit == null) | 1664 | if (client != null && aCircuit == null) |
1870 | { | 1665 | { |
1871 | m_scene.CloseAgent(client.AgentId, true); | 1666 | Scene.CloseAgent(client.AgentId, true); |
1872 | return; | 1667 | return; |
1873 | } | 1668 | } |
1874 | 1669 | ||
@@ -1908,14 +1703,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1908 | // We only want to send initial data to new clients, not ones which are being converted from child to root. | 1703 | // We only want to send initial data to new clients, not ones which are being converted from child to root. |
1909 | if (client != null) | 1704 | if (client != null) |
1910 | { | 1705 | { |
1911 | <<<<<<< HEAD | ||
1912 | AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); | ||
1913 | ======= | ||
1914 | >>>>>>> avn/ubitvar | ||
1915 | bool tp = (aCircuit.teleportFlags > 0); | 1706 | bool tp = (aCircuit.teleportFlags > 0); |
1916 | // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from | 1707 | // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from |
1917 | if (!tp && !client.SceneAgent.SentInitialDataToClient) | 1708 | if (!tp) |
1918 | client.SceneAgent.SendInitialDataToClient(); | 1709 | client.SceneAgent.SendInitialDataToMe(); |
1919 | } | 1710 | } |
1920 | } | 1711 | } |
1921 | else | 1712 | else |
@@ -1923,17 +1714,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1923 | // Don't create clients for unauthorized requesters. | 1714 | // Don't create clients for unauthorized requesters. |
1924 | m_log.WarnFormat( | 1715 | m_log.WarnFormat( |
1925 | "[LLUDPSERVER]: Ignoring connection request for {0} to {1} with unknown circuit code {2} from IP {3}", | 1716 | "[LLUDPSERVER]: Ignoring connection request for {0} to {1} with unknown circuit code {2} from IP {3}", |
1926 | <<<<<<< HEAD | 1717 | |
1927 | uccp.CircuitCode.ID, Scene.RegionInfo.RegionName, uccp.CircuitCode.Code, endPoint); | 1718 | uccp.CircuitCode.ID, Scene.RegionInfo.RegionName, uccp.CircuitCode.Code, endPoint); |
1928 | } | ||
1929 | |||
1930 | ======= | ||
1931 | uccp.CircuitCode.ID, m_scene.RegionInfo.RegionName, uccp.CircuitCode.Code, endPoint); | ||
1932 | 1719 | ||
1933 | lock (m_pendingCache) | 1720 | lock (m_pendingCache) |
1934 | m_pendingCache.Remove(endPoint); | 1721 | m_pendingCache.Remove(endPoint); |
1935 | } | 1722 | } |
1936 | >>>>>>> avn/ubitvar | 1723 | |
1937 | // m_log.DebugFormat( | 1724 | // m_log.DebugFormat( |
1938 | // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", | 1725 | // "[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms", |
1939 | // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | 1726 | // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); |
@@ -2127,24 +1914,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2127 | { | 1914 | { |
2128 | if (!Scene.TryGetClient(agentID, out client)) | 1915 | if (!Scene.TryGetClient(agentID, out client)) |
2129 | { | 1916 | { |
2130 | <<<<<<< HEAD | ||
2131 | LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); | ||
2132 | ======= | ||
2133 | createNew = true; | 1917 | createNew = true; |
2134 | } | 1918 | } |
2135 | else | 1919 | else |
2136 | { | 1920 | { |
2137 | if (client.SceneAgent == null) | 1921 | if (client.SceneAgent == null) |
2138 | { | 1922 | { |
2139 | m_scene.CloseAgent(agentID, true); | 1923 | Scene.CloseAgent(agentID, true); |
2140 | createNew = true; | 1924 | createNew = true; |
2141 | } | 1925 | } |
2142 | } | 1926 | } |
2143 | 1927 | ||
2144 | if (createNew) | 1928 | if (createNew) |
2145 | { | 1929 | { |
2146 | LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, m_throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); | 1930 | LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO); |
2147 | >>>>>>> avn/ubitvar | 1931 | |
2148 | 1932 | ||
2149 | client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); | 1933 | client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); |
2150 | client.OnLogout += LogoutHandler; | 1934 | client.OnLogout += LogoutHandler; |
@@ -2174,29 +1958,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2174 | { | 1958 | { |
2175 | ClientLogoutsDueToNoReceives++; | 1959 | ClientLogoutsDueToNoReceives++; |
2176 | 1960 | ||
2177 | <<<<<<< HEAD | ||
2178 | m_log.WarnFormat( | ||
2179 | "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", | ||
2180 | client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name); | ||
2181 | ======= | ||
2182 | if (client.SceneAgent != null) | 1961 | if (client.SceneAgent != null) |
2183 | { | 1962 | { |
2184 | m_log.WarnFormat( | 1963 | m_log.WarnFormat( |
2185 | "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", | 1964 | "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", |
2186 | client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, m_scene.Name); | 1965 | client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, Scene.Name); |
2187 | >>>>>>> avn/ubitvar | ||
2188 | 1966 | ||
2189 | if (!client.SceneAgent.IsChildAgent) | 1967 | if (!client.SceneAgent.IsChildAgent) |
2190 | client.Kick("Simulator logged you out due to connection timeout."); | 1968 | client.Kick("Simulator logged you out due to connection timeout."); |
2191 | } | 1969 | } |
2192 | } | 1970 | } |
2193 | 1971 | ||
2194 | <<<<<<< HEAD | 1972 | if (!Scene.CloseAgent(client.AgentId, true)) |
2195 | Scene.CloseAgent(client.AgentId, true); | ||
2196 | ======= | ||
2197 | if (!m_scene.CloseAgent(client.AgentId, true)) | ||
2198 | client.Close(true,true); | 1973 | client.Close(true,true); |
2199 | >>>>>>> avn/ubitvar | ||
2200 | } | 1974 | } |
2201 | 1975 | ||
2202 | private void IncomingPacketHandler() | 1976 | private void IncomingPacketHandler() |
@@ -2209,7 +1983,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2209 | 1983 | ||
2210 | while (IsRunningInbound) | 1984 | while (IsRunningInbound) |
2211 | { | 1985 | { |
2212 | m_scene.ThreadAlive(1); | 1986 | Scene.ThreadAlive(1); |
2213 | try | 1987 | try |
2214 | { | 1988 | { |
2215 | IncomingPacket incomingPacket = null; | 1989 | IncomingPacket incomingPacket = null; |
@@ -2261,7 +2035,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2261 | 2035 | ||
2262 | while (base.IsRunningOutbound) | 2036 | while (base.IsRunningOutbound) |
2263 | { | 2037 | { |
2264 | m_scene.ThreadAlive(2); | 2038 | Scene.ThreadAlive(2); |
2265 | try | 2039 | try |
2266 | { | 2040 | { |
2267 | m_packetSent = false; | 2041 | m_packetSent = false; |
@@ -2524,15 +2298,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2524 | { | 2298 | { |
2525 | m_currentIncomingClient = null; | 2299 | m_currentIncomingClient = null; |
2526 | } | 2300 | } |
2527 | <<<<<<< HEAD | ||
2528 | } | ||
2529 | else | ||
2530 | { | ||
2531 | m_log.DebugFormat( | ||
2532 | "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", | ||
2533 | packet.Type, client.Name, Scene.RegionInfo.RegionName); | ||
2534 | } | ||
2535 | ======= | ||
2536 | // } | 2301 | // } |
2537 | // else | 2302 | // else |
2538 | // { | 2303 | // { |
@@ -2540,7 +2305,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2540 | // "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", | 2305 | // "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", |
2541 | // packet.Type, client.Name, m_scene.RegionInfo.RegionName); | 2306 | // packet.Type, client.Name, m_scene.RegionInfo.RegionName); |
2542 | // } | 2307 | // } |
2543 | >>>>>>> avn/ubitvar | ||
2544 | 2308 | ||
2545 | IncomingPacketsProcessed++; | 2309 | IncomingPacketsProcessed++; |
2546 | } | 2310 | } |