Works for grid login.

This commit is contained in:
Diva Canto
2010-01-29 09:12:22 -08:00
parent c9e64d578d
commit 0c81966c0a
8 changed files with 123 additions and 27 deletions

View File

@@ -564,7 +564,47 @@ namespace OpenSim.Services.Connectors
public int GetRegionFlags(UUID scopeID, UUID regionID)
{
return 0;
Dictionary<string, object> sendData = new Dictionary<string, object>();
sendData["SCOPEID"] = scopeID.ToString();
sendData["REGIONID"] = regionID.ToString();
sendData["METHOD"] = "get_region_flags";
string reply = string.Empty;
try
{
reply = SynchronousRestFormsRequester.MakeRequest("POST",
m_ServerURI + "/grid",
ServerUtils.BuildQueryString(sendData));
}
catch (Exception e)
{
m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message);
return -1;
}
int flags = -1;
if (reply != string.Empty)
{
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null))
{
Int32.TryParse((string)replyData["result"], out flags);
//else
// m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags {0}, {1} received wrong type {2}",
// scopeID, regionID, replyData["result"].GetType());
}
else
m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags {0}, {1} received null response",
scopeID, regionID);
}
else
m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags received null reply");
return flags;
}
#endregion

View File

@@ -105,6 +105,8 @@ namespace OpenSim.Services.Connectors.Simulation
// Fill it in
OSDMap args = PackCreateAgentArguments(aCircuit, destination, flags);
if (args == null)
return false;
string strBuffer = "";
byte[] buffer = new byte[1];
@@ -210,6 +212,7 @@ namespace OpenSim.Services.Connectors.Simulation
catch (Exception e)
{
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
return null;
}
// Add the input arguments
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());