diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
11 files changed, 92 insertions, 65 deletions
diff --git a/OpenSim/Region/ClientStack/ClientStackManager.cs b/OpenSim/Region/ClientStack/ClientStackManager.cs index 84ea0b3..299aabd 100644 --- a/OpenSim/Region/ClientStack/ClientStackManager.cs +++ b/OpenSim/Region/ClientStack/ClientStackManager.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Net; | 30 | using System.Net; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
@@ -38,39 +39,53 @@ namespace OpenSim.Region.ClientStack | |||
38 | { | 39 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 40 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
40 | 41 | ||
41 | private Type plugin; | 42 | private List<Type> plugin = new List<Type>(); |
42 | private Assembly pluginAssembly; | 43 | private List<Assembly> pluginAssembly = new List<Assembly>(); |
43 | 44 | ||
44 | public ClientStackManager(string dllName) | 45 | public ClientStackManager(string pDllName) |
45 | { | 46 | { |
46 | m_log.Info("[CLIENTSTACK]: Attempting to load " + dllName); | 47 | List<string> clientstacks = new List<string>(); |
47 | 48 | if (pDllName.Contains(",")) | |
48 | try | 49 | { |
50 | clientstacks = new List<string>(pDllName.Split(',')); | ||
51 | } | ||
52 | else | ||
49 | { | 53 | { |
50 | plugin = null; | 54 | clientstacks.Add(pDllName); |
51 | pluginAssembly = Assembly.LoadFrom(dllName); | 55 | } |
56 | foreach (string dllName in clientstacks) | ||
57 | { | ||
58 | m_log.Info("[CLIENTSTACK]: Attempting to load " + dllName); | ||
52 | 59 | ||
53 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 60 | try |
54 | { | 61 | { |
55 | if (pluginType.IsPublic) | 62 | //plugin = null; |
56 | { | 63 | Assembly itemAssembly = Assembly.LoadFrom(dllName); |
57 | Type typeInterface = pluginType.GetInterface("IClientNetworkServer", true); | 64 | pluginAssembly.Add(itemAssembly); |
58 | 65 | ||
59 | if (typeInterface != null) | 66 | foreach (Type pluginType in itemAssembly.GetTypes()) |
67 | { | ||
68 | if (pluginType.IsPublic) | ||
60 | { | 69 | { |
61 | m_log.Info("[CLIENTSTACK]: Added IClientNetworkServer Interface"); | 70 | Type typeInterface = pluginType.GetInterface("IClientNetworkServer", true); |
62 | plugin = pluginType; | 71 | |
63 | return; | 72 | if (typeInterface != null) |
73 | { | ||
74 | m_log.Info("[CLIENTSTACK]: Added IClientNetworkServer Interface"); | ||
75 | plugin.Add(pluginType); | ||
76 | break; | ||
77 | } | ||
64 | } | 78 | } |
65 | } | 79 | } |
66 | } | 80 | } |
67 | } catch (ReflectionTypeLoadException e) | 81 | catch (ReflectionTypeLoadException e) |
68 | { | ||
69 | foreach (Exception e2 in e.LoaderExceptions) | ||
70 | { | 82 | { |
71 | m_log.Error(e2.ToString()); | 83 | foreach (Exception e2 in e.LoaderExceptions) |
84 | { | ||
85 | m_log.Error(e2.ToString()); | ||
86 | } | ||
87 | throw e; | ||
72 | } | 88 | } |
73 | throw e; | ||
74 | } | 89 | } |
75 | } | 90 | } |
76 | 91 | ||
@@ -84,11 +99,11 @@ namespace OpenSim.Region.ClientStack | |||
84 | /// <param name="assetCache"></param> | 99 | /// <param name="assetCache"></param> |
85 | /// <param name="authenticateClass"></param> | 100 | /// <param name="authenticateClass"></param> |
86 | /// <returns></returns> | 101 | /// <returns></returns> |
87 | public IClientNetworkServer CreateServer( | 102 | public List<IClientNetworkServer> CreateServers( |
88 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, | 103 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, |
89 | AgentCircuitManager authenticateClass) | 104 | AgentCircuitManager authenticateClass) |
90 | { | 105 | { |
91 | return CreateServer( | 106 | return CreateServers( |
92 | _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass); | 107 | _listenIP, ref port, proxyPortOffset, allow_alternate_port, null, authenticateClass); |
93 | } | 108 | } |
94 | 109 | ||
@@ -105,20 +120,24 @@ namespace OpenSim.Region.ClientStack | |||
105 | /// <param name="assetCache"></param> | 120 | /// <param name="assetCache"></param> |
106 | /// <param name="authenticateClass"></param> | 121 | /// <param name="authenticateClass"></param> |
107 | /// <returns></returns> | 122 | /// <returns></returns> |
108 | public IClientNetworkServer CreateServer( | 123 | public List<IClientNetworkServer> CreateServers( |
109 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, | 124 | IPAddress _listenIP, ref uint port, int proxyPortOffset, bool allow_alternate_port, IConfigSource configSource, |
110 | AgentCircuitManager authenticateClass) | 125 | AgentCircuitManager authenticateClass) |
111 | { | 126 | { |
127 | List<IClientNetworkServer> servers = new List<IClientNetworkServer>(); | ||
112 | if (plugin != null) | 128 | if (plugin != null) |
113 | { | 129 | { |
114 | IClientNetworkServer server = | 130 | for (int i = 0; i < plugin.Count; i++) |
115 | (IClientNetworkServer)Activator.CreateInstance(pluginAssembly.GetType(plugin.ToString())); | 131 | { |
116 | 132 | IClientNetworkServer server = | |
117 | server.Initialise( | 133 | (IClientNetworkServer) Activator.CreateInstance(pluginAssembly[i].GetType(plugin[i].ToString())); |
118 | _listenIP, ref port, proxyPortOffset, allow_alternate_port, | 134 | |
119 | configSource, authenticateClass); | 135 | server.Initialise( |
120 | 136 | _listenIP, ref port, proxyPortOffset, allow_alternate_port, | |
121 | return server; | 137 | configSource, authenticateClass); |
138 | servers.Add(server); | ||
139 | } | ||
140 | return servers; | ||
122 | } | 141 | } |
123 | 142 | ||
124 | m_log.Error("[CLIENTSTACK]: Couldn't initialize a new server"); | 143 | m_log.Error("[CLIENTSTACK]: Couldn't initialize a new server"); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 248eab6..eadca9b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -105,7 +105,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
105 | private static readonly string m_ResourceCostSelectedPath = "0103/"; | 105 | private static readonly string m_ResourceCostSelectedPath = "0103/"; |
106 | private static readonly string m_UpdateAgentInformationPath = "0500/"; | 106 | private static readonly string m_UpdateAgentInformationPath = "0500/"; |
107 | 107 | ||
108 | |||
109 | // These are callbacks which will be setup by the scene so that we can update scene data when we | 108 | // These are callbacks which will be setup by the scene so that we can update scene data when we |
110 | // receive capability calls | 109 | // receive capability calls |
111 | public NewInventoryItem AddNewInventoryItem = null; | 110 | public NewInventoryItem AddNewInventoryItem = null; |
@@ -1449,7 +1448,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1449 | string param, IOSHttpRequest httpRequest, | 1448 | string param, IOSHttpRequest httpRequest, |
1450 | IOSHttpResponse httpResponse) | 1449 | IOSHttpResponse httpResponse) |
1451 | { | 1450 | { |
1452 | OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 1451 | // OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
1453 | OSDMap resp = new OSDMap(); | 1452 | OSDMap resp = new OSDMap(); |
1454 | 1453 | ||
1455 | OSDMap accessPrefs = new OSDMap(); | 1454 | OSDMap accessPrefs = new OSDMap(); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index d604cf6..ed8ec16 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | |||
@@ -44,7 +44,7 @@ using OpenSim.Tests.Common.Mock; | |||
44 | namespace OpenSim.Region.ClientStack.Linden.Tests | 44 | namespace OpenSim.Region.ClientStack.Linden.Tests |
45 | { | 45 | { |
46 | [TestFixture] | 46 | [TestFixture] |
47 | public class EventQueueTests | 47 | public class EventQueueTests : OpenSimTestCase |
48 | { | 48 | { |
49 | private TestScene m_scene; | 49 | private TestScene m_scene; |
50 | 50 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs index 060a61c..595d01a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index fcac182..79d56c4 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs | |||
@@ -56,8 +56,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionConsoleModule")] | 56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionConsoleModule")] |
57 | public class RegionConsoleModule : INonSharedRegionModule, IRegionConsole | 57 | public class RegionConsoleModule : INonSharedRegionModule, IRegionConsole |
58 | { | 58 | { |
59 | private static readonly ILog m_log = | 59 | // private static readonly ILog m_log = |
60 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 60 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
61 | 61 | ||
62 | private Scene m_scene; | 62 | private Scene m_scene; |
63 | private IEventQueue m_eventQueue; | 63 | private IEventQueue m_eventQueue; |
@@ -164,8 +164,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
164 | 164 | ||
165 | public class ConsoleHandler : BaseStreamHandler | 165 | public class ConsoleHandler : BaseStreamHandler |
166 | { | 166 | { |
167 | private static readonly ILog m_log = | 167 | // private static readonly ILog m_log = |
168 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 168 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
169 | 169 | ||
170 | private RegionConsoleModule m_consoleModule; | 170 | private RegionConsoleModule m_consoleModule; |
171 | private UUID m_agentID; | 171 | private UUID m_agentID; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 0388828..9c26afe 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3892,6 +3892,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3892 | { | 3892 | { |
3893 | part.Shape.LightEntry = false; | 3893 | part.Shape.LightEntry = false; |
3894 | } | 3894 | } |
3895 | |||
3896 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | ||
3897 | { | ||
3898 | // Ensure that mesh has at least 8 valid faces | ||
3899 | part.Shape.ProfileBegin = 12500; | ||
3900 | part.Shape.ProfileEnd = 0; | ||
3901 | part.Shape.ProfileHollow = 27500; | ||
3902 | } | ||
3895 | } | 3903 | } |
3896 | 3904 | ||
3897 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | 3905 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) |
@@ -6587,19 +6595,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6587 | #endregion | 6595 | #endregion |
6588 | 6596 | ||
6589 | AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; | 6597 | AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; |
6590 | if (handlerAgentRequestSit != null) | ||
6591 | if (!(agentRequestSit.AgentData == null | ||
6592 | || agentRequestSit.TargetObject == null | ||
6593 | || agentRequestSit.TargetObject.TargetID == null | ||
6594 | || agentRequestSit.TargetObject.Offset == null)) | ||
6595 | { | ||
6596 | var sp = m_scene.GetScenePresence(agentRequestSit.AgentData.AgentID); | ||
6597 | if (sp == null || sp.ParentID != 0) // ignore packet if agent is already sitting | ||
6598 | return true; | ||
6599 | 6598 | ||
6600 | handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, | 6599 | if (handlerAgentRequestSit != null) |
6601 | agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); | 6600 | handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, |
6602 | } | 6601 | agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); |
6603 | } | 6602 | } |
6604 | return true; | 6603 | return true; |
6605 | } | 6604 | } |
@@ -12254,11 +12253,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12254 | if (logPacket) | 12253 | if (logPacket) |
12255 | m_log.DebugFormat( | 12254 | m_log.DebugFormat( |
12256 | "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", | 12255 | "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}", |
12257 | Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type); | 12256 | Name, SceneAgent.IsChildAgent ? "child" : "root ", Scene.Name, packet.Type); |
12258 | } | 12257 | } |
12259 | 12258 | ||
12260 | if (!ProcessPacketMethod(packet)) | 12259 | if (!ProcessPacketMethod(packet)) |
12261 | m_log.Warn("[CLIENT]: unhandled packet " + packet.Type); | 12260 | m_log.WarnFormat( |
12261 | "[CLIENT]: Unhandled packet {0} from {1} ({2}) in {3}. Ignoring.", | ||
12262 | packet.Type, Name, SceneAgent.IsChildAgent ? "child" : "root ", Scene.Name); | ||
12262 | } | 12263 | } |
12263 | 12264 | ||
12264 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) | 12265 | private static PrimitiveBaseShape GetShapeFromAddPacket(ObjectAddPacket addPacket) |
@@ -12466,6 +12467,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
12466 | return String.Empty; | 12467 | return String.Empty; |
12467 | } | 12468 | } |
12468 | 12469 | ||
12470 | public OSDMap OReport(string uptime, string version) | ||
12471 | { | ||
12472 | return new OSDMap(); | ||
12473 | } | ||
12474 | |||
12469 | /// <summary> | 12475 | /// <summary> |
12470 | /// Make an asset request to the asset service in response to a client request. | 12476 | /// Make an asset request to the asset service in response to a client request. |
12471 | /// </summary> | 12477 | /// </summary> |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs index 2aeb4cc..7035e38 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs | |||
@@ -204,9 +204,12 @@ namespace OpenMetaverse | |||
204 | { | 204 | { |
205 | UDPPacketBuffer buf; | 205 | UDPPacketBuffer buf; |
206 | 206 | ||
207 | if (UsePools) | 207 | // FIXME: Disabled for now as this causes issues with reused packet objects interfering with each other |
208 | buf = Pool.GetObject(); | 208 | // on Windows with m_asyncPacketHandling = true, though this has not been seen on Linux. |
209 | else | 209 | // Possibly some unexpected issue with fetching UDP data concurrently with multiple threads. Requires more investigation. |
210 | // if (UsePools) | ||
211 | // buf = Pool.GetObject(); | ||
212 | // else | ||
210 | buf = new UDPPacketBuffer(); | 213 | buf = new UDPPacketBuffer(); |
211 | 214 | ||
212 | if (IsRunningInbound) | 215 | if (IsRunningInbound) |
@@ -287,8 +290,8 @@ namespace OpenMetaverse | |||
287 | catch (ObjectDisposedException) { } | 290 | catch (ObjectDisposedException) { } |
288 | finally | 291 | finally |
289 | { | 292 | { |
290 | if (UsePools) | 293 | // if (UsePools) |
291 | Pool.ReturnObject(buffer); | 294 | // Pool.ReturnObject(buffer); |
292 | 295 | ||
293 | // Synchronous mode waits until the packet callback completes | 296 | // Synchronous mode waits until the packet callback completes |
294 | // before starting the receive to fetch another packet | 297 | // before starting the receive to fetch another packet |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs index af2f6f8..98ef72f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs index 5fcf376..7d9f581 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/LLImageManagerTests.cs | |||
@@ -43,7 +43,7 @@ using OpenSim.Tests.Common.Mock; | |||
43 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests | 43 | namespace OpenSim.Region.ClientStack.LindenUDP.Tests |
44 | { | 44 | { |
45 | [TestFixture] | 45 | [TestFixture] |
46 | public class LLImageManagerTests | 46 | public class LLImageManagerTests : OpenSimTestCase |
47 | { | 47 | { |
48 | private AssetBase m_testImageAsset; | 48 | private AssetBase m_testImageAsset; |
49 | private Scene scene; | 49 | private Scene scene; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs index 0f88ec6..5f73a94 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs | |||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests | |||
39 | /// Tests for the LL packet handler | 39 | /// Tests for the LL packet handler |
40 | /// </summary> | 40 | /// </summary> |
41 | [TestFixture] | 41 | [TestFixture] |
42 | public class PacketHandlerTests | 42 | public class PacketHandlerTests : OpenSimTestCase |
43 | { | 43 | { |
44 | // [Test] | 44 | // [Test] |
45 | // /// <summary> | 45 | // /// <summary> |
diff --git a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs index e72bd86..0b6ee2f 100644 --- a/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ClientStack/Properties/AssemblyInfo.cs | |||
@@ -29,5 +29,5 @@ using System.Runtime.InteropServices; | |||
29 | // Build Number | 29 | // Build Number |
30 | // Revision | 30 | // Revision |
31 | // | 31 | // |
32 | [assembly: AssemblyVersion("0.7.5.*")] | 32 | [assembly: AssemblyVersion("0.7.6.*")] |
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | 33 | [assembly: AssemblyFileVersion("1.0.0.0")] |