aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Server/Base
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Server/Base')
-rw-r--r--OpenSim/Server/Base/CommandManager.cs90
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs2
-rw-r--r--OpenSim/Server/Base/Properties/AssemblyInfo.cs8
-rw-r--r--OpenSim/Server/Base/ProtocolVersions.cs14
-rw-r--r--OpenSim/Server/Base/ServerUtils.cs42
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs4
6 files changed, 80 insertions, 80 deletions
diff --git a/OpenSim/Server/Base/CommandManager.cs b/OpenSim/Server/Base/CommandManager.cs
index bd18485..b6e2903 100644
--- a/OpenSim/Server/Base/CommandManager.cs
+++ b/OpenSim/Server/Base/CommandManager.cs
@@ -41,117 +41,117 @@ namespace OpenSim.Server.Base
41{ 41{
42 /// <summary> 42 /// <summary>
43 /// Command manager - 43 /// Command manager -
44 /// Wrapper for OpenSim.Framework.PluginManager to allow 44 /// Wrapper for OpenSim.Framework.PluginManager to allow
45 /// us to add commands to the console to perform operations 45 /// us to add commands to the console to perform operations
46 /// on our repos and plugins 46 /// on our repos and plugins
47 /// </summary> 47 /// </summary>
48 public class CommandManager 48 public class CommandManager
49 { 49 {
50 public AddinRegistry PluginRegistry; 50 public AddinRegistry PluginRegistry;
51 protected PluginManager PluginManager; 51 protected PluginManager PluginManager;
52 52
53 public CommandManager(AddinRegistry registry) 53 public CommandManager(AddinRegistry registry)
54 { 54 {
55 PluginRegistry = registry; 55 PluginRegistry = registry;
56 PluginManager = new PluginManager(PluginRegistry); 56 PluginManager = new PluginManager(PluginRegistry);
57 AddManagementCommands(); 57 AddManagementCommands();
58 } 58 }
59 59
60 private void AddManagementCommands() 60 private void AddManagementCommands()
61 { 61 {
62 // add plugin 62 // add plugin
63 MainConsole.Instance.Commands.AddCommand("Plugin", true, 63 MainConsole.Instance.Commands.AddCommand("Plugin", true,
64 "plugin add", "plugin add \"plugin index\"", 64 "plugin add", "plugin add \"plugin index\"",
65 "Install plugin from repository.", 65 "Install plugin from repository.",
66 HandleConsoleInstallPlugin); 66 HandleConsoleInstallPlugin);
67 67
68 // remove plugin 68 // remove plugin
69 MainConsole.Instance.Commands.AddCommand("Plugin", true, 69 MainConsole.Instance.Commands.AddCommand("Plugin", true,
70 "plugin remove", "plugin remove \"plugin index\"", 70 "plugin remove", "plugin remove \"plugin index\"",
71 "Remove plugin from repository", 71 "Remove plugin from repository",
72 HandleConsoleUnInstallPlugin); 72 HandleConsoleUnInstallPlugin);
73 73
74 // list installed plugins 74 // list installed plugins
75 MainConsole.Instance.Commands.AddCommand("Plugin", true, 75 MainConsole.Instance.Commands.AddCommand("Plugin", true,
76 "plugin list installed", 76 "plugin list installed",
77 "plugin list installed","List install plugins", 77 "plugin list installed","List install plugins",
78 HandleConsoleListInstalledPlugin); 78 HandleConsoleListInstalledPlugin);
79 79
80 // list plugins available from registered repositories 80 // list plugins available from registered repositories
81 MainConsole.Instance.Commands.AddCommand("Plugin", true, 81 MainConsole.Instance.Commands.AddCommand("Plugin", true,
82 "plugin list available", 82 "plugin list available",
83 "plugin list available","List available plugins", 83 "plugin list available","List available plugins",
84 HandleConsoleListAvailablePlugin); 84 HandleConsoleListAvailablePlugin);
85 // List available updates 85 // List available updates
86 MainConsole.Instance.Commands.AddCommand("Plugin", true, 86 MainConsole.Instance.Commands.AddCommand("Plugin", true,
87 "plugin updates", "plugin updates","List availble updates", 87 "plugin updates", "plugin updates","List availble updates",
88 HandleConsoleListUpdates); 88 HandleConsoleListUpdates);
89 89
90 // Update plugin 90 // Update plugin
91 MainConsole.Instance.Commands.AddCommand("Plugin", true, 91 MainConsole.Instance.Commands.AddCommand("Plugin", true,
92 "plugin update", "plugin update \"plugin index\"","Update the plugin", 92 "plugin update", "plugin update \"plugin index\"","Update the plugin",
93 HandleConsoleUpdatePlugin); 93 HandleConsoleUpdatePlugin);
94 94
95 // Add repository 95 // Add repository
96 MainConsole.Instance.Commands.AddCommand("Repository", true, 96 MainConsole.Instance.Commands.AddCommand("Repository", true,
97 "repo add", "repo add \"url\"","Add repository", 97 "repo add", "repo add \"url\"","Add repository",
98 HandleConsoleAddRepo); 98 HandleConsoleAddRepo);
99 99
100 // Refresh repo 100 // Refresh repo
101 MainConsole.Instance.Commands.AddCommand("Repository", true, 101 MainConsole.Instance.Commands.AddCommand("Repository", true,
102 "repo refresh", "repo refresh \"url\"", "Sync with a registered repository", 102 "repo refresh", "repo refresh \"url\"", "Sync with a registered repository",
103 HandleConsoleGetRepo); 103 HandleConsoleGetRepo);
104 104
105 // Remove repository from registry 105 // Remove repository from registry
106 MainConsole.Instance.Commands.AddCommand("Repository", true, 106 MainConsole.Instance.Commands.AddCommand("Repository", true,
107 "repo remove", 107 "repo remove",
108 "repo remove \"[url | index]\"", 108 "repo remove \"[url | index]\"",
109 "Remove repository from registry", 109 "Remove repository from registry",
110 HandleConsoleRemoveRepo); 110 HandleConsoleRemoveRepo);
111 111
112 // Enable repo 112 // Enable repo
113 MainConsole.Instance.Commands.AddCommand("Repository", true, 113 MainConsole.Instance.Commands.AddCommand("Repository", true,
114 "repo enable", "repo enable \"[url | index]\"", 114 "repo enable", "repo enable \"[url | index]\"",
115 "Enable registered repository", 115 "Enable registered repository",
116 HandleConsoleEnableRepo); 116 HandleConsoleEnableRepo);
117 117
118 // Disable repo 118 // Disable repo
119 MainConsole.Instance.Commands.AddCommand("Repository", true, 119 MainConsole.Instance.Commands.AddCommand("Repository", true,
120 "repo disable", "repo disable\"[url | index]\"", 120 "repo disable", "repo disable\"[url | index]\"",
121 "Disable registered repository", 121 "Disable registered repository",
122 HandleConsoleDisableRepo); 122 HandleConsoleDisableRepo);
123 123
124 // List registered repositories 124 // List registered repositories
125 MainConsole.Instance.Commands.AddCommand("Repository", true, 125 MainConsole.Instance.Commands.AddCommand("Repository", true,
126 "repo list", "repo list", 126 "repo list", "repo list",
127 "List registered repositories", 127 "List registered repositories",
128 HandleConsoleListRepos); 128 HandleConsoleListRepos);
129 129
130 // * 130 // *
131 MainConsole.Instance.Commands.AddCommand("Plugin", true, 131 MainConsole.Instance.Commands.AddCommand("Plugin", true,
132 "plugin info", "plugin info \"plugin index\"","Show detailed information for plugin", 132 "plugin info", "plugin info \"plugin index\"","Show detailed information for plugin",
133 HandleConsoleShowAddinInfo); 133 HandleConsoleShowAddinInfo);
134 134
135 // Plugin disable 135 // Plugin disable
136 MainConsole.Instance.Commands.AddCommand("Plugin", true, 136 MainConsole.Instance.Commands.AddCommand("Plugin", true,
137 "plugin disable", "plugin disable \"plugin index\"", 137 "plugin disable", "plugin disable \"plugin index\"",
138 "Disable a plugin", 138 "Disable a plugin",
139 HandleConsoleDisablePlugin); 139 HandleConsoleDisablePlugin);
140 140
141 // Enable plugin 141 // Enable plugin
142 MainConsole.Instance.Commands.AddCommand("Plugin", true, 142 MainConsole.Instance.Commands.AddCommand("Plugin", true,
143 "plugin enable", "plugin enable \"plugin index\"", 143 "plugin enable", "plugin enable \"plugin index\"",
144 "Enable the selected plugin plugin", 144 "Enable the selected plugin plugin",
145 HandleConsoleEnablePlugin); 145 HandleConsoleEnablePlugin);
146 } 146 }
147 147
148 #region console handlers 148 #region console handlers
149 // Handle our console commands 149 // Handle our console commands
150 // 150 //
151 // Install plugin from registered repository 151 // Install plugin from registered repository
152 /// <summary> 152 /// <summary>
153 /// Handles the console install plugin command. Attempts to install the selected plugin 153 /// Handles the console install plugin command. Attempts to install the selected plugin
154 /// and 154 /// and
155 /// </summary> 155 /// </summary>
156 /// <param name='module'> 156 /// <param name='module'>
157 /// Module. 157 /// Module.
@@ -323,7 +323,7 @@ namespace OpenSim.Server.Base
323 { 323 {
324 if (cmd.Length >= 3) 324 if (cmd.Length >= 3)
325 { 325 {
326 326
327 Dictionary<string, object> result = new Dictionary<string, object>(); 327 Dictionary<string, object> result = new Dictionary<string, object>();
328 328
329 int ndx = Convert.ToInt16(cmd[2]); 329 int ndx = Convert.ToInt16(cmd[2]);
@@ -355,5 +355,5 @@ namespace OpenSim.Server.Base
355 return; 355 return;
356 } 356 }
357 #endregion 357 #endregion
358 } 358 }
359} \ No newline at end of file 359} \ No newline at end of file
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index 42a8c57..3357250 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Server.Base
112 MainServer.Instance = httpServer; 112 MainServer.Instance = httpServer;
113 113
114 // If https_listener = true, then add an ssl listener on the https_port... 114 // If https_listener = true, then add an ssl listener on the https_port...
115 if (ssl_listener == true) 115 if (ssl_listener == true)
116 { 116 {
117 uint https_port = (uint)networkConfig.GetInt("https_port", 0); 117 uint https_port = (uint)networkConfig.GetInt("https_port", 0);
118 118
diff --git a/OpenSim/Server/Base/Properties/AssemblyInfo.cs b/OpenSim/Server/Base/Properties/AssemblyInfo.cs
index 02931e7..4be0f25 100644
--- a/OpenSim/Server/Base/Properties/AssemblyInfo.cs
+++ b/OpenSim/Server/Base/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
2using System.Runtime.CompilerServices; 2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices; 3using System.Runtime.InteropServices;
4 4
5// General Information about an assembly is controlled through the following 5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information 6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly. 7// associated with an assembly.
8[assembly: AssemblyTitle("OpenSim.Server.Base")] 8[assembly: AssemblyTitle("OpenSim.Server.Base")]
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices;
14[assembly: AssemblyTrademark("")] 14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")] 15[assembly: AssemblyCulture("")]
16 16
17// Setting ComVisible to false makes the types in this assembly not visible 17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from 18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type. 19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)] 20[assembly: ComVisible(false)]
21 21
@@ -25,7 +25,7 @@ using System.Runtime.InteropServices;
25// Version information for an assembly consists of the following four values: 25// Version information for an assembly consists of the following four values:
26// 26//
27// Major Version 27// Major Version
28// Minor Version 28// Minor Version
29// Build Number 29// Build Number
30// Revision 30// Revision
31// 31//
diff --git a/OpenSim/Server/Base/ProtocolVersions.cs b/OpenSim/Server/Base/ProtocolVersions.cs
index 5c2278c..27eed4c 100644
--- a/OpenSim/Server/Base/ProtocolVersions.cs
+++ b/OpenSim/Server/Base/ProtocolVersions.cs
@@ -31,20 +31,20 @@ namespace OpenSim.Server.Base
31 { 31 {
32 /// <value> 32 /// <value>
33 /// This is the external protocol versions. It is separate from the OpenSimulator project version. 33 /// This is the external protocol versions. It is separate from the OpenSimulator project version.
34 /// 34 ///
35 /// These version numbers should be increased by 1 every time a code 35 /// These version numbers should be increased by 1 every time a code
36 /// change in the Service.Connectors and Server.Handlers, espectively, 36 /// change in the Service.Connectors and Server.Handlers, espectively,
37 /// makes the previous OpenSimulator revision incompatible 37 /// makes the previous OpenSimulator revision incompatible
38 /// with the new revision. 38 /// with the new revision.
39 /// 39 ///
40 /// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality 40 /// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality
41 /// but not outright failure) do not need a version number increment. 41 /// but not outright failure) do not need a version number increment.
42 /// 42 ///
43 /// Having this version number allows the grid service to reject connections from regions running a version 43 /// Having this version number allows the grid service to reject connections from regions running a version
44 /// of the code that is too old. 44 /// of the code that is too old.
45 /// 45 ///
46 /// </value> 46 /// </value>
47 47
48 // The range of acceptable servers for client-side connectors 48 // The range of acceptable servers for client-side connectors
49 public readonly static int ClientProtocolVersionMin = 1; 49 public readonly static int ClientProtocolVersionMin = 1;
50 public readonly static int ClientProtocolVersionMax = 1; 50 public readonly static int ClientProtocolVersionMax = 1;
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 57d0a8d..b17d7ba 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -104,7 +104,7 @@ namespace OpenSim.Server.Base
104 // libomv, which has a hard-coded path to "." for pinvoke 104 // libomv, which has a hard-coded path to "." for pinvoke
105 // to load the openjpeg dll 105 // to load the openjpeg dll
106 // 106 //
107 // Will look for a way to fix, but for now this keeps the 107 // Will look for a way to fix, but for now this keeps the
108 // confusion to a minimum. this was copied from our region 108 // confusion to a minimum. this was copied from our region
109 // plugin loader, we have been doing this in there for a long time. 109 // plugin loader, we have been doing this in there for a long time.
110 // 110 //
@@ -183,7 +183,7 @@ namespace OpenSim.Server.Base
183 183
184 if(port != 0) 184 if(port != 0)
185 server = MainServer.GetHttpServer(port); 185 server = MainServer.GetHttpServer(port);
186 else 186 else
187 server = MainServer.Instance; 187 server = MainServer.Instance;
188 188
189 return server; 189 return server;
@@ -222,19 +222,19 @@ namespace OpenSim.Server.Base
222 // This is good to debug configuration problems 222 // This is good to debug configuration problems
223 //if (dllName == string.Empty) 223 //if (dllName == string.Empty)
224 // Util.PrintCallStack(); 224 // Util.PrintCallStack();
225 225
226 string className = String.Empty; 226 string className = String.Empty;
227 227
228 // The path for a dynamic plugin will contain ":" on Windows 228 // The path for a dynamic plugin will contain ":" on Windows
229 string[] parts = dllName.Split (new char[] {':'}); 229 string[] parts = dllName.Split (new char[] {':'});
230 230
231 if (parts [0].Length > 1) 231 if (parts [0].Length > 1)
232 { 232 {
233 dllName = parts [0]; 233 dllName = parts [0];
234 if (parts.Length > 1) 234 if (parts.Length > 1)
235 className = parts[1]; 235 className = parts[1];
236 } 236 }
237 else 237 else
238 { 238 {
239 // This is Windows - we must replace the ":" in the path 239 // This is Windows - we must replace the ":" in the path
240 dllName = String.Format ("{0}:{1}", parts [0], parts [1]); 240 dllName = String.Format ("{0}:{1}", parts [0], parts [1]);
@@ -242,17 +242,17 @@ namespace OpenSim.Server.Base
242 className = parts[2]; 242 className = parts[2];
243 } 243 }
244 244
245 // Handle extra string arguments in a more generic way 245 // Handle extra string arguments in a more generic way
246 if (dllName.Contains("@")) 246 if (dllName.Contains("@"))
247 { 247 {
248 string[] dllNameParts = dllName.Split(new char[] {'@'}); 248 string[] dllNameParts = dllName.Split(new char[] {'@'});
249 dllName = dllNameParts[dllNameParts.Length - 1]; 249 dllName = dllNameParts[dllNameParts.Length - 1];
250 List<Object> argList = new List<Object>(args); 250 List<Object> argList = new List<Object>(args);
251 for (int i = 0 ; i < dllNameParts.Length - 1 ; ++i) 251 for (int i = 0 ; i < dllNameParts.Length - 1 ; ++i)
252 argList.Add(dllNameParts[i]); 252 argList.Add(dllNameParts[i]);
253 253
254 args = argList.ToArray(); 254 args = argList.ToArray();
255 } 255 }
256 256
257 return LoadPlugin<T>(dllName, className, args); 257 return LoadPlugin<T>(dllName, className, args);
258 } 258 }
@@ -276,10 +276,10 @@ namespace OpenSim.Server.Base
276 { 276 {
277 if (pluginType.IsPublic) 277 if (pluginType.IsPublic)
278 { 278 {
279 if (className != String.Empty 279 if (className != String.Empty
280 && pluginType.ToString() != pluginType.Namespace + "." + className) 280 && pluginType.ToString() != pluginType.Namespace + "." + className)
281 continue; 281 continue;
282 282
283 Type typeInterface = pluginType.GetInterface(interfaceName); 283 Type typeInterface = pluginType.GetInterface(interfaceName);
284 284
285 if (typeInterface != null) 285 if (typeInterface != null)
@@ -295,8 +295,8 @@ namespace OpenSim.Server.Base
295 if (!(e is System.MissingMethodException)) 295 if (!(e is System.MissingMethodException))
296 { 296 {
297 m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}", 297 m_log.Error(string.Format("[SERVER UTILS]: Error loading plugin {0} from {1}. Exception: {2}",
298 interfaceName, 298 interfaceName,
299 dllName, 299 dllName,
300 e.InnerException == null ? e.Message : e.InnerException.Message), 300 e.InnerException == null ? e.Message : e.InnerException.Message),
301 e); 301 e);
302 } 302 }
@@ -479,7 +479,7 @@ namespace OpenSim.Server.Base
479 XmlDocument doc = new XmlDocument(); 479 XmlDocument doc = new XmlDocument();
480 480
481 doc.LoadXml(data); 481 doc.LoadXml(data);
482 482
483 XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse"); 483 XmlNodeList rootL = doc.GetElementsByTagName("ServerResponse");
484 484
485 if (rootL.Count != 1) 485 if (rootL.Count != 1)
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index e18594f..f60b5fb 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Server.Base
92 92
93 // Check if a prompt was given on the command line 93 // Check if a prompt was given on the command line
94 prompt = startupConfig.GetString("prompt", prompt); 94 prompt = startupConfig.GetString("prompt", prompt);
95 95
96 // Check for a Log4Net config file on the command line 96 // Check for a Log4Net config file on the command line
97 logConfig =startupConfig.GetString("logconfig", logConfig); 97 logConfig =startupConfig.GetString("logconfig", logConfig);
98 } 98 }
@@ -116,7 +116,7 @@ namespace OpenSim.Server.Base
116 // Merge OpSys env vars 116 // Merge OpSys env vars
117 Console.WriteLine("[CONFIG]: Loading environment variables for Config"); 117 Console.WriteLine("[CONFIG]: Loading environment variables for Config");
118 Util.MergeEnvironmentToConfig(Config); 118 Util.MergeEnvironmentToConfig(Config);
119 119
120 // Merge the configuration from the command line into the loaded file 120 // Merge the configuration from the command line into the loaded file
121 Config.Merge(argvConfig); 121 Config.Merge(argvConfig);
122 122