aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-11-03 19:11:09 +0000
committerJustin Clark-Casey (justincc)2009-11-03 19:11:09 +0000
commitaf0e5d097480de264e7501e7d5d35328be5640bb (patch)
tree4ca5cd796ed9618dc9134a6e5eee1f7e7912bee4 /OpenSim/Region/CoreModules
parentminor: remove some mono compiler warnings (diff)
parentFixed a couple of NREs in corner cases. (diff)
downloadopensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.zip
opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.gz
opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.bz2
opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.xz
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs37
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs13
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs9
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs93
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs26
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs34
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs26
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs25
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs33
-rw-r--r--OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs3
19 files changed, 547 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs
new file mode 100644
index 0000000..b546ccb
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs
@@ -0,0 +1,37 @@
1using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Alerts
4{
5 class DeadlockAlert : IAlert
6 {
7 private LastFrameTimeMonitor m_monitor;
8
9 public DeadlockAlert(LastFrameTimeMonitor m_monitor)
10 {
11 this.m_monitor = m_monitor;
12 }
13
14 #region Implementation of IAlert
15
16 public string GetName()
17 {
18 return "Potential Deadlock Alert";
19 }
20
21 public void Test()
22 {
23 if (m_monitor.GetValue() > 60 * 1000)
24 {
25 if(OnTriggerAlert != null)
26 {
27 OnTriggerAlert(typeof (DeadlockAlert),
28 (int) (m_monitor.GetValue()/1000) + " second(s) since last frame processed.", true);
29 }
30 }
31 }
32
33 public event Alert OnTriggerAlert;
34
35 #endregion
36 }
37}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs
new file mode 100644
index 0000000..b533df9
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs
@@ -0,0 +1,13 @@
1using System;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring
4{
5 internal delegate void Alert(Type reporter, string reason, bool fatal);
6
7 interface IAlert
8 {
9 string GetName();
10 void Test();
11 event Alert OnTriggerAlert;
12 }
13}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
new file mode 100644
index 0000000..a51dccd
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
@@ -0,0 +1,9 @@
1namespace OpenSim.Region.CoreModules.Framework.Monitoring
2{
3 interface IMonitor
4 {
5 double GetValue();
6 string GetName();
7 string GetFriendlyValue(); // Convert to readable numbers
8 }
9}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
new file mode 100644
index 0000000..769af8d
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -0,0 +1,93 @@
1using System.Collections.Generic;
2using System.Reflection;
3using log4net;
4using Nini.Config;
5using OpenSim.Region.CoreModules.Framework.Monitoring.Alerts;
6using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors;
7using OpenSim.Region.Framework.Interfaces;
8using OpenSim.Region.Framework.Scenes;
9
10namespace OpenSim.Region.CoreModules.Framework.Monitoring
11{
12 public class MonitorModule : IRegionModule
13 {
14 private Scene m_scene;
15 private readonly List<IMonitor> m_monitors = new List<IMonitor>();
16 private readonly List<IAlert> m_alerts = new List<IAlert>();
17 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
18
19 public void DebugMonitors(string module, string[] args)
20 {
21 foreach (IMonitor monitor in m_monitors)
22 {
23 m_log.Info("[MonitorModule] " + m_scene.RegionInfo.RegionName + " reports " + monitor.GetName() + " = " + monitor.GetFriendlyValue());
24 }
25 }
26
27 public void TestAlerts()
28 {
29 foreach (IAlert alert in m_alerts)
30 {
31 alert.Test();
32 }
33 }
34
35 #region Implementation of IRegionModule
36
37 public void Initialise(Scene scene, IConfigSource source)
38 {
39 m_scene = scene;
40
41
42 m_scene.AddCommand(this, "monitor report",
43 "monitor report",
44 "Returns a variety of statistics about the current region and/or simulator",
45 DebugMonitors);
46 }
47
48 public void PostInitialise()
49 {
50 m_monitors.Add(new AgentCountMonitor(m_scene));
51 m_monitors.Add(new ChildAgentCountMonitor(m_scene));
52 m_monitors.Add(new GCMemoryMonitor());
53 m_monitors.Add(new ObjectCountMonitor(m_scene));
54 m_monitors.Add(new PhysicsFrameMonitor(m_scene));
55 m_monitors.Add(new PhysicsUpdateFrameMonitor(m_scene));
56 m_monitors.Add(new PWSMemoryMonitor());
57 m_monitors.Add(new ThreadCountMonitor());
58 m_monitors.Add(new TotalFrameMonitor(m_scene));
59 m_monitors.Add(new EventFrameMonitor(m_scene));
60 m_monitors.Add(new LandFrameMonitor(m_scene));
61 m_monitors.Add(new LastFrameTimeMonitor(m_scene));
62
63 m_alerts.Add(new DeadlockAlert(m_monitors.Find(x => x is LastFrameTimeMonitor) as LastFrameTimeMonitor));
64
65 foreach (IAlert alert in m_alerts)
66 {
67 alert.OnTriggerAlert += OnTriggerAlert;
68 }
69 }
70
71 void OnTriggerAlert(System.Type reporter, string reason, bool fatal)
72 {
73 m_log.Error("[Monitor] " + reporter.Name + " for " + m_scene.RegionInfo.RegionName + " reports " + reason + " (Fatal: " + fatal + ")");
74 }
75
76 public void Close()
77 {
78
79 }
80
81 public string Name
82 {
83 get { return "Region Health Monitoring Module"; }
84 }
85
86 public bool IsSharedModule
87 {
88 get { return false; }
89 }
90
91 #endregion
92 }
93}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs
new file mode 100644
index 0000000..edc6e6b
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class AgentCountMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public AgentCountMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.SceneGraph.GetRootAgentCount();
19 }
20
21 public string GetName()
22 {
23 return "Root Agent Count";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + " agent(s)";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs
new file mode 100644
index 0000000..afe6b79
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class ChildAgentCountMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public ChildAgentCountMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.SceneGraph.GetChildAgentCount();
19 }
20
21 public string GetName()
22 {
23 return "Child Agent Count";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + " child agent(s)";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs
new file mode 100644
index 0000000..dec5a9e
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class EventFrameMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public EventFrameMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.MonitorEventTime;
19 }
20
21 public string GetName()
22 {
23 return "Total Event Frame Time";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + "ms";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs
new file mode 100644
index 0000000..cd67fea
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs
@@ -0,0 +1,26 @@
1using System;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class GCMemoryMonitor : IMonitor
6 {
7 #region Implementation of IMonitor
8
9 public double GetValue()
10 {
11 return GC.GetTotalMemory(false);
12 }
13
14 public string GetName()
15 {
16 return "GC Reported Memory";
17 }
18
19 public string GetFriendlyValue()
20 {
21 return (int)(GetValue() / (1024*1024)) + "MB (Global)";
22 }
23
24 #endregion
25 }
26}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs
new file mode 100644
index 0000000..d883fc7
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class LandFrameMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public LandFrameMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.MonitorLandTime;
19 }
20
21 public string GetName()
22 {
23 return "Land Frame Time";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + "ms";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs
new file mode 100644
index 0000000..36363f8
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs
@@ -0,0 +1,34 @@
1using System;
2using OpenSim.Region.Framework.Scenes;
3
4namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
5{
6 class LastFrameTimeMonitor : IMonitor
7 {
8 private readonly Scene m_scene;
9
10 public LastFrameTimeMonitor(Scene scene)
11 {
12 m_scene = scene;
13 }
14
15 #region Implementation of IMonitor
16
17 public double GetValue()
18 {
19 return Environment.TickCount - m_scene.MonitorLastFrameTick;
20 }
21
22 public string GetName()
23 {
24 return "Last Completed Frame At";
25 }
26
27 public string GetFriendlyValue()
28 {
29 return (int)GetValue() + "ms ago";
30 }
31
32 #endregion
33 }
34}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs
new file mode 100644
index 0000000..dd9b19d
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class ObjectCountMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public ObjectCountMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.SceneGraph.GetTotalObjectsCount();
19 }
20
21 public string GetName()
22 {
23 return "Total Objects Count";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + " Object(s)";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs
new file mode 100644
index 0000000..88f2938
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs
@@ -0,0 +1,26 @@
1using System;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class PWSMemoryMonitor : IMonitor
6 {
7 #region Implementation of IMonitor
8
9 public double GetValue()
10 {
11 return System.Diagnostics.Process.GetCurrentProcess().PrivateMemorySize64;
12 }
13
14 public string GetName()
15 {
16 return "Private Working Set Memory";
17 }
18
19 public string GetFriendlyValue()
20 {
21 return (int)(GetValue() / (1024 * 1024)) + "MB (Global)";
22 }
23
24 #endregion
25 }
26}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs
new file mode 100644
index 0000000..4d62e4f
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class PhysicsFrameMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public PhysicsFrameMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.MonitorPhysicsSyncTime + m_scene.MonitorPhysicsUpdateTime;
19 }
20
21 public string GetName()
22 {
23 return "Total Physics Frame Time";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + "ms";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs
new file mode 100644
index 0000000..91ac282
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class PhysicsUpdateFrameMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public PhysicsUpdateFrameMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.MonitorPhysicsUpdateTime;
19 }
20
21 public string GetName()
22 {
23 return "Physics Update Frame Time";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + "ms";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs
new file mode 100644
index 0000000..9300a93
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs
@@ -0,0 +1,25 @@
1
2namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
3{
4 class ThreadCountMonitor : IMonitor
5 {
6 #region Implementation of IMonitor
7
8 public double GetValue()
9 {
10 return System.Diagnostics.Process.GetCurrentProcess().Threads.Count;
11 }
12
13 public string GetName()
14 {
15 return "Total Threads";
16 }
17
18 public string GetFriendlyValue()
19 {
20 return (int)GetValue() + " Thread(s) (Global)";
21 }
22
23 #endregion
24 }
25}
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs
new file mode 100644
index 0000000..dea1f94
--- /dev/null
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs
@@ -0,0 +1,33 @@
1using OpenSim.Region.Framework.Scenes;
2
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{
5 class TotalFrameMonitor : IMonitor
6 {
7 private readonly Scene m_scene;
8
9 public TotalFrameMonitor(Scene scene)
10 {
11 m_scene = scene;
12 }
13
14 #region Implementation of IMonitor
15
16 public double GetValue()
17 {
18 return m_scene.MonitorFrameTime;
19 }
20
21 public string GetName()
22 {
23 return "Total Frame Time";
24 }
25
26 public string GetFriendlyValue()
27 {
28 return (int)GetValue() + "ms";
29 }
30
31 #endregion
32 }
33}
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
index 4199c98..46ee3c0 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
@@ -193,6 +193,10 @@ namespace OpenSim.Region.CoreModules.Hypergrid
193 { 193 {
194 return scene.RegionInfo; 194 return scene.RegionInfo;
195 } 195 }
196 else if (m_scenes.Count > 0)
197 {
198 return m_scenes[0].RegionInfo;
199 }
196 return null; 200 return null;
197 } 201 }
198 202
@@ -248,7 +252,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
248 { 252 {
249 foreach (Scene nextScene in m_scenes) 253 foreach (Scene nextScene in m_scenes)
250 { 254 {
251 if (nextScene.RegionInfo.RegionName == regionName) 255 if (nextScene.RegionInfo.RegionName.Equals(regionName, StringComparison.InvariantCultureIgnoreCase))
252 { 256 {
253 scene = nextScene; 257 scene = nextScene;
254 return true; 258 return true;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
index 046bee5..9c04755 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs
@@ -322,10 +322,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
322 { 322 {
323 List<GridRegion> rinfos = new List<GridRegion>(); 323 List<GridRegion> rinfos = new List<GridRegion>();
324 324
325 // Commenting until regionname exists 325 if (name == string.Empty)
326 //foreach (SimpleRegionInfo r in m_HyperlinkRegions.Values) 326 return rinfos;
327 // if ((r.RegionName != null) && r.RegionName.StartsWith(name)) 327
328 // rinfos.Add(r); 328 foreach (GridRegion r in m_HyperlinkRegions.Values)
329 if ((r.RegionName != null) && r.RegionName.ToLower().StartsWith(name.ToLower()))
330 rinfos.Add(r);
329 331
330 rinfos.AddRange(m_GridServiceConnector.GetRegionsByName(scopeID, name, maxNumber)); 332 rinfos.AddRange(m_GridServiceConnector.GetRegionsByName(scopeID, name, maxNumber));
331 return rinfos; 333 return rinfos;
@@ -602,6 +604,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
602 { 604 {
603 CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(agentData.AgentID); 605 CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(agentData.AgentID);
604 606
607 if (uinfo == null)
608 return false;
609
605 if ((IsLocalUser(uinfo) && (GetHyperlinkRegion(regInfo.RegionHandle) != null)) || 610 if ((IsLocalUser(uinfo) && (GetHyperlinkRegion(regInfo.RegionHandle) != null)) ||
606 (!IsLocalUser(uinfo) && !IsGoingHome(uinfo, regInfo))) 611 (!IsLocalUser(uinfo) && !IsGoingHome(uinfo, regInfo)))
607 { 612 {
@@ -735,6 +740,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
735 // Is the user going back to the home region or the home grid? 740 // Is the user going back to the home region or the home grid?
736 protected bool IsGoingHome(CachedUserInfo uinfo, GridRegion rinfo) 741 protected bool IsGoingHome(CachedUserInfo uinfo, GridRegion rinfo)
737 { 742 {
743 if (uinfo == null)
744 return false;
745
738 if (uinfo.UserProfile == null) 746 if (uinfo.UserProfile == null)
739 return false; 747 return false;
740 748
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 54acbc4..c261943 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -129,6 +129,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
129 successfulAssetRestores++; 129 successfulAssetRestores++;
130 else 130 else
131 failedAssetRestores++; 131 failedAssetRestores++;
132
133 if ((successfulAssetRestores + failedAssetRestores) % 250 == 0)
134 m_log.Debug("[ARCHIVER]: Loaded " + successfulAssetRestores + " assets and failed to load " + failedAssetRestores + " assets...");
132 } 135 }
133 else if (!m_merge && filePath.StartsWith(ArchiveConstants.TERRAINS_PATH)) 136 else if (!m_merge && filePath.StartsWith(ArchiveConstants.TERRAINS_PATH))
134 { 137 {