aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorlbsa712008-09-08 14:30:35 +0000
committerlbsa712008-09-08 14:30:35 +0000
commit8388fe0669f9d140028d1925284491b21a09a1bf (patch)
tree80c7729bef9b88a371c3f561322a97faf262ade6 /OpenSim/Region
parentMantis #2144 (diff)
downloadopensim-SC-8388fe0669f9d140028d1925284491b21a09a1bf.zip
opensim-SC-8388fe0669f9d140028d1925284491b21a09a1bf.tar.gz
opensim-SC-8388fe0669f9d140028d1925284491b21a09a1bf.tar.bz2
opensim-SC-8388fe0669f9d140028d1925284491b21a09a1bf.tar.xz
* some if inversions and added {}'s for readability
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/Application.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs8
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs36
-rw-r--r--OpenSim/Region/ClientStack/RegionApplicationBase.cs25
4 files changed, 48 insertions, 23 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 59ac161..8d2ce55 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -117,7 +117,9 @@ namespace OpenSim
117 msg += "Exception: " + e.ExceptionObject.ToString() + "\r\n"; 117 msg += "Exception: " + e.ExceptionObject.ToString() + "\r\n";
118 Exception ex = (Exception)e.ExceptionObject; 118 Exception ex = (Exception)e.ExceptionObject;
119 if (ex.InnerException != null) 119 if (ex.InnerException != null)
120 {
120 msg += "InnerException: " + ex.InnerException.ToString() + "\r\n"; 121 msg += "InnerException: " + ex.InnerException.ToString() + "\r\n";
122 }
121 123
122 msg += "\r\n"; 124 msg += "\r\n";
123 msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n"; 125 msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n";
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index edb29db..43c1d26 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -77,6 +77,7 @@ namespace OpenSim
77 77
78 m_timedScript = startupConfig.GetString("timer_Script", "disabled"); 78 m_timedScript = startupConfig.GetString("timer_Script", "disabled");
79 } 79 }
80
80 base.ReadConfigSettings(); 81 base.ReadConfigSettings();
81 } 82 }
82 83
@@ -96,13 +97,13 @@ namespace OpenSim
96 base.Startup(); 97 base.Startup();
97 98
98 //Run Startup Commands 99 //Run Startup Commands
99 if (m_startupCommandsFile != String.Empty) 100 if (String.IsNullOrEmpty( m_startupCommandsFile ))
100 { 101 {
101 RunCommandScript(m_startupCommandsFile); 102 m_log.Info("[STARTUP]: No startup command script specified. Moving on...");
102 } 103 }
103 else 104 else
104 { 105 {
105 m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); 106 RunCommandScript(m_startupCommandsFile);
106 } 107 }
107 108
108 // Start timer script (run a script every xx seconds) 109 // Start timer script (run a script every xx seconds)
@@ -365,6 +366,7 @@ namespace OpenSim
365 { 366 {
366 m_sceneManager.TrySetCurrentScene(".."); 367 m_sceneManager.TrySetCurrentScene("..");
367 } 368 }
369
368 m_regionData.Remove(killScene.RegionInfo); 370 m_regionData.Remove(killScene.RegionInfo);
369 m_sceneManager.CloseScene(killScene); 371 m_sceneManager.CloseScene(killScene);
370 } 372 }
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index e2b2bbc..156d022 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -205,7 +205,10 @@ namespace OpenSim
205 { 205 {
206 IConfigSource DefaultConfig = new IniConfigSource(); 206 IConfigSource DefaultConfig = new IniConfigSource();
207 if (DefaultConfig.Configs["Startup"] == null) 207 if (DefaultConfig.Configs["Startup"] == null)
208 {
208 DefaultConfig.AddConfig("Startup"); 209 DefaultConfig.AddConfig("Startup");
210 }
211
209 IConfig config = DefaultConfig.Configs["Startup"]; 212 IConfig config = DefaultConfig.Configs["Startup"];
210 if (config != null) 213 if (config != null)
211 { 214 {
@@ -225,7 +228,9 @@ namespace OpenSim
225 } 228 }
226 229
227 if (DefaultConfig.Configs["StandAlone"] == null) 230 if (DefaultConfig.Configs["StandAlone"] == null)
231 {
228 DefaultConfig.AddConfig("StandAlone"); 232 DefaultConfig.AddConfig("StandAlone");
233 }
229 234
230 config = DefaultConfig.Configs["StandAlone"]; 235 config = DefaultConfig.Configs["StandAlone"];
231 if (config != null) 236 if (config != null)
@@ -242,7 +247,10 @@ namespace OpenSim
242 } 247 }
243 248
244 if (DefaultConfig.Configs["Network"] == null) 249 if (DefaultConfig.Configs["Network"] == null)
250 {
245 DefaultConfig.AddConfig("Network"); 251 DefaultConfig.AddConfig("Network");
252 }
253
246 config = DefaultConfig.Configs["Network"]; 254 config = DefaultConfig.Configs["Network"];
247 if (config != null) 255 if (config != null)
248 { 256 {
@@ -262,7 +270,10 @@ namespace OpenSim
262 } 270 }
263 271
264 if (DefaultConfig.Configs["RemoteAdmin"] == null) 272 if (DefaultConfig.Configs["RemoteAdmin"] == null)
273 {
265 DefaultConfig.AddConfig("RemoteAdmin"); 274 DefaultConfig.AddConfig("RemoteAdmin");
275 }
276
266 config = DefaultConfig.Configs["RemoteAdmin"]; 277 config = DefaultConfig.Configs["RemoteAdmin"];
267 if (config != null) 278 if (config != null)
268 { 279 {
@@ -270,12 +281,16 @@ namespace OpenSim
270 } 281 }
271 282
272 if (DefaultConfig.Configs["Voice"] == null) 283 if (DefaultConfig.Configs["Voice"] == null)
284 {
273 DefaultConfig.AddConfig("Voice"); 285 DefaultConfig.AddConfig("Voice");
286 }
287
274 config = DefaultConfig.Configs["Voice"]; 288 config = DefaultConfig.Configs["Voice"];
275 if (config != null) 289 if (config != null)
276 { 290 {
277 config.Set("enabled", "false"); 291 config.Set("enabled", "false");
278 } 292 }
293
279 return DefaultConfig; 294 return DefaultConfig;
280 295
281 } 296 }
@@ -741,18 +756,23 @@ namespace OpenSim
741 return; 756 return;
742 } 757 }
743 758
744 if (null != inventoryFolder) 759 if (null == inventoryFolder)
745 { 760 {
746 m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID, invPath); 761 if (null == inventoryItem)
747 } 762 {
748 else if (null != inventoryItem) 763 m_log.ErrorFormat("[CONSOLE]: Could not find inventory entry at path {0}", invPath);
749 { 764 return;
750 m_log.InfoFormat("[CONSOLE]: Found item {0} {1} at {2}", inventoryItem.Name, inventoryItem.ID, invPath); 765 }
766 else
767 {
768 m_log.InfoFormat("[CONSOLE]: Found item {0} {1} at {2}", inventoryItem.Name, inventoryItem.ID,
769 invPath);
770 }
751 } 771 }
752 else 772 else
753 { 773 {
754 m_log.ErrorFormat("[CONSOLE]: Could not find inventory entry at path {0}", invPath); 774 m_log.InfoFormat("[CONSOLE]: Found folder {0} {1} at {2}", inventoryFolder.Name, inventoryFolder.ID,
755 return; 775 invPath);
756 } 776 }
757 } 777 }
758 778
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
index d1572fd..dfe922b 100644
--- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs
+++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs
@@ -138,30 +138,31 @@ namespace OpenSim.Region.ClientStack
138 // TODO: Remove this cruft once MasterAvatar is fully deprecated 138 // TODO: Remove this cruft once MasterAvatar is fully deprecated
139 //Master Avatar Setup 139 //Master Avatar Setup
140 UserProfileData masterAvatar; 140 UserProfileData masterAvatar;
141 if (scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero) 141 if (scene.RegionInfo.MasterAvatarAssignedUUID == UUID.Zero)
142 {
143 masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID);
144 scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName;
145 scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName;
146 }
147 else
148 { 142 {
149 masterAvatar = 143 masterAvatar =
150 m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName, 144 m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarFirstName,
151 scene.RegionInfo.MasterAvatarLastName, 145 scene.RegionInfo.MasterAvatarLastName,
152 scene.RegionInfo.MasterAvatarSandboxPassword); 146 scene.RegionInfo.MasterAvatarSandboxPassword);
153 } 147 }
154 148 else
155 if (masterAvatar != null)
156 { 149 {
157 m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]", scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName); 150 masterAvatar = m_commsManager.UserService.SetupMasterUser(scene.RegionInfo.MasterAvatarAssignedUUID);
158 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID; 151 scene.RegionInfo.MasterAvatarFirstName = masterAvatar.FirstName;
152 scene.RegionInfo.MasterAvatarLastName = masterAvatar.SurName;
159 } 153 }
160 else 154
155 if (masterAvatar == null)
161 { 156 {
162 m_log.Info("[PARCEL]: No master avatar found, using null."); 157 m_log.Info("[PARCEL]: No master avatar found, using null.");
163 scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero; 158 scene.RegionInfo.MasterAvatarAssignedUUID = UUID.Zero;
164 } 159 }
160 else
161 {
162 m_log.InfoFormat("[PARCEL]: Found master avatar {0} {1} [" + masterAvatar.ID.ToString() + "]",
163 scene.RegionInfo.MasterAvatarFirstName, scene.RegionInfo.MasterAvatarLastName);
164 scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID;
165 }
165 166
166 scene.LoadPrimsFromStorage(regionInfo.originRegionID); 167 scene.LoadPrimsFromStorage(regionInfo.originRegionID);
167 scene.StartTimer(); 168 scene.StartTimer();