diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Grid/GridServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index cf112e1..a1ca58e 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors | |||
86 | 86 | ||
87 | #region IGridService | 87 | #region IGridService |
88 | 88 | ||
89 | public virtual bool RegisterRegion(UUID scopeID, GridRegion regionInfo) | 89 | public virtual string RegisterRegion(UUID scopeID, GridRegion regionInfo) |
90 | { | 90 | { |
91 | Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs(); | 91 | Dictionary<string, object> rinfo = regionInfo.ToKeyValuePairs(); |
92 | Dictionary<string, object> sendData = new Dictionary<string,object>(); | 92 | Dictionary<string, object> sendData = new Dictionary<string,object>(); |
@@ -110,11 +110,23 @@ namespace OpenSim.Services.Connectors | |||
110 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 110 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
111 | 111 | ||
112 | if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success")) | 112 | if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success")) |
113 | return true; | 113 | { |
114 | return String.Empty; | ||
115 | } | ||
116 | else if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "failure")) | ||
117 | { | ||
118 | m_log.DebugFormat("[GRID CONNECTOR]: Registration failed: {0}", replyData["Message"].ToString()); | ||
119 | return replyData["Message"].ToString(); | ||
120 | } | ||
114 | else if (!replyData.ContainsKey("Result")) | 121 | else if (!replyData.ContainsKey("Result")) |
122 | { | ||
115 | m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field"); | 123 | m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field"); |
124 | } | ||
116 | else | 125 | else |
126 | { | ||
117 | m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); | 127 | m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); |
128 | return "Unexpected result "+replyData["Result"].ToString(); | ||
129 | } | ||
118 | 130 | ||
119 | } | 131 | } |
120 | else | 132 | else |
@@ -125,7 +137,7 @@ namespace OpenSim.Services.Connectors | |||
125 | m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); | 137 | m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message); |
126 | } | 138 | } |
127 | 139 | ||
128 | return false; | 140 | return "Error communicating with grid service"; |
129 | } | 141 | } |
130 | 142 | ||
131 | public virtual bool DeregisterRegion(UUID regionID) | 143 | public virtual bool DeregisterRegion(UUID regionID) |