aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs42
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs3
2 files changed, 44 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index a1ca58e..7c8a3e2 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -564,7 +564,47 @@ namespace OpenSim.Services.Connectors
564 564
565 public int GetRegionFlags(UUID scopeID, UUID regionID) 565 public int GetRegionFlags(UUID scopeID, UUID regionID)
566 { 566 {
567 return 0; 567 Dictionary<string, object> sendData = new Dictionary<string, object>();
568
569 sendData["SCOPEID"] = scopeID.ToString();
570 sendData["REGIONID"] = regionID.ToString();
571
572 sendData["METHOD"] = "get_region_flags";
573
574 string reply = string.Empty;
575 try
576 {
577 reply = SynchronousRestFormsRequester.MakeRequest("POST",
578 m_ServerURI + "/grid",
579 ServerUtils.BuildQueryString(sendData));
580 }
581 catch (Exception e)
582 {
583 m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message);
584 return -1;
585 }
586
587 int flags = -1;
588
589 if (reply != string.Empty)
590 {
591 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
592
593 if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null))
594 {
595 Int32.TryParse((string)replyData["result"], out flags);
596 //else
597 // m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags {0}, {1} received wrong type {2}",
598 // scopeID, regionID, replyData["result"].GetType());
599 }
600 else
601 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags {0}, {1} received null response",
602 scopeID, regionID);
603 }
604 else
605 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags received null reply");
606
607 return flags;
568 } 608 }
569 609
570 #endregion 610 #endregion
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index e2ab179..d3be1a8 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -105,6 +105,8 @@ namespace OpenSim.Services.Connectors.Simulation
105 105
106 // Fill it in 106 // Fill it in
107 OSDMap args = PackCreateAgentArguments(aCircuit, destination, flags); 107 OSDMap args = PackCreateAgentArguments(aCircuit, destination, flags);
108 if (args == null)
109 return false;
108 110
109 string strBuffer = ""; 111 string strBuffer = "";
110 byte[] buffer = new byte[1]; 112 byte[] buffer = new byte[1];
@@ -210,6 +212,7 @@ namespace OpenSim.Services.Connectors.Simulation
210 catch (Exception e) 212 catch (Exception e)
211 { 213 {
212 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); 214 m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
215 return null;
213 } 216 }
214 // Add the input arguments 217 // Add the input arguments
215 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); 218 args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());