diff options
author | Melanie | 2009-10-06 17:44:59 +0100 |
---|---|---|
committer | Melanie | 2009-10-06 17:44:59 +0100 |
commit | 0374f1b144f3faf35da39e3925e8abd4b2a8bd04 (patch) | |
tree | 456d3d532c70d32564d35fc3cb9bbc81bdf08b2e /OpenSim/Services/GridService/GridService.cs | |
parent | Make sure that keys exist in arrays before trying to access them. (diff) | |
parent | Corrected words in error message. (diff) | |
download | opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.zip opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.tar.gz opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.tar.bz2 opensim-SC_OLD-0374f1b144f3faf35da39e3925e8abd4b2a8bd04.tar.xz |
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Services/GridService/GridService.cs')
-rw-r--r-- | OpenSim/Services/GridService/GridService.cs | 26 |
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 | ||