diff options
author | Mic Bowman | 2012-03-25 22:59:06 -0700 |
---|---|---|
committer | Mic Bowman | 2012-03-25 22:59:06 -0700 |
commit | 055269805d88c5f3d347d3ba7d03db2182a78277 (patch) | |
tree | 3cfb3c0dccf0a075c559b18ee6ee02b5b871a4ff /OpenSim/Region/OptionalModules | |
parent | Fix the omission on the interface declaration (diff) | |
download | opensim-SC-055269805d88c5f3d347d3ba7d03db2182a78277.zip opensim-SC-055269805d88c5f3d347d3ba7d03db2182a78277.tar.gz opensim-SC-055269805d88c5f3d347d3ba7d03db2182a78277.tar.bz2 opensim-SC-055269805d88c5f3d347d3ba7d03db2182a78277.tar.xz |
Fix compile error in ScriptModuelComms and add some debugging into the modInvoke
routines to simplify finding method registration issues.
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 7fc8759..c2ec5b4 100644 --- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -130,10 +130,18 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
130 | 130 | ||
131 | public void RegisterScriptInvocation(object target, string meth) | 131 | public void RegisterScriptInvocation(object target, string meth) |
132 | { | 132 | { |
133 | MethodInfo mi = target.GetType()..GetMethod(meth, | 133 | m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}",meth,target.GetType().Name); |
134 | |||
135 | |||
136 | MethodInfo mi = target.GetType().GetMethod(meth, | ||
134 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); | 137 | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); |
138 | if (mi == null) | ||
139 | { | ||
140 | m_log.WarnFormat("[MODULE COMMANDS] Failed to register method {0}",meth); | ||
141 | return; | ||
142 | } | ||
143 | |||
135 | Type delegateType; | 144 | Type delegateType; |
136 | |||
137 | var typeArgs = mi.GetParameters() | 145 | var typeArgs = mi.GetParameters() |
138 | .Select(p => p.ParameterType) | 146 | .Select(p => p.ParameterType) |
139 | .ToList(); | 147 | .ToList(); |
@@ -197,6 +205,8 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
197 | return "modInvokeR"; | 205 | return "modInvokeR"; |
198 | else if (sid.ReturnType == typeof(object[])) | 206 | else if (sid.ReturnType == typeof(object[])) |
199 | return "modInvokeL"; | 207 | return "modInvokeL"; |
208 | |||
209 | m_log.WarnFormat("[MODULE COMMANDS] failed to find match for {0} with return type {1}",fname,sid.ReturnType.Name); | ||
200 | } | 210 | } |
201 | } | 211 | } |
202 | 212 | ||