diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/GridServer.Config/DbGridConfig.cs | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs index 2218004..4acf81d 100644 --- a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs +++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs | |||
@@ -26,10 +26,9 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using Db4objects.Db4o; |
30 | using OpenSim.Framework.Console; | 30 | using OpenSim.Framework.Console; |
31 | using OpenSim.Framework.Interfaces; | 31 | using OpenSim.Framework.Interfaces; |
32 | using Db4objects.Db4o; | ||
33 | 32 | ||
34 | namespace OpenGrid.Config.GridConfigDb4o | 33 | namespace OpenGrid.Config.GridConfigDb4o |
35 | { | 34 | { |
@@ -44,7 +43,7 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
44 | /// <returns>A grid configuration object</returns> | 43 | /// <returns>A grid configuration object</returns> |
45 | public GridConfig GetConfigObject() | 44 | public GridConfig GetConfigObject() |
46 | { | 45 | { |
47 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll"); | 46 | MainLog.Instance.Verbose("Loading Db40Config dll"); |
48 | return ( new DbGridConfig()); | 47 | return ( new DbGridConfig()); |
49 | } | 48 | } |
50 | } | 49 | } |
@@ -63,24 +62,24 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
63 | /// User configuration for the Grid Config interfaces | 62 | /// User configuration for the Grid Config interfaces |
64 | /// </summary> | 63 | /// </summary> |
65 | public void LoadDefaults() { | 64 | public void LoadDefaults() { |
66 | OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 65 | MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); |
67 | 66 | ||
68 | // About the grid options | 67 | // About the grid options |
69 | this.GridOwner = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); | 68 | this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); |
70 | 69 | ||
71 | // Asset Options | 70 | // Asset Options |
72 | this.DefaultAssetServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); | 71 | this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); |
73 | this.AssetSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to asset server","null"); | 72 | this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); |
74 | this.AssetRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); | 73 | this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); |
75 | 74 | ||
76 | // User Server Options | 75 | // User Server Options |
77 | this.DefaultUserServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); | 76 | this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); |
78 | this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server","null"); | 77 | this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); |
79 | this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server","null"); | 78 | this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); |
80 | 79 | ||
81 | // Region Server Options | 80 | // Region Server Options |
82 | this.SimSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to sims","null"); | 81 | this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); |
83 | this.SimRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from sims","null"); | 82 | this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); |
84 | } | 83 | } |
85 | 84 | ||
86 | /// <summary> | 85 | /// <summary> |
@@ -95,7 +94,7 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
95 | IObjectSet result = db.Get(typeof(DbGridConfig)); | 94 | IObjectSet result = db.Get(typeof(DbGridConfig)); |
96 | // Found? | 95 | // Found? |
97 | if(result.Count==1) { | 96 | if(result.Count==1) { |
98 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); | 97 | MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); |
99 | foreach (DbGridConfig cfg in result) { | 98 | foreach (DbGridConfig cfg in result) { |
100 | // Import each setting into this class | 99 | // Import each setting into this class |
101 | // Grid Settings | 100 | // Grid Settings |
@@ -114,40 +113,40 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
114 | } | 113 | } |
115 | // Create a new configuration object from this class | 114 | // Create a new configuration object from this class |
116 | } else { | 115 | } else { |
117 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | 116 | MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); |
118 | 117 | ||
119 | // Load default settings into this class | 118 | // Load default settings into this class |
120 | LoadDefaults(); | 119 | LoadDefaults(); |
121 | 120 | ||
122 | // Saves to the database file... | 121 | // Saves to the database file... |
123 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Writing out default settings to local database"); | 122 | MainLog.Instance.Verbose( "Writing out default settings to local database"); |
124 | db.Set(this); | 123 | db.Set(this); |
125 | 124 | ||
126 | // Closes file locks | 125 | // Closes file locks |
127 | db.Close(); | 126 | db.Close(); |
128 | } | 127 | } |
129 | } catch(Exception e) { | 128 | } catch(Exception e) { |
130 | OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); | 129 | MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); |
131 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 130 | MainLog.Instance.Warn(e.ToString()); |
132 | } | 131 | } |
133 | 132 | ||
134 | // Grid Settings | 133 | // Grid Settings |
135 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid settings loaded:"); | 134 | MainLog.Instance.Verbose("Grid settings loaded:"); |
136 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); | 135 | MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); |
137 | 136 | ||
138 | // Asset Settings | 137 | // Asset Settings |
139 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); | 138 | MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); |
140 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); | 139 | MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); |
141 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); | 140 | MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); |
142 | 141 | ||
143 | // User Settings | 142 | // User Settings |
144 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); | 143 | MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); |
145 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); | 144 | MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); |
146 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); | 145 | MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); |
147 | 146 | ||
148 | // Region Settings | 147 | // Region Settings |
149 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); | 148 | MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); |
150 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); | 149 | MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); |
151 | } | 150 | } |
152 | 151 | ||
153 | /// <summary> | 152 | /// <summary> |