diff options
author | Melanie | 2012-09-10 13:53:00 +0100 |
---|---|---|
committer | Melanie | 2012-09-10 13:53:00 +0100 |
commit | 21c476228a1dbeef1f180a16e9ebb47c8b3fa185 (patch) | |
tree | 5a2fc5d269eb4711fa2ace11d04731e7dc08607b /OpenSim/Services | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove commented code (diff) | |
download | opensim-SC_OLD-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.zip opensim-SC_OLD-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.tar.gz opensim-SC_OLD-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.tar.bz2 opensim-SC_OLD-21c476228a1dbeef1f180a16e9ebb47c8b3fa185.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Services')
3 files changed, 51 insertions, 43 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 45ebf3a..9e04601 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -126,7 +126,10 @@ namespace OpenSim.Services.Connectors | |||
126 | 126 | ||
127 | // m_log.DebugFormat("[ASSET]: Using {0} for host name for prefix {1}", host, prefix); | 127 | // m_log.DebugFormat("[ASSET]: Using {0} for host name for prefix {1}", host, prefix); |
128 | 128 | ||
129 | return serverUri.Uri.AbsoluteUri; | 129 | string ret = serverUri.Uri.AbsoluteUri; |
130 | if (ret.EndsWith("/")) | ||
131 | ret = ret.Substring(0, ret.Length - 1); | ||
132 | return ret; | ||
130 | } | 133 | } |
131 | 134 | ||
132 | protected void retryCheck(object source, ElapsedEventArgs e) | 135 | protected void retryCheck(object source, ElapsedEventArgs e) |
diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index 3fd0c53..6cd21d1 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | |||
@@ -144,44 +144,48 @@ namespace OpenSim.Services.Connectors.Friends | |||
144 | 144 | ||
145 | private bool Call(GridRegion region, Dictionary<string, object> sendData) | 145 | private bool Call(GridRegion region, Dictionary<string, object> sendData) |
146 | { | 146 | { |
147 | string reqString = ServerUtils.BuildQueryString(sendData); | 147 | Util.FireAndForget(x => { |
148 | //m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: queryString = {0}", reqString); | 148 | string reqString = ServerUtils.BuildQueryString(sendData); |
149 | if (region == null) | 149 | //m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: queryString = {0}", reqString); |
150 | return false; | 150 | if (region == null) |
151 | 151 | return; | |
152 | string path = ServicePath(); | 152 | |
153 | if (!region.ServerURI.EndsWith("/")) | 153 | string path = ServicePath(); |
154 | path = "/" + path; | 154 | if (!region.ServerURI.EndsWith("/")) |
155 | string uri = region.ServerURI + path; | 155 | path = "/" + path; |
156 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri); | 156 | string uri = region.ServerURI + path; |
157 | 157 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri); | |
158 | try | 158 | |
159 | { | 159 | try |
160 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); | ||
161 | if (reply != string.Empty) | ||
162 | { | 160 | { |
163 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | 161 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); |
164 | 162 | if (reply != string.Empty) | |
165 | if (replyData.ContainsKey("RESULT")) | ||
166 | { | 163 | { |
167 | if (replyData["RESULT"].ToString().ToLower() == "true") | 164 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
168 | return true; | 165 | |
166 | if (replyData.ContainsKey("RESULT")) | ||
167 | { | ||
168 | // if (replyData["RESULT"].ToString().ToLower() == "true") | ||
169 | // return; | ||
170 | // else | ||
171 | return; | ||
172 | } | ||
169 | else | 173 | else |
170 | return false; | 174 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: reply data does not contain result field"); |
175 | |||
171 | } | 176 | } |
172 | else | 177 | else |
173 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: reply data does not contain result field"); | 178 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: received empty reply"); |
174 | 179 | } | |
180 | catch (Exception e) | ||
181 | { | ||
182 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message); | ||
175 | } | 183 | } |
176 | else | 184 | |
177 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: received empty reply"); | 185 | return; |
178 | } | 186 | }); |
179 | catch (Exception e) | 187 | |
180 | { | 188 | return true; |
181 | m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message); | ||
182 | } | ||
183 | |||
184 | return false; | ||
185 | } | 189 | } |
186 | } | 190 | } |
187 | } | 191 | } |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index e1c2243..508baf7 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -395,17 +395,18 @@ namespace OpenSim.Services.Connectors.Simulation | |||
395 | private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) | 395 | private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) |
396 | { | 396 | { |
397 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); | 397 | // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); |
398 | Util.FireAndForget(x => { | ||
399 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | ||
398 | 400 | ||
399 | string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; | 401 | try |
400 | 402 | { | |
401 | try | 403 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); |
402 | { | 404 | } |
403 | WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); | 405 | catch (Exception e) |
404 | } | 406 | { |
405 | catch (Exception e) | 407 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); |
406 | { | 408 | } |
407 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); | 409 | }); |
408 | } | ||
409 | 410 | ||
410 | return true; | 411 | return true; |
411 | } | 412 | } |