aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/GridInfoService.cs27
1 files changed, 21 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/GridInfoService.cs b/OpenSim/Framework/Communications/GridInfoService.cs
index ad60638..ce66c82 100644
--- a/OpenSim/Framework/Communications/GridInfoService.cs
+++ b/OpenSim/Framework/Communications/GridInfoService.cs
@@ -57,6 +57,27 @@ namespace OpenSim.Framework.Communications
57 /// </remarks> 57 /// </remarks>
58 public GridInfoService(IConfigSource configSource) 58 public GridInfoService(IConfigSource configSource)
59 { 59 {
60 loadGridInfo(configSource);
61 }
62
63 /// <summary>
64 /// Default constructor, uses OpenSim.ini.
65 /// </summary>
66 public GridInfoService()
67 {
68 try
69 {
70 IConfigSource configSource = new IniConfigSource(Path.Combine(Util.configDir(), "OpenSim.ini"));
71 loadGridInfo(configSource);
72 }
73 catch (FileNotFoundException)
74 {
75 _log.Warn("[GridInfoService] no OpenSim.ini file found --- GridInfoServices WILL NOT BE AVAILABLE to your users");
76 }
77 }
78
79 private void loadGridInfo(IConfigSource configSource)
80 {
60 _info["platform"] = "OpenSim"; 81 _info["platform"] = "OpenSim";
61 try 82 try
62 { 83 {
@@ -98,13 +119,7 @@ namespace OpenSim.Framework.Communications
98 _log.Debug("[GridInfoService] cannot get grid info from config source, using minimal defaults"); 119 _log.Debug("[GridInfoService] cannot get grid info from config source, using minimal defaults");
99 } 120 }
100 _log.InfoFormat("[GridInfoService] Grid info service initialized with {0} keys", _info.Count); 121 _log.InfoFormat("[GridInfoService] Grid info service initialized with {0} keys", _info.Count);
101 }
102 122
103 /// <summary>
104 /// Default constructor, uses OpenSim.ini.
105 /// </summary>
106 public GridInfoService() : this(new IniConfigSource(Path.Combine(Util.configDir(), "OpenSim.ini")))
107 {
108 } 123 }
109 124
110 private void IssueWarning() 125 private void IssueWarning()