diff options
author | John Hurliman | 2010-03-03 11:03:56 -0800 |
---|---|---|
committer | John Hurliman | 2010-03-03 11:03:56 -0800 |
commit | 94a3e60bd0b288e744f66347eafdaac70713a759 (patch) | |
tree | b89e4144876f6990459733af0345a8cce6453f07 /OpenSim | |
parent | * Fixed bad start position clamping in MakeRootAgent() (diff) | |
parent | Actually make EventManager.OnAttach() fire when an object is attached. Previ... (diff) | |
download | opensim-SC_OLD-94a3e60bd0b288e744f66347eafdaac70713a759.zip opensim-SC_OLD-94a3e60bd0b288e744f66347eafdaac70713a759.tar.gz opensim-SC_OLD-94a3e60bd0b288e744f66347eafdaac70713a759.tar.bz2 opensim-SC_OLD-94a3e60bd0b288e744f66347eafdaac70713a759.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/Base/ServiceBase.cs | 20 | ||||
-rw-r--r-- | OpenSim/Services/Friends/FriendsServiceBase.cs | 9 |
5 files changed, 41 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ef49205..569dc8d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -97,6 +97,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
97 | /// </summary> | 97 | /// </summary> |
98 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector | 98 | public class LLClientView : IClientAPI, IClientCore, IClientIM, IClientChat, IClientIPEndpoint, IStatsCollector |
99 | { | 99 | { |
100 | /// <value> | ||
101 | /// Debug packet level. At the moment, only 255 does anything (prints out all in and out packets). | ||
102 | /// </value> | ||
103 | protected int m_debugPacketLevel = 0; | ||
104 | |||
100 | #region Events | 105 | #region Events |
101 | 106 | ||
102 | public event GenericMessage OnGenericMessage; | 107 | public event GenericMessage OnGenericMessage; |
@@ -472,6 +477,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
472 | 477 | ||
473 | public void SetDebugPacketLevel(int newDebug) | 478 | public void SetDebugPacketLevel(int newDebug) |
474 | { | 479 | { |
480 | m_debugPacketLevel = newDebug; | ||
475 | } | 481 | } |
476 | 482 | ||
477 | #region Client Methods | 483 | #region Client Methods |
@@ -10952,7 +10958,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10952 | LLUDPServer.LogPacketHeader(false, m_circuitCode, 0, packet.Type, (ushort)packet.Length); | 10958 | LLUDPServer.LogPacketHeader(false, m_circuitCode, 0, packet.Type, (ushort)packet.Length); |
10953 | #endregion BinaryStats | 10959 | #endregion BinaryStats |
10954 | 10960 | ||
10955 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true); | 10961 | OutPacket(packet, throttlePacketType, true); |
10956 | } | 10962 | } |
10957 | 10963 | ||
10958 | /// <summary> | 10964 | /// <summary> |
@@ -10965,6 +10971,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10965 | /// handles splitting manually</param> | 10971 | /// handles splitting manually</param> |
10966 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) | 10972 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType, bool doAutomaticSplitting) |
10967 | { | 10973 | { |
10974 | if (m_debugPacketLevel >= 255) | ||
10975 | m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); | ||
10976 | |||
10968 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); | 10977 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); |
10969 | } | 10978 | } |
10970 | 10979 | ||
@@ -11036,10 +11045,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11036 | /// <param name="Pack">OpenMetaverse.packet</param> | 11045 | /// <param name="Pack">OpenMetaverse.packet</param> |
11037 | public void ProcessInPacket(Packet Pack) | 11046 | public void ProcessInPacket(Packet Pack) |
11038 | { | 11047 | { |
11039 | // m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack); | 11048 | if (m_debugPacketLevel >= 255) |
11049 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", Pack.Type); | ||
11040 | 11050 | ||
11041 | if (!ProcessPacketMethod(Pack)) | 11051 | if (!ProcessPacketMethod(Pack)) |
11042 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); | 11052 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.Type); |
11043 | 11053 | ||
11044 | PacketPool.Instance.ReturnPacket(Pack); | 11054 | PacketPool.Instance.ReturnPacket(Pack); |
11045 | } | 11055 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 369552f..b7fcd7d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -540,6 +540,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
540 | // Fire after attach, so we don't get messy perms dialogs | 540 | // Fire after attach, so we don't get messy perms dialogs |
541 | // 3 == AttachedRez | 541 | // 3 == AttachedRez |
542 | objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); | 542 | objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); |
543 | |||
544 | // Do this last so that event listeners have access to all the effects of the attachment | ||
545 | m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); | ||
543 | } | 546 | } |
544 | return objatt; | 547 | return objatt; |
545 | } | 548 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 6395d98..680c39a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs | |||
@@ -422,7 +422,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
422 | 422 | ||
423 | if (!scenePresence.IsChildAgent) | 423 | if (!scenePresence.IsChildAgent) |
424 | { | 424 | { |
425 | m_log.ErrorFormat("Packet debug for {0} {1} set to {2}", | 425 | m_log.DebugFormat("Packet debug for {0} {1} set to {2}", |
426 | scenePresence.Firstname, | 426 | scenePresence.Firstname, |
427 | scenePresence.Lastname, | 427 | scenePresence.Lastname, |
428 | newDebug); | 428 | newDebug); |
diff --git a/OpenSim/Services/Base/ServiceBase.cs b/OpenSim/Services/Base/ServiceBase.cs index 8e24d85..91d5c56 100644 --- a/OpenSim/Services/Base/ServiceBase.cs +++ b/OpenSim/Services/Base/ServiceBase.cs | |||
@@ -26,7 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Reflection; | 30 | using System.Reflection; |
31 | using log4net; | ||
30 | using Nini.Config; | 32 | using Nini.Config; |
31 | using OpenSim.Services.Interfaces; | 33 | using OpenSim.Services.Interfaces; |
32 | 34 | ||
@@ -34,6 +36,8 @@ namespace OpenSim.Services.Base | |||
34 | { | 36 | { |
35 | public class ServiceBase | 37 | public class ServiceBase |
36 | { | 38 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
37 | public T LoadPlugin<T>(string dllName) where T:class | 41 | public T LoadPlugin<T>(string dllName) where T:class |
38 | { | 42 | { |
39 | return LoadPlugin<T>(dllName, new Object[0]); | 43 | return LoadPlugin<T>(dllName, new Object[0]); |
@@ -61,8 +65,12 @@ namespace OpenSim.Services.Base | |||
61 | { | 65 | { |
62 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 66 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
63 | 67 | ||
68 | // m_log.DebugFormat("[SERVICE BASE]: Found assembly {0}", dllName); | ||
69 | |||
64 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 70 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
65 | { | 71 | { |
72 | // m_log.DebugFormat("[SERVICE BASE]: Found type {0}", pluginType); | ||
73 | |||
66 | if (pluginType.IsPublic) | 74 | if (pluginType.IsPublic) |
67 | { | 75 | { |
68 | if (className != String.Empty && | 76 | if (className != String.Empty && |
@@ -86,7 +94,15 @@ namespace OpenSim.Services.Base | |||
86 | } | 94 | } |
87 | catch (Exception e) | 95 | catch (Exception e) |
88 | { | 96 | { |
89 | Console.WriteLine("XXX Exception " + e.StackTrace); | 97 | List<string> strArgs = new List<string>(); |
98 | foreach (Object arg in args) | ||
99 | strArgs.Add(arg.ToString()); | ||
100 | |||
101 | m_log.Error( | ||
102 | string.Format( | ||
103 | "[SERVICE BASE]: Failed to load plugin {0} from {1} with args {2}", | ||
104 | interfaceName, dllName, string.Join(", ", strArgs.ToArray())), e); | ||
105 | |||
90 | return null; | 106 | return null; |
91 | } | 107 | } |
92 | } | 108 | } |
@@ -95,4 +111,4 @@ namespace OpenSim.Services.Base | |||
95 | { | 111 | { |
96 | } | 112 | } |
97 | } | 113 | } |
98 | } | 114 | } \ No newline at end of file |
diff --git a/OpenSim/Services/Friends/FriendsServiceBase.cs b/OpenSim/Services/Friends/FriendsServiceBase.cs index 9858972..6ab0bff 100644 --- a/OpenSim/Services/Friends/FriendsServiceBase.cs +++ b/OpenSim/Services/Friends/FriendsServiceBase.cs | |||
@@ -27,13 +27,12 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using log4net; | ||
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
32 | using OpenSim.Data; | 33 | using OpenSim.Data; |
33 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
34 | using OpenSim.Services.Base; | 35 | using OpenSim.Services.Base; |
35 | using Nini.Config; | ||
36 | using log4net; | ||
37 | 36 | ||
38 | namespace OpenSim.Services.Friends | 37 | namespace OpenSim.Services.Friends |
39 | { | 38 | { |
@@ -80,7 +79,11 @@ namespace OpenSim.Services.Friends | |||
80 | 79 | ||
81 | m_Database = LoadPlugin<IFriendsData>(dllName, new Object[] { connString, realm }); | 80 | m_Database = LoadPlugin<IFriendsData>(dllName, new Object[] { connString, realm }); |
82 | if (m_Database == null) | 81 | if (m_Database == null) |
83 | throw new Exception("Could not find a storage interface in the given module"); | 82 | { |
83 | throw new Exception( | ||
84 | string.Format( | ||
85 | "Could not find a storage interface {0} in the given StorageProvider {1}", "IFriendsData", dllName)); | ||
86 | } | ||
84 | } | 87 | } |
85 | } | 88 | } |
86 | } | 89 | } |