diff options
author | UbitUmarov | 2015-09-02 19:54:53 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-02 19:54:53 +0100 |
commit | a11edceb00b5b86f825bd957bdac9edb91f893dd (patch) | |
tree | c192eae26f3aadf365a66f32fc6d9ade2f0a0c61 /OpenSim/Services/Connectors | |
parent | bad merge? (diff) | |
download | opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.zip opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.gz opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.bz2 opensim-SC-a11edceb00b5b86f825bd957bdac9edb91f893dd.tar.xz |
seems to compile ( tests comented out)
Diffstat (limited to '')
7 files changed, 8 insertions, 173 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 795ca2e..24f802e 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -275,18 +275,11 @@ namespace OpenSim.Services.Connectors | |||
275 | return fullAsset.Data; | 275 | return fullAsset.Data; |
276 | } | 276 | } |
277 | 277 | ||
278 | <<<<<<< HEAD | 278 | using (RestClient rc = new RestClient(MapServer(id))) |
279 | using (RestClient rc = new RestClient(m_ServerURI)) | ||
280 | { | 279 | { |
281 | rc.AddResourcePath("assets"); | 280 | rc.AddResourcePath("assets"); |
282 | rc.AddResourcePath(id); | 281 | rc.AddResourcePath(id); |
283 | rc.AddResourcePath("data"); | 282 | rc.AddResourcePath("data"); |
284 | ======= | ||
285 | RestClient rc = new RestClient(MapServer(id)); | ||
286 | rc.AddResourcePath("assets"); | ||
287 | rc.AddResourcePath(id); | ||
288 | rc.AddResourcePath("data"); | ||
289 | >>>>>>> avn/ubitvar | ||
290 | 283 | ||
291 | rc.RequestMethod = "GET"; | 284 | rc.RequestMethod = "GET"; |
292 | 285 | ||
@@ -300,20 +293,11 @@ namespace OpenSim.Services.Connectors | |||
300 | byte[] ret = new byte[s.Length]; | 293 | byte[] ret = new byte[s.Length]; |
301 | s.Read(ret, 0, (int)s.Length); | 294 | s.Read(ret, 0, (int)s.Length); |
302 | 295 | ||
303 | <<<<<<< HEAD | ||
304 | return ret; | 296 | return ret; |
305 | } | 297 | } |
306 | 298 | ||
307 | return null; | 299 | return null; |
308 | } | 300 | } |
309 | ======= | ||
310 | s.Close(); | ||
311 | return ret; | ||
312 | } | ||
313 | |||
314 | s.Close(); | ||
315 | return null; | ||
316 | >>>>>>> avn/ubitvar | ||
317 | } | 301 | } |
318 | 302 | ||
319 | private class QueuedAssetRequest | 303 | private class QueuedAssetRequest |
@@ -348,24 +332,13 @@ namespace OpenSim.Services.Connectors | |||
348 | List<AssetRetrievedEx> handlers; | 332 | List<AssetRetrievedEx> handlers; |
349 | lock (m_AssetHandlers) | 333 | lock (m_AssetHandlers) |
350 | { | 334 | { |
351 | <<<<<<< HEAD | ||
352 | if (a != null && m_Cache != null) | ||
353 | m_Cache.Cache(a); | ||
354 | ======= | ||
355 | handlers = m_AssetHandlers[id]; | 335 | handlers = m_AssetHandlers[id]; |
356 | m_AssetHandlers.Remove(id); | 336 | m_AssetHandlers.Remove(id); |
357 | } | 337 | } |
358 | >>>>>>> avn/ubitvar | ||
359 | 338 | ||
360 | Util.FireAndForget(x => | 339 | Util.FireAndForget(x => |
361 | { | 340 | { |
362 | <<<<<<< HEAD | 341 | |
363 | handlers = m_AssetHandlers[id]; | ||
364 | m_AssetHandlers.Remove(id); | ||
365 | } | ||
366 | handlers.Invoke(a); | ||
367 | }, m_maxAssetRequestConcurrency, m_Auth); | ||
368 | ======= | ||
369 | foreach (AssetRetrievedEx h in handlers) | 342 | foreach (AssetRetrievedEx h in handlers) |
370 | { | 343 | { |
371 | // Util.FireAndForget(x => | 344 | // Util.FireAndForget(x => |
@@ -382,8 +355,6 @@ namespace OpenSim.Services.Connectors | |||
382 | 355 | ||
383 | // if (handlers != null) | 356 | // if (handlers != null) |
384 | // handlers.Clear(); | 357 | // handlers.Clear(); |
385 | >>>>>>> avn/ubitvar | ||
386 | |||
387 | success = true; | 358 | success = true; |
388 | } | 359 | } |
389 | } | 360 | } |
@@ -510,32 +481,6 @@ namespace OpenSim.Services.Connectors | |||
510 | string newID; | 481 | string newID; |
511 | try | 482 | try |
512 | { | 483 | { |
513 | <<<<<<< HEAD | ||
514 | newID = SynchronousRestObjectRequester.MakeRequest<AssetBase, string>("POST", uri, asset, m_Auth); | ||
515 | } | ||
516 | catch (Exception e) | ||
517 | { | ||
518 | m_log.Warn(string.Format("[ASSET CONNECTOR]: Unable to send asset {0} to asset server. Reason: {1} ", asset.ID, e.Message), e); | ||
519 | return string.Empty; | ||
520 | } | ||
521 | |||
522 | // TEMPORARY: SRAS returns 'null' when it's asked to store existing assets | ||
523 | if (newID == null) | ||
524 | { | ||
525 | m_log.DebugFormat("[ASSET CONNECTOR]: Storing of asset {0} returned null; assuming the asset already exists", asset.ID); | ||
526 | return asset.ID; | ||
527 | } | ||
528 | |||
529 | if (string.IsNullOrEmpty(newID)) | ||
530 | return string.Empty; | ||
531 | |||
532 | asset.ID = newID; | ||
533 | |||
534 | if (m_Cache != null) | ||
535 | m_Cache.Cache(asset); | ||
536 | |||
537 | return newID; | ||
538 | ======= | ||
539 | newID = SynchronousRestObjectRequester. | 484 | newID = SynchronousRestObjectRequester. |
540 | MakeRequest<AssetBase, string>("POST", uri, asset, 25); | 485 | MakeRequest<AssetBase, string>("POST", uri, asset, 25); |
541 | if (newID == null || newID == "") | 486 | if (newID == null || newID == "") |
@@ -588,7 +533,6 @@ namespace OpenSim.Services.Connectors | |||
588 | } | 533 | } |
589 | } | 534 | } |
590 | return asset.ID; | 535 | return asset.ID; |
591 | >>>>>>> avn/ubitvar | ||
592 | } | 536 | } |
593 | 537 | ||
594 | public bool UpdateContent(string id, byte[] data) | 538 | public bool UpdateContent(string id, byte[] data) |
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 10b8d22..8abd046 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -100,14 +100,10 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
100 | m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService"); | 100 | m_log.Error("[USER AGENT CONNECTOR]: No Server URI named in section UserAgentService"); |
101 | throw new Exception("UserAgent connector init error"); | 101 | throw new Exception("UserAgent connector init error"); |
102 | } | 102 | } |
103 | <<<<<<< HEAD | ||
104 | 103 | ||
105 | m_ServerURL = m_ServerURLHost = serviceURI; | 104 | m_ServerURL = m_ServerURLHost = serviceURI; |
106 | if (!m_ServerURL.EndsWith("/")) | 105 | if (!m_ServerURL.EndsWith("/")) |
107 | m_ServerURL += "/"; | 106 | m_ServerURL += "/"; |
108 | ======= | ||
109 | m_ServerURL = serviceURI; | ||
110 | >>>>>>> avn/ubitvar | ||
111 | 107 | ||
112 | //m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0}", m_ServerURL); | 108 | //m_log.DebugFormat("[USER AGENT CONNECTOR]: new connector to {0}", m_ServerURL); |
113 | } | 109 | } |
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs index e236ec3..70f1aee 100644 --- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs +++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | |||
@@ -153,15 +153,9 @@ namespace OpenSim.Services.Connectors | |||
153 | } | 153 | } |
154 | catch (Exception e) | 154 | catch (Exception e) |
155 | { | 155 | { |
156 | <<<<<<< HEAD | ||
157 | m_log.Warn(string.Format( | ||
158 | "[NEIGHBOUR SERVICES CONNECTOR]: Unable to send HelloNeighbour from {0} to {1} (uri {2}). Exception {3} ", | ||
159 | thisRegion.RegionName, region.RegionName, uri, e.Message), e); | ||
160 | ======= | ||
161 | // m_log.WarnFormat( | 156 | // m_log.WarnFormat( |
162 | // "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}", | 157 | // "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}. Exception {2}{3}", |
163 | // thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); | 158 | // thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace); |
164 | >>>>>>> avn/ubitvar | ||
165 | 159 | ||
166 | return false; | 160 | return false; |
167 | } | 161 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 6043b70..bd35c6f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -423,83 +423,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
423 | 423 | ||
424 | #endregion IGridService | 424 | #endregion IGridService |
425 | 425 | ||
426 | private void UploadMapTile(IScene scene) | ||
427 | { | ||
428 | string errorMessage = null; | ||
429 | |||
430 | // Create a PNG map tile and upload it to the AddMapTile API | ||
431 | byte[] pngData = Utils.EmptyBytes; | ||
432 | IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>(); | ||
433 | if (tileGenerator == null) | ||
434 | { | ||
435 | m_log.Warn("[SIMIAN GRID CONNECTOR]: Cannot upload PNG map tile without an IMapImageGenerator"); | ||
436 | return; | ||
437 | } | ||
438 | |||
439 | using (Image mapTile = tileGenerator.CreateMapTile()) | ||
440 | { | ||
441 | using (MemoryStream stream = new MemoryStream()) | ||
442 | { | ||
443 | mapTile.Save(stream, ImageFormat.Png); | ||
444 | pngData = stream.ToArray(); | ||
445 | } | ||
446 | } | ||
447 | |||
448 | List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>() | ||
449 | { | ||
450 | new MultipartForm.Parameter("X", scene.RegionInfo.RegionLocX.ToString()), | ||
451 | new MultipartForm.Parameter("Y", scene.RegionInfo.RegionLocY.ToString()), | ||
452 | new MultipartForm.File("Tile", "tile.png", "image/png", pngData) | ||
453 | }; | ||
454 | |||
455 | // Make the remote storage request | ||
456 | try | ||
457 | { | ||
458 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); | ||
459 | |||
460 | HttpWebResponse response = MultipartForm.Post(request, postParameters); | ||
461 | using (Stream responseStream = response.GetResponseStream()) | ||
462 | { | ||
463 | string responseStr = null; | ||
464 | |||
465 | try | ||
466 | { | ||
467 | responseStr = responseStream.GetStreamString(); | ||
468 | OSD responseOSD = OSDParser.Deserialize(responseStr); | ||
469 | if (responseOSD.Type == OSDType.Map) | ||
470 | { | ||
471 | OSDMap responseMap = (OSDMap)responseOSD; | ||
472 | if (responseMap["Success"].AsBoolean()) | ||
473 | m_log.Info("[SIMIAN GRID CONNECTOR]: Uploaded " + pngData.Length + " byte PNG map tile to AddMapTile"); | ||
474 | else | ||
475 | errorMessage = "Upload failed: " + responseMap["Message"].AsString(); | ||
476 | } | ||
477 | else | ||
478 | { | ||
479 | errorMessage = "Response format was invalid:\n" + responseStr; | ||
480 | } | ||
481 | } | ||
482 | catch (Exception ex) | ||
483 | { | ||
484 | if (!String.IsNullOrEmpty(responseStr)) | ||
485 | errorMessage = "Failed to parse the response:\n" + responseStr; | ||
486 | else | ||
487 | errorMessage = "Failed to retrieve the response: " + ex.Message; | ||
488 | } | ||
489 | } | ||
490 | } | ||
491 | catch (WebException ex) | ||
492 | { | ||
493 | errorMessage = ex.Message; | ||
494 | } | ||
495 | |||
496 | if (!String.IsNullOrEmpty(errorMessage)) | ||
497 | { | ||
498 | m_log.WarnFormat("[SIMIAN GRID CONNECTOR]: Failed to store {0} byte PNG map tile for {1}: {2}", | ||
499 | pngData.Length, scene.RegionInfo.RegionName, errorMessage.Replace('\n', ' ')); | ||
500 | } | ||
501 | } | ||
502 | |||
503 | private GridRegion GetNearestRegion(Vector3d position, bool onlyEnabled) | 426 | private GridRegion GetNearestRegion(Vector3d position, bool onlyEnabled) |
504 | { | 427 | { |
505 | NameValueCollection requestArgs = new NameValueCollection | 428 | NameValueCollection requestArgs = new NameValueCollection |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 08c5c50..563a1e7 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -191,15 +191,14 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
191 | return accounts; | 191 | return accounts; |
192 | } | 192 | } |
193 | 193 | ||
194 | <<<<<<< HEAD | ||
195 | public void InvalidateCache(UUID userID) | 194 | public void InvalidateCache(UUID userID) |
196 | { | 195 | { |
197 | m_accountCache.Remove(userID); | 196 | m_accountCache.Remove(userID); |
198 | ======= | 197 | } |
198 | |||
199 | public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string query) | 199 | public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string query) |
200 | { | 200 | { |
201 | return null; | 201 | return null; |
202 | >>>>>>> avn/ubitvar | ||
203 | } | 202 | } |
204 | 203 | ||
205 | public bool StoreUserAccount(UserAccount data) | 204 | public bool StoreUserAccount(UserAccount data) |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 28b6de7..493d7e0 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -283,13 +283,8 @@ namespace OpenSim.Services.Connectors.Simulation | |||
283 | } | 283 | } |
284 | 284 | ||
285 | 285 | ||
286 | <<<<<<< HEAD | 286 | |
287 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, List<UUID> featuresAvailable, out string version, out string reason) | 287 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, List<UUID> featuresAvailable, out string version, out string reason) |
288 | ======= | ||
289 | /// <summary> | ||
290 | /// </summary> | ||
291 | public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string myversion, out string version, out string reason) | ||
292 | >>>>>>> avn/ubitvar | ||
293 | { | 288 | { |
294 | reason = "Failed to contact destination"; | 289 | reason = "Failed to contact destination"; |
295 | version = "Unknown"; | 290 | version = "Unknown"; |
@@ -306,7 +301,6 @@ namespace OpenSim.Services.Connectors.Simulation | |||
306 | request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); | 301 | request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); |
307 | request.Add("position", OSD.FromString(position.ToString())); | 302 | request.Add("position", OSD.FromString(position.ToString())); |
308 | request.Add("my_version", OSD.FromString(myversion)); | 303 | request.Add("my_version", OSD.FromString(myversion)); |
309 | <<<<<<< HEAD | ||
310 | 304 | ||
311 | OSDArray features = new OSDArray(); | 305 | OSDArray features = new OSDArray(); |
312 | foreach (UUID feature in featuresAvailable) | 306 | foreach (UUID feature in featuresAvailable) |
@@ -314,8 +308,6 @@ namespace OpenSim.Services.Connectors.Simulation | |||
314 | 308 | ||
315 | request.Add("features", features); | 309 | request.Add("features", features); |
316 | 310 | ||
317 | ======= | ||
318 | >>>>>>> avn/ubitvar | ||
319 | if (agentHomeURI != null) | 311 | if (agentHomeURI != null) |
320 | request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); | 312 | request.Add("agent_home_uri", OSD.FromString(agentHomeURI)); |
321 | 313 | ||
@@ -366,8 +358,6 @@ namespace OpenSim.Services.Connectors.Simulation | |||
366 | return false; | 358 | return false; |
367 | } | 359 | } |
368 | 360 | ||
369 | <<<<<<< HEAD | ||
370 | |||
371 | featuresAvailable.Clear(); | 361 | featuresAvailable.Clear(); |
372 | 362 | ||
373 | if (result.ContainsKey("features")) | 363 | if (result.ContainsKey("features")) |
@@ -377,12 +367,6 @@ namespace OpenSim.Services.Connectors.Simulation | |||
377 | foreach (OSD o in array) | 367 | foreach (OSD o in array) |
378 | featuresAvailable.Add(new UUID(o.AsString())); | 368 | featuresAvailable.Add(new UUID(o.AsString())); |
379 | } | 369 | } |
380 | ======= | ||
381 | OSDMap resp = (OSDMap)result["_Result"]; | ||
382 | success = resp["success"].AsBoolean(); | ||
383 | reason = resp["reason"].AsString(); | ||
384 | >>>>>>> avn/ubitvar | ||
385 | |||
386 | return success; | 370 | return success; |
387 | } | 371 | } |
388 | catch (Exception e) | 372 | catch (Exception e) |
@@ -467,17 +451,13 @@ namespace OpenSim.Services.Connectors.Simulation | |||
467 | args["destination_name"] = OSD.FromString(destination.RegionName); | 451 | args["destination_name"] = OSD.FromString(destination.RegionName); |
468 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | 452 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); |
469 | 453 | ||
470 | <<<<<<< HEAD | 454 | |
471 | OSDMap result = WebUtil.PostToService(uri, args, 40000, false); | 455 | OSDMap result = WebUtil.PostToService(uri, args, 40000, false); |
472 | 456 | ||
473 | if (result == null) | 457 | if (result == null) |
474 | return false; | 458 | return false; |
475 | bool success = result["success"].AsBoolean(); | 459 | bool success = result["success"].AsBoolean(); |
476 | if (!success) | 460 | if (!success) |
477 | ======= | ||
478 | OSDMap response = WebUtil.PostToService(uri, args, 40000); | ||
479 | if (response["Success"] == "False") | ||
480 | >>>>>>> avn/ubitvar | ||
481 | return false; | 461 | return false; |
482 | } | 462 | } |
483 | catch (Exception e) | 463 | catch (Exception e) |
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index e5fb5a8..15a9fbe 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs | |||
@@ -191,14 +191,13 @@ namespace OpenSim.Services.Connectors | |||
191 | return accounts; | 191 | return accounts; |
192 | } | 192 | } |
193 | 193 | ||
194 | <<<<<<< HEAD | ||
195 | public void InvalidateCache(UUID userID) | 194 | public void InvalidateCache(UUID userID) |
196 | { | 195 | { |
197 | ======= | 196 | } |
197 | |||
198 | public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where) | 198 | public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where) |
199 | { | 199 | { |
200 | return null; // Not implemented for regions | 200 | return null; // Not implemented for regions |
201 | >>>>>>> avn/ubitvar | ||
202 | } | 201 | } |
203 | 202 | ||
204 | public virtual bool StoreUserAccount(UserAccount data) | 203 | public virtual bool StoreUserAccount(UserAccount data) |