diff options
Diffstat (limited to 'OpenSim/Grid/UserServer.Config')
-rw-r--r-- | OpenSim/Grid/UserServer.Config/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer.Config/DbUserConfig.cs | 35 |
2 files changed, 17 insertions, 20 deletions
diff --git a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs b/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs index 25e0211..15298e8 100644 --- a/OpenSim/Grid/UserServer.Config/AssemblyInfo.cs +++ b/OpenSim/Grid/UserServer.Config/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 | // Information about this assembly is defined by the following | 30 | // Information about this assembly is defined by the following |
33 | // attributes. | 31 | // attributes. |
34 | // | 32 | // |
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index 770a6b9..c7f8255 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.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 OpenUser.Config.UserConfigDb4o | 33 | namespace OpenUser.Config.UserConfigDb4o |
35 | { | 34 | { |
@@ -37,7 +36,7 @@ namespace OpenUser.Config.UserConfigDb4o | |||
37 | { | 36 | { |
38 | public UserConfig GetConfigObject() | 37 | public UserConfig GetConfigObject() |
39 | { | 38 | { |
40 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll"); | 39 | MainLog.Instance.Verbose("Loading Db40Config dll"); |
41 | return ( new DbUserConfig()); | 40 | return ( new DbUserConfig()); |
42 | } | 41 | } |
43 | } | 42 | } |
@@ -47,13 +46,13 @@ namespace OpenUser.Config.UserConfigDb4o | |||
47 | private IObjectContainer db; | 46 | private IObjectContainer db; |
48 | 47 | ||
49 | public void LoadDefaults() { | 48 | public void LoadDefaults() { |
50 | OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 49 | MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); |
51 | 50 | ||
52 | this.DefaultStartupMsg = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); | 51 | this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); |
53 | 52 | ||
54 | this.GridServerURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); | 53 | this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); |
55 | this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server","null"); | 54 | this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); |
56 | this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); | 55 | this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); |
57 | } | 56 | } |
58 | 57 | ||
59 | public override void InitConfig() { | 58 | public override void InitConfig() { |
@@ -61,7 +60,7 @@ namespace OpenUser.Config.UserConfigDb4o | |||
61 | db = Db4oFactory.OpenFile("openuser.yap"); | 60 | db = Db4oFactory.OpenFile("openuser.yap"); |
62 | IObjectSet result = db.Get(typeof(DbUserConfig)); | 61 | IObjectSet result = db.Get(typeof(DbUserConfig)); |
63 | if(result.Count==1) { | 62 | if(result.Count==1) { |
64 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); | 63 | MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); |
65 | foreach (DbUserConfig cfg in result) { | 64 | foreach (DbUserConfig cfg in result) { |
66 | this.GridServerURL=cfg.GridServerURL; | 65 | this.GridServerURL=cfg.GridServerURL; |
67 | this.GridSendKey=cfg.GridSendKey; | 66 | this.GridSendKey=cfg.GridSendKey; |
@@ -69,22 +68,22 @@ namespace OpenUser.Config.UserConfigDb4o | |||
69 | this.DefaultStartupMsg=cfg.DefaultStartupMsg; | 68 | this.DefaultStartupMsg=cfg.DefaultStartupMsg; |
70 | } | 69 | } |
71 | } else { | 70 | } else { |
72 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | 71 | MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); |
73 | LoadDefaults(); | 72 | LoadDefaults(); |
74 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Writing out default settings to local database"); | 73 | MainLog.Instance.Verbose("Writing out default settings to local database"); |
75 | db.Set(this); | 74 | db.Set(this); |
76 | db.Close(); | 75 | db.Close(); |
77 | } | 76 | } |
78 | } catch(Exception e) { | 77 | } catch(Exception e) { |
79 | OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); | 78 | MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); |
80 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | 79 | MainLog.Instance.Warn(e.ToString()); |
81 | } | 80 | } |
82 | 81 | ||
83 | OpenSim.Framework.Console.MainLog.Instance.Verbose("User settings loaded:"); | 82 | MainLog.Instance.Verbose("User settings loaded:"); |
84 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); | 83 | MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); |
85 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); | 84 | MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); |
86 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); | 85 | MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); |
87 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); | 86 | MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); |
88 | } | 87 | } |
89 | 88 | ||
90 | 89 | ||