aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Services/GridService/GridService.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 991acf2..a2e4771 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -69,18 +69,40 @@ namespace OpenSim.Services.GridService
69 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY))) 69 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
70 { 70 {
71 // Region reregistering in other coordinates. Delete the old entry 71 // Region reregistering in other coordinates. Delete the old entry
72 m_Database.Delete(regionInfos.RegionID); 72 m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.",
73 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
74
75 try
76 {
77 m_Database.Delete(regionInfos.RegionID);
78 }
79 catch (Exception e)
80 {
81 m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e);
82 }
73 } 83 }
74 84
75 // Everything is ok, let's register 85 // Everything is ok, let's register
76 RegionData rdata = RegionInfo2RegionData(regionInfos); 86 RegionData rdata = RegionInfo2RegionData(regionInfos);
77 rdata.ScopeID = scopeID; 87 rdata.ScopeID = scopeID;
78 m_Database.Store(rdata); 88 try
89 {
90 m_Database.Store(rdata);
91 }
92 catch (Exception e)
93 {
94 m_log.DebugFormat("[GRID SERVICE]: Database exception: {0}", e);
95 }
96
97 m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) registered successfully at {2}-{3}",
98 regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
99
79 return true; 100 return true;
80 } 101 }
81 102
82 public bool DeregisterRegion(UUID regionID) 103 public bool DeregisterRegion(UUID regionID)
83 { 104 {
105 m_log.DebugFormat("[GRID SERVICE]: Region {0} deregistered", regionID);
84 return m_Database.Delete(regionID); 106 return m_Database.Delete(regionID);
85 } 107 }
86 108