diff options
author | Tom Grimshaw | 2010-07-24 10:43:57 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-07-24 10:43:57 -0700 |
commit | 81186e76b68e9f6ba8c03a48fb5f7a43b0eea7a1 (patch) | |
tree | f2b461f6c1404f634ec57013443856b93cd958e7 /OpenSim/Region/OptionalModules | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster (diff) | |
download | opensim-SC-81186e76b68e9f6ba8c03a48fb5f7a43b0eea7a1.zip opensim-SC-81186e76b68e9f6ba8c03a48fb5f7a43b0eea7a1.tar.gz opensim-SC-81186e76b68e9f6ba8c03a48fb5f7a43b0eea7a1.tar.bz2 opensim-SC-81186e76b68e9f6ba8c03a48fb5f7a43b0eea7a1.tar.xz |
Add an m_enabled flag to XmlRpcRouterModule so it won't try to bind the xmlrpc_uri event if it's not mentioned in the ini.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs index 32659c8..dcac4a9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcRouterModule.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | |||
42 | public class XmlRpcRouter : IRegionModule, IXmlRpcRouter | 42 | public class XmlRpcRouter : IRegionModule, IXmlRpcRouter |
43 | { | 43 | { |
44 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | private bool m_enabled = false; | |
46 | public void Initialise(Scene scene, IConfigSource config) | 46 | public void Initialise(Scene scene, IConfigSource config) |
47 | { | 47 | { |
48 | IConfig startupConfig = config.Configs["Startup"]; | 48 | IConfig startupConfig = config.Configs["Startup"]; |
@@ -53,6 +53,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | |||
53 | "XmlRpcRouterModule") == "XmlRpcRouterModule") | 53 | "XmlRpcRouterModule") == "XmlRpcRouterModule") |
54 | { | 54 | { |
55 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); | 55 | scene.RegisterModuleInterface<IXmlRpcRouter>(this); |
56 | m_enabled = true; | ||
57 | } | ||
58 | else | ||
59 | { | ||
60 | m_enabled = false; | ||
56 | } | 61 | } |
57 | } | 62 | } |
58 | 63 | ||
@@ -76,7 +81,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule | |||
76 | 81 | ||
77 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) | 82 | public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri) |
78 | { | 83 | { |
79 | scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri}); | 84 | if (m_enabled) |
85 | { | ||
86 | scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] { uri }); | ||
87 | } | ||
80 | } | 88 | } |
81 | 89 | ||
82 | public void ScriptRemoved(UUID itemID) | 90 | public void ScriptRemoved(UUID itemID) |