aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Grid
diff options
context:
space:
mode:
authorDiva Canto2010-01-14 06:36:39 -0800
committerDiva Canto2010-01-14 06:36:39 -0800
commit4bae547ecb67fcf74981ad85c02872dedc99f94a (patch)
tree3d842021400552d32d618f264556add6eecea649 /OpenSim/Services/Connectors/Grid
parentTake the verbose debug messages in AgentHandler out again. (diff)
downloadopensim-SC_OLD-4bae547ecb67fcf74981ad85c02872dedc99f94a.zip
opensim-SC_OLD-4bae547ecb67fcf74981ad85c02872dedc99f94a.tar.gz
opensim-SC_OLD-4bae547ecb67fcf74981ad85c02872dedc99f94a.tar.bz2
opensim-SC_OLD-4bae547ecb67fcf74981ad85c02872dedc99f94a.tar.xz
Added the 2 missing methods in the grid service remote connections.
Diffstat (limited to 'OpenSim/Services/Connectors/Grid')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs101
1 files changed, 97 insertions, 4 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index 7f1f2fd..cf112e1 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -448,21 +448,114 @@ namespace OpenSim.Services.Connectors
448 return rinfos; 448 return rinfos;
449 } 449 }
450 450
451 #endregion
452
453 public List<GridRegion> GetDefaultRegions(UUID scopeID) 451 public List<GridRegion> GetDefaultRegions(UUID scopeID)
454 { 452 {
455 return null; 453 Dictionary<string, object> sendData = new Dictionary<string, object>();
454
455 sendData["SCOPEID"] = scopeID.ToString();
456
457 sendData["METHOD"] = "get_default_regions";
458
459 List<GridRegion> rinfos = new List<GridRegion>();
460 string reply = string.Empty;
461 try
462 {
463 reply = SynchronousRestFormsRequester.MakeRequest("POST",
464 m_ServerURI + "/grid",
465 ServerUtils.BuildQueryString(sendData));
466
467 //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
468 }
469 catch (Exception e)
470 {
471 m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message);
472 return rinfos;
473 }
474
475 if (reply != string.Empty)
476 {
477 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
478
479 if (replyData != null)
480 {
481 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
482 foreach (object r in rinfosList)
483 {
484 if (r is Dictionary<string, object>)
485 {
486 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
487 rinfos.Add(rinfo);
488 }
489 }
490 }
491 else
492 m_log.DebugFormat("[GRID CONNECTOR]: GetDefaultRegions {0} received null response",
493 scopeID);
494 }
495 else
496 m_log.DebugFormat("[GRID CONNECTOR]: GetDefaultRegions received null reply");
497
498 return rinfos;
456 } 499 }
457 500
458 public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y) 501 public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y)
459 { 502 {
460 return null; 503 Dictionary<string, object> sendData = new Dictionary<string, object>();
504
505 sendData["SCOPEID"] = scopeID.ToString();
506 sendData["X"] = x.ToString();
507 sendData["Y"] = y.ToString();
508
509 sendData["METHOD"] = "get_fallback_regions";
510
511 List<GridRegion> rinfos = new List<GridRegion>();
512 string reply = string.Empty;
513 try
514 {
515 reply = SynchronousRestFormsRequester.MakeRequest("POST",
516 m_ServerURI + "/grid",
517 ServerUtils.BuildQueryString(sendData));
518
519 //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply);
520 }
521 catch (Exception e)
522 {
523 m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message);
524 return rinfos;
525 }
526
527 if (reply != string.Empty)
528 {
529 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
530
531 if (replyData != null)
532 {
533 Dictionary<string, object>.ValueCollection rinfosList = replyData.Values;
534 foreach (object r in rinfosList)
535 {
536 if (r is Dictionary<string, object>)
537 {
538 GridRegion rinfo = new GridRegion((Dictionary<string, object>)r);
539 rinfos.Add(rinfo);
540 }
541 }
542 }
543 else
544 m_log.DebugFormat("[GRID CONNECTOR]: GetFallbackRegions {0}, {1}-{2} received null response",
545 scopeID, x, y);
546 }
547 else
548 m_log.DebugFormat("[GRID CONNECTOR]: GetFallbackRegions received null reply");
549
550 return rinfos;
461 } 551 }
462 552
463 public int GetRegionFlags(UUID scopeID, UUID regionID) 553 public int GetRegionFlags(UUID scopeID, UUID regionID)
464 { 554 {
465 return 0; 555 return 0;
466 } 556 }
557
558 #endregion
559
467 } 560 }
468} 561}