aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs21
-rw-r--r--OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs68
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs21
3 files changed, 55 insertions, 55 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 7ad6f0b..2a3dacc 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -181,8 +181,7 @@ namespace OpenSim.Services.Connectors
181 181
182 public AssetBase Get(string id) 182 public AssetBase Get(string id)
183 { 183 {
184// string uri = MapServer(id) + "/assets/" + id; 184 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
185 string uri = MapServer(id) + "assets/" + id;
186 185
187 AssetBase asset = null; 186 AssetBase asset = null;
188 if (m_Cache != null) 187 if (m_Cache != null)
@@ -219,8 +218,7 @@ namespace OpenSim.Services.Connectors
219 return fullAsset.Metadata; 218 return fullAsset.Metadata;
220 } 219 }
221 220
222// string uri = MapServer(id) + "/assets/" + id + "/metadata"; 221 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
223 string uri = MapServer(id) + "assets/" + id + "/metadata";
224 222
225 AssetMetadata asset = SynchronousRestObjectRequester. 223 AssetMetadata asset = SynchronousRestObjectRequester.
226 MakeRequest<int, AssetMetadata>("GET", uri, 0); 224 MakeRequest<int, AssetMetadata>("GET", uri, 0);
@@ -262,8 +260,7 @@ namespace OpenSim.Services.Connectors
262 260
263 public bool Get(string id, Object sender, AssetRetrieved handler) 261 public bool Get(string id, Object sender, AssetRetrieved handler)
264 { 262 {
265// string uri = MapServer(id) + "/assets/" + id; 263 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
266 string uri = MapServer(id) + "assets/" + id;
267 264
268 AssetBase asset = null; 265 AssetBase asset = null;
269 if (m_Cache != null) 266 if (m_Cache != null)
@@ -382,9 +379,9 @@ namespace OpenSim.Services.Connectors
382 return asset.ID; 379 return asset.ID;
383 } 380 }
384 381
385// string uri = MapServer(asset.FullID.ToString()) + "/assets/"; 382 string uri = Path.Combine(MapServer(asset.FullID.ToString()), "/assets/");
386 383 if (!uri.EndsWith("/"))
387 string uri = MapServer(asset.FullID.ToString()) + "assets/"; 384 uri += "/";
388 385
389 string newID = string.Empty; 386 string newID = string.Empty;
390 try 387 try
@@ -461,8 +458,7 @@ namespace OpenSim.Services.Connectors
461 } 458 }
462 asset.Data = data; 459 asset.Data = data;
463 460
464// string uri = MapServer(id) + "/assets/" + id; 461 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
465 string uri = MapServer(id) + "assets/" + id;
466 462
467 if (SynchronousRestObjectRequester. 463 if (SynchronousRestObjectRequester.
468 MakeRequest<AssetBase, bool>("POST", uri, asset)) 464 MakeRequest<AssetBase, bool>("POST", uri, asset))
@@ -477,8 +473,7 @@ namespace OpenSim.Services.Connectors
477 473
478 public bool Delete(string id) 474 public bool Delete(string id)
479 { 475 {
480// string uri = MapServer(id) + "/assets/" + id; 476 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
481 string uri = MapServer(id) + "assets/" + id;
482 477
483 if (SynchronousRestObjectRequester. 478 if (SynchronousRestObjectRequester.
484 MakeRequest<int, bool>("DELETE", uri, 0)) 479 MakeRequest<int, bool>("DELETE", uri, 0))
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 }