aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs7
-rw-r--r--OpenSim/Services/GridService/GridService.cs26
2 files changed, 30 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index ba46b0d..acdf558 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -109,8 +109,13 @@ namespace OpenSim.Services.Connectors
109 { 109 {
110 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 110 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
111 111
112 if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) 112 if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success"))
113 return true; 113 return true;
114 else if (!replyData.ContainsKey("Result"))
115 m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field");
116 else
117 m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString());
118
114 } 119 }
115 else 120 else
116 m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply"); 121 m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply");
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