aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/ServerUtils.cs
diff options
context:
space:
mode:
authorBlueWall2012-12-13 13:38:57 -0500
committerBlueWall2012-12-13 13:38:57 -0500
commit6f002733b1079e8b7bd9ea7a3750348c9bac88ea (patch)
tree00dfde9b28480ebd8fe1e4cbf0a2cc73b0fc3286 /OpenSim/Server/Base/ServerUtils.cs
parentFix module pathname handling for Windows (diff)
downloadopensim-SC_OLD-6f002733b1079e8b7bd9ea7a3750348c9bac88ea.zip
opensim-SC_OLD-6f002733b1079e8b7bd9ea7a3750348c9bac88ea.tar.gz
opensim-SC_OLD-6f002733b1079e8b7bd9ea7a3750348c9bac88ea.tar.bz2
opensim-SC_OLD-6f002733b1079e8b7bd9ea7a3750348c9bac88ea.tar.xz
Fix formatting
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs45
1 files changed, 24 insertions, 21 deletions
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index d6d3957..3f208bf 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Server.Base
139 if (a.AddinFile.Contains(Registry.DefaultAddinsFolder)) 139 if (a.AddinFile.Contains(Registry.DefaultAddinsFolder))
140 { 140 {
141 m_log.InfoFormat("[SERVER]: Adding {0} from registry", a.Name); 141 m_log.InfoFormat("[SERVER]: Adding {0} from registry", a.Name);
142 connector.PluginPath = System.IO.Path.Combine(Registry.DefaultAddinsFolder,a.Name.Replace(',', '.')); } 142 connector.PluginPath = System.IO.Path.Combine(Registry.DefaultAddinsFolder,a.Name.Replace(',', '.')); }
143 else 143 else
144 { 144 {
145 m_log.InfoFormat("[SERVER]: Adding {0} from ./bin", a.Name); 145 m_log.InfoFormat("[SERVER]: Adding {0} from ./bin", a.Name);
@@ -216,26 +216,29 @@ namespace OpenSim.Server.Base
216 /// <param name="args">The arguments which control which constructor is invoked on the plugin</param> 216 /// <param name="args">The arguments which control which constructor is invoked on the plugin</param>
217 /// <returns></returns> 217 /// <returns></returns>
218 public static T LoadPlugin<T> (string dllName, Object[] args) where T:class 218 public static T LoadPlugin<T> (string dllName, Object[] args) where T:class
219 { 219 {
220 // This is good to debug configuration problems 220 // This is good to debug configuration problems
221 //if (dllName == string.Empty) 221 //if (dllName == string.Empty)
222 // Util.PrintCallStack(); 222 // Util.PrintCallStack();
223 223
224 string className = String.Empty; 224 string className = String.Empty;
225 225
226 // The path for a dynamic plugin will contain ":" on Windows 226 // The path for a dynamic plugin will contain ":" on Windows
227 string[] parts = dllName.Split (new char[] {':'}); 227 string[] parts = dllName.Split (new char[] {':'});
228 228
229 if (parts [0].Length > 1) { 229 if (parts [0].Length > 1)
230 dllName = parts [0]; 230 {
231 if (parts.Length > 1) 231 dllName = parts [0];
232 className = parts[1]; 232 if (parts.Length > 1)
233 } else { 233 className = parts[1];
234 // This is Windows - we must replace the ":" in the path 234 }
235 dllName = String.Format ("{0}:{1}", parts [0], parts [1]); 235 else
236 if (parts.Length > 2) 236 {
237 className = parts[2]; 237 // This is Windows - we must replace the ":" in the path
238 } 238 dllName = String.Format ("{0}:{1}", parts [0], parts [1]);
239 if (parts.Length > 2)
240 className = parts[2];
241 }
239 242
240 return LoadPlugin<T>(dllName, className, args); 243 return LoadPlugin<T>(dllName, className, args);
241 } 244 }