diff options
Diffstat (limited to 'OpenSim/Grid/GridServer')
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 41 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/Main.cs | 14 | ||||
-rw-r--r-- | OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs | 2 |
3 files changed, 24 insertions, 33 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index e562721..7986591 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -28,15 +28,14 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using OpenSim.Framework.Data; | 32 | using System.Xml; |
34 | using OpenSim.Framework.Utilities; | ||
35 | using OpenSim.Framework.Console; | ||
36 | using OpenSim.Framework.Sims; | ||
37 | using libsecondlife; | 33 | using libsecondlife; |
38 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
39 | using System.Xml; | 35 | using OpenSim.Framework.Console; |
36 | using OpenSim.Framework.Data; | ||
37 | using OpenSim.Framework.Interfaces; | ||
38 | using OpenSim.Framework.Utilities; | ||
40 | 39 | ||
41 | namespace OpenSim.Grid.GridServer | 40 | namespace OpenSim.Grid.GridServer |
42 | { | 41 | { |
@@ -45,7 +44,7 @@ namespace OpenSim.Grid.GridServer | |||
45 | Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); | 44 | Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); |
46 | Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); | 45 | Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); |
47 | 46 | ||
48 | public OpenSim.Framework.Interfaces.GridConfig config; | 47 | public GridConfig config; |
49 | 48 | ||
50 | /// <summary> | 49 | /// <summary> |
51 | /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. | 50 | /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. |
@@ -53,10 +52,10 @@ namespace OpenSim.Grid.GridServer | |||
53 | /// <param name="FileName">The filename to the grid server plugin DLL</param> | 52 | /// <param name="FileName">The filename to the grid server plugin DLL</param> |
54 | public void AddPlugin(string FileName) | 53 | public void AddPlugin(string FileName) |
55 | { | 54 | { |
56 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Attempting to load " + FileName); | 55 | MainLog.Instance.Verbose("Storage: Attempting to load " + FileName); |
57 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 56 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
58 | 57 | ||
59 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); | 58 | MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); |
60 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 59 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
61 | { | 60 | { |
62 | if (!pluginType.IsAbstract) | 61 | if (!pluginType.IsAbstract) |
@@ -69,7 +68,7 @@ namespace OpenSim.Grid.GridServer | |||
69 | IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 68 | IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
70 | plug.Initialise(); | 69 | plug.Initialise(); |
71 | this._plugins.Add(plug.getName(), plug); | 70 | this._plugins.Add(plug.getName(), plug); |
72 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Added IGridData Interface"); | 71 | MainLog.Instance.Verbose("Storage: Added IGridData Interface"); |
73 | } | 72 | } |
74 | 73 | ||
75 | typeInterface = null; | 74 | typeInterface = null; |
@@ -82,7 +81,7 @@ namespace OpenSim.Grid.GridServer | |||
82 | ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 81 | ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
83 | plug.Initialise(); | 82 | plug.Initialise(); |
84 | this._logplugins.Add(plug.getName(), plug); | 83 | this._logplugins.Add(plug.getName(), plug); |
85 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Storage: Added ILogData Interface"); | 84 | MainLog.Instance.Verbose( "Storage: Added ILogData Interface"); |
86 | } | 85 | } |
87 | 86 | ||
88 | typeInterface = null; | 87 | typeInterface = null; |
@@ -110,7 +109,7 @@ namespace OpenSim.Grid.GridServer | |||
110 | } | 109 | } |
111 | catch (Exception) | 110 | catch (Exception) |
112 | { | 111 | { |
113 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); | 112 | MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); |
114 | } | 113 | } |
115 | } | 114 | } |
116 | } | 115 | } |
@@ -120,7 +119,7 @@ namespace OpenSim.Grid.GridServer | |||
120 | /// </summary> | 119 | /// </summary> |
121 | /// <param name="uuid">A UUID key of the region to return</param> | 120 | /// <param name="uuid">A UUID key of the region to return</param> |
122 | /// <returns>A SimProfileData for the region</returns> | 121 | /// <returns>A SimProfileData for the region</returns> |
123 | public SimProfileData getRegion(libsecondlife.LLUUID uuid) | 122 | public SimProfileData getRegion(LLUUID uuid) |
124 | { | 123 | { |
125 | foreach(KeyValuePair<string,IGridData> kvp in _plugins) { | 124 | foreach(KeyValuePair<string,IGridData> kvp in _plugins) { |
126 | try | 125 | try |
@@ -129,7 +128,7 @@ namespace OpenSim.Grid.GridServer | |||
129 | } | 128 | } |
130 | catch (Exception) | 129 | catch (Exception) |
131 | { | 130 | { |
132 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key); | 131 | MainLog.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key); |
133 | } | 132 | } |
134 | } | 133 | } |
135 | return null; | 134 | return null; |
@@ -150,7 +149,7 @@ namespace OpenSim.Grid.GridServer | |||
150 | } | 149 | } |
151 | catch | 150 | catch |
152 | { | 151 | { |
153 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); | 152 | MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); |
154 | } | 153 | } |
155 | } | 154 | } |
156 | return null; | 155 | return null; |
@@ -174,7 +173,7 @@ namespace OpenSim.Grid.GridServer | |||
174 | } | 173 | } |
175 | catch | 174 | catch |
176 | { | 175 | { |
177 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); | 176 | MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); |
178 | } | 177 | } |
179 | } | 178 | } |
180 | 179 | ||
@@ -370,7 +369,7 @@ namespace OpenSim.Grid.GridServer | |||
370 | 369 | ||
371 | simProfileList.Add(simProfileBlock); | 370 | simProfileList.Add(simProfileBlock); |
372 | } | 371 | } |
373 | OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode"); | 372 | MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode"); |
374 | } | 373 | } |
375 | else | 374 | else |
376 | { | 375 | { |
@@ -403,7 +402,7 @@ namespace OpenSim.Grid.GridServer | |||
403 | } | 402 | } |
404 | } | 403 | } |
405 | } | 404 | } |
406 | OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode"); | 405 | MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode"); |
407 | } | 406 | } |
408 | 407 | ||
409 | responseData["sim-profiles"] = simProfileList; | 408 | responseData["sim-profiles"] = simProfileList; |
@@ -565,7 +564,7 @@ namespace OpenSim.Grid.GridServer | |||
565 | 564 | ||
566 | try | 565 | try |
567 | { | 566 | { |
568 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); | 567 | MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); |
569 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | 568 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) |
570 | { | 569 | { |
571 | try | 570 | try |
@@ -575,7 +574,7 @@ namespace OpenSim.Grid.GridServer | |||
575 | if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null)) | 574 | if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null)) |
576 | { | 575 | { |
577 | kvp.Value.AddProfile(TheSim); | 576 | kvp.Value.AddProfile(TheSim); |
578 | OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); | 577 | MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); |
579 | logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); | 578 | logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); |
580 | } | 579 | } |
581 | else | 580 | else |
@@ -585,7 +584,7 @@ namespace OpenSim.Grid.GridServer | |||
585 | } | 584 | } |
586 | catch (Exception e) | 585 | catch (Exception e) |
587 | { | 586 | { |
588 | OpenSim.Framework.Console.MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString()); | 587 | MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString()); |
589 | } | 588 | } |
590 | } | 589 | } |
591 | return "OK"; | 590 | return "OK"; |
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index 490f757..20c4905 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs | |||
@@ -27,20 +27,14 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.IO; | ||
31 | using System.Text; | ||
32 | using System.Timers; | ||
33 | using System.Net; | ||
34 | using System.Threading; | ||
35 | using System.Reflection; | 30 | using System.Reflection; |
36 | using libsecondlife; | 31 | using System.Threading; |
37 | using OpenSim.Framework.Manager; | 32 | using System.Timers; |
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Framework.Sims; | ||
40 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
41 | using OpenSim.Framework.Interfaces; | 34 | using OpenSim.Framework.Interfaces; |
42 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
43 | using OpenSim.GenericConfig; | 36 | using OpenSim.GenericConfig; |
37 | using Timer=System.Timers.Timer; | ||
44 | 38 | ||
45 | namespace OpenSim.Grid.GridServer | 39 | namespace OpenSim.Grid.GridServer |
46 | { | 40 | { |
@@ -156,7 +150,7 @@ namespace OpenSim.Grid.GridServer | |||
156 | 150 | ||
157 | m_console.Verbose( "Main.cs:Startup() - Starting sim status checker"); | 151 | m_console.Verbose( "Main.cs:Startup() - Starting sim status checker"); |
158 | 152 | ||
159 | System.Timers.Timer simCheckTimer = new System.Timers.Timer(3600000 * 3); // 3 Hours between updates. | 153 | Timer simCheckTimer = new Timer(3600000 * 3); // 3 Hours between updates. |
160 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); | 154 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); |
161 | simCheckTimer.Enabled = true; | 155 | simCheckTimer.Enabled = true; |
162 | } | 156 | } |
diff --git a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs index 303dddf..62a68a8 100644 --- a/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs +++ b/OpenSim/Grid/GridServer/Properties/AssemblyInfo.cs | |||
@@ -26,9 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System.Reflection; | 28 | using System.Reflection; |
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | 29 | using System.Runtime.InteropServices; |
31 | |||
32 | // General Information about an assembly is controlled through the following | 30 | // General Information about an assembly is controlled through the following |
33 | // set of attributes. Change these attribute values to modify the information | 31 | // set of attributes. Change these attribute values to modify the information |
34 | // associated with an assembly. | 32 | // associated with an assembly. |