Reapply r7369 r7367 r7366 r7370 r7381. This brings it back up to the new
libOMV.0.6.1-post-fixes
parent
3234472d62
commit
f518ca7feb
|
@ -153,7 +153,7 @@ namespace OpenSim.Data
|
||||||
simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]);
|
simData.regionLocX = Convert.ToUInt32((string) responseData["region_locx"]);
|
||||||
simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]);
|
simData.regionLocY = Convert.ToUInt32((string) responseData["region_locy"]);
|
||||||
simData.regionHandle =
|
simData.regionHandle =
|
||||||
Helpers.UIntsToLong((simData.regionLocX*Constants.RegionSize),
|
Utils.UIntsToLong((simData.regionLocX * Constants.RegionSize),
|
||||||
(simData.regionLocY*Constants.RegionSize));
|
(simData.regionLocY*Constants.RegionSize));
|
||||||
simData.serverIP = (string) responseData["sim_ip"];
|
simData.serverIP = (string) responseData["sim_ip"];
|
||||||
simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]);
|
simData.serverPort = Convert.ToUInt32((string) responseData["sim_port"]);
|
||||||
|
|
|
@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
|
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
|
||||||
m_log.Warn("[SEED]: " + capsBase + m_requestPath);
|
m_log.Warn("[SEED]: " + capsBase + m_requestPath);
|
||||||
//m_capsHandlers["MapLayer"] =
|
//m_capsHandlers["MapLayer"] =
|
||||||
// new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST",
|
// new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
|
||||||
// capsBase + m_mapLayerPath,
|
// capsBase + m_mapLayerPath,
|
||||||
// GetMapLayer);
|
// GetMapLayer);
|
||||||
m_capsHandlers["NewFileAgentInventory"] =
|
m_capsHandlers["NewFileAgentInventory"] =
|
||||||
|
@ -297,7 +297,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
Hashtable inventoryhash = (Hashtable)foldersrequested[i];
|
Hashtable inventoryhash = (Hashtable)foldersrequested[i];
|
||||||
|
|
||||||
LLSDFetchInventoryDescendents llsdRequest = new LLSDFetchInventoryDescendents();
|
LLSDFetchInventoryDescendents llsdRequest = new LLSDFetchInventoryDescendents();
|
||||||
LLSDHelpers.DeserialiseLLSDMap(inventoryhash, llsdRequest);
|
LLSDHelpers.DeserialiseOSDMap(inventoryhash, llsdRequest);
|
||||||
LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
|
LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
|
||||||
|
|
||||||
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
|
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
|
||||||
|
@ -431,7 +431,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
m_log.Debug("[CAPS]: MapLayer Request in region: " + m_regionName);
|
m_log.Debug("[CAPS]: MapLayer Request in region: " + m_regionName);
|
||||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||||
mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
|
mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
|
||||||
return mapResponse;
|
return mapResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,9 +439,9 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected static LLSDMapLayer GetLLSDMapLayerResponse()
|
protected static OSDMapLayer GetOSDMapLayerResponse()
|
||||||
{
|
{
|
||||||
LLSDMapLayer mapLayer = new LLSDMapLayer();
|
OSDMapLayer mapLayer = new OSDMapLayer();
|
||||||
mapLayer.Right = 5000;
|
mapLayer.Right = 5000;
|
||||||
mapLayer.Top = 5000;
|
mapLayer.Top = 5000;
|
||||||
mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
|
mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
|
||||||
|
@ -545,7 +545,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
|
|
||||||
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
|
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
|
||||||
LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
|
LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
|
||||||
LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest);
|
LLSDHelpers.DeserialiseOSDMap(hash, llsdUpdateRequest);
|
||||||
|
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||||
|
@ -600,10 +600,10 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||||
{
|
{
|
||||||
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
|
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
|
||||||
//OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request));
|
//OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request));
|
||||||
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
|
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
|
||||||
LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
|
LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
|
||||||
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
|
LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest);
|
||||||
|
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||||
|
|
|
@ -30,11 +30,11 @@ using System.Collections;
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("ARRAY")]
|
[LLSDType("ARRAY")]
|
||||||
public class LLSDArray
|
public class OSDArray
|
||||||
{
|
{
|
||||||
public ArrayList Array = new ArrayList();
|
public ArrayList Array = new ArrayList();
|
||||||
|
|
||||||
public LLSDArray()
|
public OSDArray()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDAssetUploadRequest
|
public class LLSDAssetUploadRequest
|
||||||
{
|
{
|
||||||
public string asset_type = String.Empty;
|
public string asset_type = String.Empty;
|
||||||
|
|
|
@ -29,7 +29,7 @@ using System;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDAssetUploadResponse
|
public class LLSDAssetUploadResponse
|
||||||
{
|
{
|
||||||
public string uploader = String.Empty;
|
public string uploader = String.Empty;
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public class LLSDCapEvent
|
public class LLSDCapEvent
|
||||||
{
|
{
|
||||||
public int id = 0;
|
public int id = 0;
|
||||||
public LLSDArray events = new LLSDArray();
|
public OSDArray events = new OSDArray();
|
||||||
|
|
||||||
public LLSDCapEvent()
|
public LLSDCapEvent()
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
XmlTextWriter writer = new XmlTextWriter(sw);
|
XmlTextWriter writer = new XmlTextWriter(sw);
|
||||||
writer.Formatting = Formatting.None;
|
writer.Formatting = Formatting.None;
|
||||||
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
|
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
|
||||||
SerializeLLSDType(writer, obj);
|
SerializeOSDType(writer, obj);
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
writer.Close();
|
writer.Close();
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
return sw.ToString();
|
return sw.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void SerializeLLSDType(XmlTextWriter writer, object obj)
|
private static void SerializeOSDType(XmlTextWriter writer, object obj)
|
||||||
{
|
{
|
||||||
Type myType = obj.GetType();
|
Type myType = obj.GetType();
|
||||||
LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
|
LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
|
||||||
|
@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
fieldName = fieldName.Replace("___", "-");
|
fieldName = fieldName.Replace("___", "-");
|
||||||
writer.WriteString(fieldName);
|
writer.WriteString(fieldName);
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
SerializeLLSDType(writer, fieldValue);
|
SerializeOSDType(writer, fieldValue);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -87,13 +87,13 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
LLSD.LLSDWriteOne(writer, fieldValue);
|
LLSD.LLSDWriteOne(writer, fieldValue);
|
||||||
// OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
|
// OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
|
||||||
// writer, OpenMetaverse.StructuredData.LLSD.FromObject(fieldValue));
|
// writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
break;
|
break;
|
||||||
case "ARRAY":
|
case "ARRAY":
|
||||||
// LLSDArray arrayObject = obj as LLSDArray;
|
// OSDArray arrayObject = obj as OSDArray;
|
||||||
// ArrayList a = arrayObject.Array;
|
// ArrayList a = arrayObject.Array;
|
||||||
ArrayList a = (ArrayList) obj.GetType().GetField("Array").GetValue(obj);
|
ArrayList a = (ArrayList) obj.GetType().GetField("Array").GetValue(obj);
|
||||||
if (a != null)
|
if (a != null)
|
||||||
|
@ -101,7 +101,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
writer.WriteStartElement(String.Empty, "array", String.Empty);
|
writer.WriteStartElement(String.Empty, "array", String.Empty);
|
||||||
foreach (object item in a)
|
foreach (object item in a)
|
||||||
{
|
{
|
||||||
SerializeLLSDType(writer, item);
|
SerializeOSDType(writer, item);
|
||||||
}
|
}
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
}
|
}
|
||||||
|
@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
LLSD.LLSDWriteOne(writer, obj);
|
LLSD.LLSDWriteOne(writer, obj);
|
||||||
//OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
|
//OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
|
||||||
// writer, OpenMetaverse.StructuredData.LLSD.FromObject(obj));
|
// writer, OpenMetaverse.StructuredData.OSD.FromObject(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
|
public static object DeserialiseOSDMap(Hashtable llsd, object obj)
|
||||||
{
|
{
|
||||||
Type myType = obj.GetType();
|
Type myType = obj.GetType();
|
||||||
LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
|
LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
|
||||||
|
@ -133,12 +133,12 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
FieldInfo field = myType.GetField(keyName);
|
FieldInfo field = myType.GetField(keyName);
|
||||||
if (field != null)
|
if (field != null)
|
||||||
{
|
{
|
||||||
// if (enumerator.Value is OpenMetaverse.StructuredData.LLSDMap)
|
// if (enumerator.Value is OpenMetaverse.StructuredData.OSDMap)
|
||||||
if (enumerator.Value is Hashtable)
|
if (enumerator.Value is Hashtable)
|
||||||
{
|
{
|
||||||
object fieldValue = field.GetValue(obj);
|
object fieldValue = field.GetValue(obj);
|
||||||
DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
|
DeserialiseOSDMap((Hashtable) enumerator.Value, fieldValue);
|
||||||
// DeserialiseLLSDMap((OpenMetaverse.StructuredData.LLSDMap) enumerator.Value, fieldValue);
|
// DeserialiseOSDMap((OpenMetaverse.StructuredData.OSDMap) enumerator.Value, fieldValue);
|
||||||
}
|
}
|
||||||
else if (enumerator.Value is ArrayList)
|
else if (enumerator.Value is ArrayList)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDInventoryItem
|
public class LLSDInventoryItem
|
||||||
{
|
{
|
||||||
public UUID parent_id;
|
public UUID parent_id;
|
||||||
|
@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public int created_at;
|
public int created_at;
|
||||||
}
|
}
|
||||||
|
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDPermissions
|
public class LLSDPermissions
|
||||||
{
|
{
|
||||||
public UUID creator_id;
|
public UUID creator_id;
|
||||||
|
@ -61,20 +61,20 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public bool is_owner_group;
|
public bool is_owner_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDSaleInfo
|
public class LLSDSaleInfo
|
||||||
{
|
{
|
||||||
public int sale_price;
|
public int sale_price;
|
||||||
public string sale_type;
|
public string sale_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDInventoryDescendents
|
public class LLSDInventoryDescendents
|
||||||
{
|
{
|
||||||
public LLSDArray folders = new LLSDArray();
|
public OSDArray folders = new OSDArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDFetchInventoryDescendents
|
public class LLSDFetchInventoryDescendents
|
||||||
{
|
{
|
||||||
public UUID folder_id;
|
public UUID folder_id;
|
||||||
|
@ -84,13 +84,13 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public bool fetch_items;
|
public bool fetch_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDInventoryFolderContents
|
public class LLSDInventoryFolderContents
|
||||||
{
|
{
|
||||||
public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-"
|
public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-"
|
||||||
public int descendents;
|
public int descendents;
|
||||||
public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
|
public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
|
||||||
public LLSDArray items = new LLSDArray();
|
public OSDArray items = new OSDArray();
|
||||||
public UUID owner___id; // and of course we can't have field names with "-" in
|
public UUID owner___id; // and of course we can't have field names with "-" in
|
||||||
public int version;
|
public int version;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDItemUpdate
|
public class LLSDItemUpdate
|
||||||
{
|
{
|
||||||
public UUID item_id;
|
public UUID item_id;
|
||||||
|
|
|
@ -30,7 +30,7 @@ using OpenMetaverse;
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDMapLayer
|
public class OSDMapLayer
|
||||||
{
|
{
|
||||||
public int Left = 0;
|
public int Left = 0;
|
||||||
public int Right = 0;
|
public int Right = 0;
|
||||||
|
@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public int Bottom = 0;
|
public int Bottom = 0;
|
||||||
public UUID ImageID = UUID.Zero;
|
public UUID ImageID = UUID.Zero;
|
||||||
|
|
||||||
public LLSDMapLayer()
|
public OSDMapLayer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
public class LLSDMapLayerResponse
|
public class LLSDMapLayerResponse
|
||||||
{
|
{
|
||||||
public LLSDMapRequest AgentData = new LLSDMapRequest();
|
public LLSDMapRequest AgentData = new LLSDMapRequest();
|
||||||
public LLSDArray LayerData = new LLSDArray();
|
public OSDArray LayerData = new OSDArray();
|
||||||
|
|
||||||
public LLSDMapLayerResponse()
|
public LLSDMapLayerResponse()
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ using System.Collections;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDParcelVoiceInfoResponse
|
public class LLSDParcelVoiceInfoResponse
|
||||||
{
|
{
|
||||||
public int parcel_local_id;
|
public int parcel_local_id;
|
||||||
|
|
|
@ -53,12 +53,12 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
//string requestBody = streamReader.ReadToEnd();
|
//string requestBody = streamReader.ReadToEnd();
|
||||||
//streamReader.Close();
|
//streamReader.Close();
|
||||||
|
|
||||||
// OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)
|
// OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)
|
||||||
// OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
|
// OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
|
||||||
|
|
||||||
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
|
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
|
||||||
TRequest llsdRequest = new TRequest();
|
TRequest llsdRequest = new TRequest();
|
||||||
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
|
LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest);
|
||||||
|
|
||||||
TResponse response = m_method(llsdRequest);
|
TResponse response = m_method(llsdRequest);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDTaskInventoryUploadComplete
|
public class LLSDTaskInventoryUploadComplete
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -29,7 +29,7 @@ using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDTaskScriptUpdate
|
public class LLSDTaskScriptUpdate
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -46,9 +46,9 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class LLSDMap : LLSDType
|
public class OSDMap : LLSDType
|
||||||
{
|
{
|
||||||
public LLSDMap() : base("MAP")
|
public OSDMap() : base("MAP")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
namespace OpenSim.Framework.Communications.Capabilities
|
namespace OpenSim.Framework.Communications.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDVoiceAccountResponse
|
public class LLSDVoiceAccountResponse
|
||||||
{
|
{
|
||||||
public string username;
|
public string username;
|
||||||
|
|
|
@ -201,17 +201,17 @@ namespace OpenSim.Framework.Communications
|
||||||
return (xmlRpcResponse);
|
return (xmlRpcResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD GenerateFailureResponseLLSD(string reason, string message, string login)
|
public OSD GenerateFailureResponseLLSD(string reason, string message, string login)
|
||||||
{
|
{
|
||||||
LLSDMap map = new LLSDMap();
|
OSDMap map = new OSDMap();
|
||||||
|
|
||||||
// Ensure Login Failed message/reason;
|
// Ensure Login Failed message/reason;
|
||||||
ErrorMessage = message;
|
ErrorMessage = message;
|
||||||
ErrorReason = reason;
|
ErrorReason = reason;
|
||||||
|
|
||||||
map["reason"] = LLSD.FromString(ErrorReason);
|
map["reason"] = OSD.FromString(ErrorReason);
|
||||||
map["message"] = LLSD.FromString(ErrorMessage);
|
map["message"] = OSD.FromString(ErrorMessage);
|
||||||
map["login"] = LLSD.FromString(login);
|
map["login"] = OSD.FromString(login);
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ namespace OpenSim.Framework.Communications
|
||||||
return (CreateLoginFailedResponse());
|
return (CreateLoginFailedResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD CreateFailedResponseLLSD()
|
public OSD CreateFailedResponseLLSD()
|
||||||
{
|
{
|
||||||
return CreateLoginFailedResponseLLSD();
|
return CreateLoginFailedResponseLLSD();
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications
|
||||||
"false"));
|
"false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD CreateLoginFailedResponseLLSD()
|
public OSD CreateLoginFailedResponseLLSD()
|
||||||
{
|
{
|
||||||
return GenerateFailureResponseLLSD(
|
return GenerateFailureResponseLLSD(
|
||||||
"key",
|
"key",
|
||||||
|
@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications
|
||||||
"false"));
|
"false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD CreateAlreadyLoggedInResponseLLSD()
|
public OSD CreateAlreadyLoggedInResponseLLSD()
|
||||||
{
|
{
|
||||||
return GenerateFailureResponseLLSD(
|
return GenerateFailureResponseLLSD(
|
||||||
"presence",
|
"presence",
|
||||||
|
@ -283,7 +283,7 @@ namespace OpenSim.Framework.Communications
|
||||||
"false"));
|
"false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD CreateLoginBlockedResponseLLSD()
|
public OSD CreateLoginBlockedResponseLLSD()
|
||||||
{
|
{
|
||||||
return GenerateFailureResponseLLSD(
|
return GenerateFailureResponseLLSD(
|
||||||
"presence",
|
"presence",
|
||||||
|
@ -299,7 +299,7 @@ namespace OpenSim.Framework.Communications
|
||||||
"false"));
|
"false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD CreateDeadRegionResponseLLSD()
|
public OSD CreateDeadRegionResponseLLSD()
|
||||||
{
|
{
|
||||||
return GenerateFailureResponseLLSD(
|
return GenerateFailureResponseLLSD(
|
||||||
"key",
|
"key",
|
||||||
|
@ -315,7 +315,7 @@ namespace OpenSim.Framework.Communications
|
||||||
"false"));
|
"false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD CreateGridErrorResponseLLSD()
|
public OSD CreateGridErrorResponseLLSD()
|
||||||
{
|
{
|
||||||
return GenerateFailureResponseLLSD(
|
return GenerateFailureResponseLLSD(
|
||||||
"key",
|
"key",
|
||||||
|
@ -404,90 +404,90 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD ToLLSDResponse()
|
public OSD ToLLSDResponse()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LLSDMap map = new LLSDMap();
|
OSDMap map = new OSDMap();
|
||||||
|
|
||||||
map["first_name"] = LLSD.FromString(Firstname);
|
map["first_name"] = OSD.FromString(Firstname);
|
||||||
map["last_name"] = LLSD.FromString(Lastname);
|
map["last_name"] = OSD.FromString(Lastname);
|
||||||
map["agent_access"] = LLSD.FromString(agentAccess);
|
map["agent_access"] = OSD.FromString(agentAccess);
|
||||||
|
|
||||||
map["sim_port"] = LLSD.FromInteger(SimPort);
|
map["sim_port"] = OSD.FromInteger(SimPort);
|
||||||
map["sim_ip"] = LLSD.FromString(SimAddress);
|
map["sim_ip"] = OSD.FromString(SimAddress);
|
||||||
|
|
||||||
map["agent_id"] = LLSD.FromUUID(AgentID);
|
map["agent_id"] = OSD.FromUUID(AgentID);
|
||||||
map["session_id"] = LLSD.FromUUID(SessionID);
|
map["session_id"] = OSD.FromUUID(SessionID);
|
||||||
map["secure_session_id"] = LLSD.FromUUID(SecureSessionID);
|
map["secure_session_id"] = OSD.FromUUID(SecureSessionID);
|
||||||
map["circuit_code"] = LLSD.FromInteger(CircuitCode);
|
map["circuit_code"] = OSD.FromInteger(CircuitCode);
|
||||||
map["seconds_since_epoch"] = LLSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);
|
map["seconds_since_epoch"] = OSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);
|
||||||
|
|
||||||
#region Login Flags
|
#region Login Flags
|
||||||
|
|
||||||
LLSDMap loginFlagsLLSD = new LLSDMap();
|
OSDMap loginFlagsLLSD = new OSDMap();
|
||||||
loginFlagsLLSD["daylight_savings"] = LLSD.FromString(DST);
|
loginFlagsLLSD["daylight_savings"] = OSD.FromString(DST);
|
||||||
loginFlagsLLSD["stipend_since_login"] = LLSD.FromString(StipendSinceLogin);
|
loginFlagsLLSD["stipend_since_login"] = OSD.FromString(StipendSinceLogin);
|
||||||
loginFlagsLLSD["gendered"] = LLSD.FromString(Gendered);
|
loginFlagsLLSD["gendered"] = OSD.FromString(Gendered);
|
||||||
loginFlagsLLSD["ever_logged_in"] = LLSD.FromString(EverLoggedIn);
|
loginFlagsLLSD["ever_logged_in"] = OSD.FromString(EverLoggedIn);
|
||||||
map["login-flags"] = WrapLLSDMap(loginFlagsLLSD);
|
map["login-flags"] = WrapOSDMap(loginFlagsLLSD);
|
||||||
|
|
||||||
#endregion Login Flags
|
#endregion Login Flags
|
||||||
|
|
||||||
#region Global Textures
|
#region Global Textures
|
||||||
|
|
||||||
LLSDMap globalTexturesLLSD = new LLSDMap();
|
OSDMap globalTexturesLLSD = new OSDMap();
|
||||||
globalTexturesLLSD["sun_texture_id"] = LLSD.FromString(SunTexture);
|
globalTexturesLLSD["sun_texture_id"] = OSD.FromString(SunTexture);
|
||||||
globalTexturesLLSD["cloud_texture_id"] = LLSD.FromString(CloudTexture);
|
globalTexturesLLSD["cloud_texture_id"] = OSD.FromString(CloudTexture);
|
||||||
globalTexturesLLSD["moon_texture_id"] = LLSD.FromString(MoonTexture);
|
globalTexturesLLSD["moon_texture_id"] = OSD.FromString(MoonTexture);
|
||||||
|
|
||||||
map["global-textures"] = WrapLLSDMap(globalTexturesLLSD);
|
map["global-textures"] = WrapOSDMap(globalTexturesLLSD);
|
||||||
|
|
||||||
#endregion Global Textures
|
#endregion Global Textures
|
||||||
|
|
||||||
map["seed_capability"] = LLSD.FromString(seedCapability);
|
map["seed_capability"] = OSD.FromString(seedCapability);
|
||||||
|
|
||||||
map["event_categories"] = ArrayListToLLSDArray(eventCategories);
|
map["event_categories"] = ArrayListToOSDArray(eventCategories);
|
||||||
//map["event_notifications"] = new LLSDArray(); // todo
|
//map["event_notifications"] = new OSDArray(); // todo
|
||||||
map["classified_categories"] = ArrayListToLLSDArray(classifiedCategories);
|
map["classified_categories"] = ArrayListToOSDArray(classifiedCategories);
|
||||||
|
|
||||||
#region UI Config
|
#region UI Config
|
||||||
|
|
||||||
LLSDMap uiConfigLLSD = new LLSDMap();
|
OSDMap uiConfigLLSD = new OSDMap();
|
||||||
uiConfigLLSD["allow_first_life"] = LLSD.FromString(allowFirstLife);
|
uiConfigLLSD["allow_first_life"] = OSD.FromString(allowFirstLife);
|
||||||
map["ui-config"] = WrapLLSDMap(uiConfigLLSD);
|
map["ui-config"] = WrapOSDMap(uiConfigLLSD);
|
||||||
|
|
||||||
#endregion UI Config
|
#endregion UI Config
|
||||||
|
|
||||||
#region Inventory
|
#region Inventory
|
||||||
|
|
||||||
map["inventory-skeleton"] = ArrayListToLLSDArray(agentInventory);
|
map["inventory-skeleton"] = ArrayListToOSDArray(agentInventory);
|
||||||
|
|
||||||
map["inventory-skel-lib"] = ArrayListToLLSDArray(inventoryLibrary);
|
map["inventory-skel-lib"] = ArrayListToOSDArray(inventoryLibrary);
|
||||||
map["inventory-root"] = ArrayListToLLSDArray(inventoryRoot); ;
|
map["inventory-root"] = ArrayListToOSDArray(inventoryRoot); ;
|
||||||
map["inventory-lib-root"] = ArrayListToLLSDArray(inventoryLibRoot);
|
map["inventory-lib-root"] = ArrayListToOSDArray(inventoryLibRoot);
|
||||||
map["inventory-lib-owner"] = ArrayListToLLSDArray(inventoryLibraryOwner);
|
map["inventory-lib-owner"] = ArrayListToOSDArray(inventoryLibraryOwner);
|
||||||
|
|
||||||
#endregion Inventory
|
#endregion Inventory
|
||||||
|
|
||||||
map["gestures"] = ArrayListToLLSDArray(activeGestures);
|
map["gestures"] = ArrayListToOSDArray(activeGestures);
|
||||||
|
|
||||||
map["initial-outfit"] = ArrayListToLLSDArray(initialOutfit);
|
map["initial-outfit"] = ArrayListToOSDArray(initialOutfit);
|
||||||
map["start_location"] = LLSD.FromString(startLocation);
|
map["start_location"] = OSD.FromString(startLocation);
|
||||||
|
|
||||||
map["seed_capability"] = LLSD.FromString(seedCapability);
|
map["seed_capability"] = OSD.FromString(seedCapability);
|
||||||
map["home"] = LLSD.FromString(home);
|
map["home"] = OSD.FromString(home);
|
||||||
map["look_at"] = LLSD.FromString(lookAt);
|
map["look_at"] = OSD.FromString(lookAt);
|
||||||
map["message"] = LLSD.FromString(welcomeMessage);
|
map["message"] = OSD.FromString(welcomeMessage);
|
||||||
map["region_x"] = LLSD.FromInteger(RegionX * Constants.RegionSize);
|
map["region_x"] = OSD.FromInteger(RegionX * Constants.RegionSize);
|
||||||
map["region_y"] = LLSD.FromInteger(RegionY * Constants.RegionSize);
|
map["region_y"] = OSD.FromInteger(RegionY * Constants.RegionSize);
|
||||||
|
|
||||||
if (m_buddyList != null)
|
if (m_buddyList != null)
|
||||||
{
|
{
|
||||||
map["buddy-list"] = ArrayListToLLSDArray(m_buddyList.ToArray());
|
map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
map["login"] = LLSD.FromString("true");
|
map["login"] = OSD.FromString("true");
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -499,24 +499,24 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSDArray ArrayListToLLSDArray(ArrayList arrlst)
|
public OSDArray ArrayListToOSDArray(ArrayList arrlst)
|
||||||
{
|
{
|
||||||
LLSDArray llsdBack = new LLSDArray();
|
OSDArray llsdBack = new OSDArray();
|
||||||
foreach (Hashtable ht in arrlst)
|
foreach (Hashtable ht in arrlst)
|
||||||
{
|
{
|
||||||
LLSDMap mp = new LLSDMap();
|
OSDMap mp = new OSDMap();
|
||||||
foreach (DictionaryEntry deHt in ht)
|
foreach (DictionaryEntry deHt in ht)
|
||||||
{
|
{
|
||||||
mp.Add((string)deHt.Key, LLSDString.FromObject(deHt.Value));
|
mp.Add((string)deHt.Key, OSDString.FromObject(deHt.Value));
|
||||||
}
|
}
|
||||||
llsdBack.Add(mp);
|
llsdBack.Add(mp);
|
||||||
}
|
}
|
||||||
return llsdBack;
|
return llsdBack;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LLSDArray WrapLLSDMap(LLSDMap wrapMe)
|
private static OSDArray WrapOSDMap(OSDMap wrapMe)
|
||||||
{
|
{
|
||||||
LLSDArray array = new LLSDArray();
|
OSDArray array = new OSDArray();
|
||||||
array.Add(wrapMe);
|
array.Add(wrapMe);
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,7 +321,7 @@ namespace OpenSim.Framework.Communications
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The LLSD request</param>
|
/// <param name="request">The LLSD request</param>
|
||||||
/// <returns>The response to send</returns>
|
/// <returns>The response to send</returns>
|
||||||
public LLSD LLSDLoginMethod(LLSD request)
|
public OSD LLSDLoginMethod(OSD request)
|
||||||
{
|
{
|
||||||
// Temporary fix
|
// Temporary fix
|
||||||
m_loginMutex.WaitOne();
|
m_loginMutex.WaitOne();
|
||||||
|
@ -335,9 +335,9 @@ namespace OpenSim.Framework.Communications
|
||||||
UserProfileData userProfile = null;
|
UserProfileData userProfile = null;
|
||||||
LoginResponse logResponse = new LoginResponse();
|
LoginResponse logResponse = new LoginResponse();
|
||||||
|
|
||||||
if (request.Type == LLSDType.Map)
|
if (request.Type == OSDType.Map)
|
||||||
{
|
{
|
||||||
LLSDMap map = (LLSDMap)request;
|
OSDMap map = (OSDMap)request;
|
||||||
|
|
||||||
if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd"))
|
if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd"))
|
||||||
{
|
{
|
||||||
|
@ -749,7 +749,7 @@ namespace OpenSim.Framework.Communications
|
||||||
m_userManager.CreateAgent(profile, request);
|
m_userManager.CreateAgent(profile, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateAgent(UserProfileData profile, LLSD request)
|
public void CreateAgent(UserProfileData profile, OSD request)
|
||||||
{
|
{
|
||||||
m_userManager.CreateAgent(profile, request);
|
m_userManager.CreateAgent(profile, request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,7 +448,7 @@ namespace OpenSim.Framework.Communications
|
||||||
profile.CurrentAgent = agent;
|
profile.CurrentAgent = agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateAgent(UserProfileData profile, LLSD request)
|
public void CreateAgent(UserProfileData profile, OSD request)
|
||||||
{
|
{
|
||||||
UserAgentData agent = new UserAgentData();
|
UserAgentData agent = new UserAgentData();
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public ulong RegionHandle
|
public ulong RegionHandle
|
||||||
{
|
{
|
||||||
get { return Helpers.UIntsToLong((uint) m_x, (uint) m_y); }
|
get { return Utils.UIntsToLong((uint)m_x, (uint)m_y); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int X
|
public int X
|
||||||
|
|
|
@ -874,7 +874,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
for (int k = 0; k < extraParamCount; k++)
|
for (int k = 0; k < extraParamCount; k++)
|
||||||
{
|
{
|
||||||
ushort epType = Helpers.BytesToUInt16(data, i);
|
ushort epType = Utils.BytesToUInt16(data, i);
|
||||||
|
|
||||||
i += 2;
|
i += 2;
|
||||||
// uint paramLength = Helpers.BytesToUIntBig(data, i);
|
// uint paramLength = Helpers.BytesToUIntBig(data, i);
|
||||||
|
@ -1014,9 +1014,9 @@ namespace OpenSim.Framework
|
||||||
_lightColorG = lColor.G;
|
_lightColorG = lColor.G;
|
||||||
_lightColorB = lColor.B;
|
_lightColorB = lColor.B;
|
||||||
|
|
||||||
_lightRadius = Helpers.BytesToFloat(data, pos + 4);
|
_lightRadius = Utils.BytesToFloat(data, pos + 4);
|
||||||
_lightCutoff = Helpers.BytesToFloat(data, pos + 8);
|
_lightCutoff = Utils.BytesToFloat(data, pos + 8);
|
||||||
_lightFalloff = Helpers.BytesToFloat(data, pos + 12);
|
_lightFalloff = Utils.BytesToFloat(data, pos + 12);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1040,9 +1040,9 @@ namespace OpenSim.Framework
|
||||||
Color4 tmpColor = new Color4(_lightColorR,_lightColorG,_lightColorB,_lightIntensity);
|
Color4 tmpColor = new Color4(_lightColorR,_lightColorG,_lightColorB,_lightIntensity);
|
||||||
|
|
||||||
tmpColor.GetBytes().CopyTo(data, 0);
|
tmpColor.GetBytes().CopyTo(data, 0);
|
||||||
Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4);
|
Utils.FloatToBytes(_lightRadius).CopyTo(data, 4);
|
||||||
Helpers.FloatToBytes(_lightCutoff).CopyTo(data, 8);
|
Utils.FloatToBytes(_lightCutoff).CopyTo(data, 8);
|
||||||
Helpers.FloatToBytes(_lightFalloff).CopyTo(data, 12);
|
Utils.FloatToBytes(_lightFalloff).CopyTo(data, 12);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -692,8 +692,8 @@ namespace OpenSim.Framework.Servers
|
||||||
//m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
|
//m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
|
||||||
response.KeepAlive = true;
|
response.KeepAlive = true;
|
||||||
|
|
||||||
LLSD llsdRequest = null;
|
OSD llsdRequest = null;
|
||||||
LLSD llsdResponse = null;
|
OSD llsdResponse = null;
|
||||||
|
|
||||||
bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest"));
|
bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest"));
|
||||||
|
|
||||||
|
@ -704,7 +704,7 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
llsdRequest = LLSDParser.DeserializeXml(requestBody);
|
llsdRequest = OSDParser.DeserializeLLSDXml(requestBody);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -756,7 +756,7 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
response.ContentType = "application/llsd+xml";
|
response.ContentType = "application/llsd+xml";
|
||||||
//m_log.Info("[Debug BASE HTTP SERVER]: Response: " + llsdResponse.ToString());
|
//m_log.Info("[Debug BASE HTTP SERVER]: Response: " + llsdResponse.ToString());
|
||||||
buffer = LLSDParser.SerializeXmlBytes(llsdResponse);
|
buffer = OSDParser.SerializeLLSDXmlBytes(llsdResponse);
|
||||||
}
|
}
|
||||||
response.SendChunked = false;
|
response.SendChunked = false;
|
||||||
response.ContentLength64 = buffer.Length;
|
response.ContentLength64 = buffer.Length;
|
||||||
|
@ -948,12 +948,12 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LLSDMap GenerateNoLLSDHandlerResponse()
|
private OSDMap GenerateNoLLSDHandlerResponse()
|
||||||
{
|
{
|
||||||
LLSDMap map = new LLSDMap();
|
OSDMap map = new OSDMap();
|
||||||
map["reason"] = LLSD.FromString("LLSDRequest");
|
map["reason"] = OSD.FromString("LLSDRequest");
|
||||||
map["message"] = LLSD.FromString("No handler registered for LLSD Requests");
|
map["message"] = OSD.FromString("No handler registered for LLSD Requests");
|
||||||
map["login"] = LLSD.FromString("false");
|
map["login"] = OSD.FromString("false");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -342,7 +342,6 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
switch (showParams[0])
|
switch (showParams[0])
|
||||||
{
|
{
|
||||||
|
|
||||||
case "info":
|
case "info":
|
||||||
Notice("Version: " + m_version);
|
Notice("Version: " + m_version);
|
||||||
Notice("Startup directory: " + m_startupDirectory);
|
Notice("Startup directory: " + m_startupDirectory);
|
||||||
|
@ -350,9 +349,7 @@ namespace OpenSim.Framework.Servers
|
||||||
|
|
||||||
case "stats":
|
case "stats":
|
||||||
if (m_stats != null)
|
if (m_stats != null)
|
||||||
{
|
|
||||||
Notice(m_stats.Report());
|
Notice(m_stats.Report());
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "threads":
|
case "threads":
|
||||||
|
|
|
@ -29,6 +29,6 @@ using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Servers
|
namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
public delegate LLSD LLSDMethod( string path, LLSD request, string endpoint );
|
public delegate OSD LLSDMethod( string path, OSD request, string endpoint );
|
||||||
public delegate LLSD DefaultLLSDMethod(LLSD request);
|
public delegate OSD DefaultLLSDMethod(OSD request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,5 +29,5 @@ using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Servers
|
namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
public delegate LLSD LLSDMethodString(LLSD request, string thePath);
|
public delegate OSD LLSDMethodString(OSD request, string thePath);
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,7 +156,7 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual ulong HomeRegion
|
public virtual ulong HomeRegion
|
||||||
{
|
{
|
||||||
get { return Helpers.UIntsToLong((_homeRegionX * (uint) Constants.RegionSize), (_homeRegionY * (uint) Constants.RegionSize)); }
|
get { return Utils.UIntsToLong((_homeRegionX * (uint)Constants.RegionSize), (_homeRegionY * (uint)Constants.RegionSize)); }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_homeRegionX = (uint) (value >> 40);
|
_homeRegionX = (uint) (value >> 40);
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public static ulong UIntsToLong(uint X, uint Y)
|
public static ulong UIntsToLong(uint X, uint Y)
|
||||||
{
|
{
|
||||||
return Helpers.UIntsToLong(X, Y);
|
return Utils.UIntsToLong(X, Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T Clamp<T>(T x, T min, T max)
|
public static T Clamp<T>(T x, T min, T max)
|
||||||
|
@ -783,9 +783,9 @@ namespace OpenSim.Framework
|
||||||
public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y)
|
public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y)
|
||||||
{
|
{
|
||||||
byte[] bytes = parcelID.GetBytes();
|
byte[] bytes = parcelID.GetBytes();
|
||||||
regionHandle = Helpers.BytesToUInt64(bytes);
|
regionHandle = Utils.BytesToUInt64(bytes);
|
||||||
x = Helpers.BytesToUInt(bytes, 8);
|
x = Utils.BytesToUInt(bytes, 8);
|
||||||
y = Helpers.BytesToUInt(bytes, 12);
|
y = Utils.BytesToUInt(bytes, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void FakeParcelIDToGlobalPosition(UUID parcelID, out uint x, out uint y)
|
public static void FakeParcelIDToGlobalPosition(UUID parcelID, out uint x, out uint y)
|
||||||
|
@ -794,7 +794,7 @@ namespace OpenSim.Framework
|
||||||
uint rx, ry;
|
uint rx, ry;
|
||||||
|
|
||||||
ParseFakeParcelID(parcelID, out regionHandle, out x, out y);
|
ParseFakeParcelID(parcelID, out regionHandle, out x, out y);
|
||||||
Helpers.LongToUInts(regionHandle, out rx, out ry);
|
Utils.LongToUInts(regionHandle, out rx, out ry);
|
||||||
|
|
||||||
x += rx;
|
x += rx;
|
||||||
y += ry;
|
y += ry;
|
||||||
|
|
|
@ -582,12 +582,12 @@ namespace OpenSim.Grid.GridServer
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
GetRegion(
|
GetRegion(
|
||||||
Helpers.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize),
|
Utils.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize),
|
||||||
(uint)(sim.regionLocY + y) * Constants.RegionSize)) != null)
|
(uint)(sim.regionLocY + y) * Constants.RegionSize)) != null)
|
||||||
{
|
{
|
||||||
neighbour =
|
neighbour =
|
||||||
GetRegion(
|
GetRegion(
|
||||||
Helpers.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize),
|
Utils.UIntsToLong((uint)((sim.regionLocX + x) * Constants.RegionSize),
|
||||||
(uint)(sim.regionLocY + y) * Constants.RegionSize));
|
(uint)(sim.regionLocY + y) * Constants.RegionSize));
|
||||||
|
|
||||||
NeighbourBlock = new Hashtable();
|
NeighbourBlock = new Hashtable();
|
||||||
|
@ -675,7 +675,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
}
|
}
|
||||||
catch (KeyNotFoundException) { }
|
catch (KeyNotFoundException) { }
|
||||||
|
|
||||||
sim.regionHandle = Helpers.UIntsToLong((sim.regionLocX * Constants.RegionSize), (sim.regionLocY * Constants.RegionSize));
|
sim.regionHandle = Utils.UIntsToLong((sim.regionLocX * Constants.RegionSize), (sim.regionLocY * Constants.RegionSize));
|
||||||
sim.serverURI = (string)requestData["server_uri"];
|
sim.serverURI = (string)requestData["server_uri"];
|
||||||
|
|
||||||
sim.httpServerURI = "http://" + sim.serverIP + ":" + sim.httpPort + "/";
|
sim.httpServerURI = "http://" + sim.serverIP + ":" + sim.httpPort + "/";
|
||||||
|
@ -894,7 +894,7 @@ namespace OpenSim.Grid.GridServer
|
||||||
{
|
{
|
||||||
for (int y = ymin; y < ymax + 1; y++)
|
for (int y = ymin; y < ymax + 1; y++)
|
||||||
{
|
{
|
||||||
ulong regHandle = Helpers.UIntsToLong((uint)(x * Constants.RegionSize), (uint)(y * Constants.RegionSize));
|
ulong regHandle = Utils.UIntsToLong((uint)(x * Constants.RegionSize), (uint)(y * Constants.RegionSize));
|
||||||
simProfile = GetRegion(regHandle);
|
simProfile = GetRegion(regHandle);
|
||||||
if (simProfile != null)
|
if (simProfile != null)
|
||||||
{
|
{
|
||||||
|
@ -1124,12 +1124,12 @@ namespace OpenSim.Grid.GridServer
|
||||||
|
|
||||||
case "region_locx":
|
case "region_locx":
|
||||||
theSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
theSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
||||||
theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize));
|
theSim.regionHandle = Utils.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "region_locy":
|
case "region_locy":
|
||||||
theSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
theSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
|
||||||
theSim.regionHandle = Helpers.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize));
|
theSim.regionHandle = Utils.UIntsToLong((theSim.regionLocX * Constants.RegionSize), (theSim.regionLocY * Constants.RegionSize));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -484,7 +484,7 @@ namespace OpenSim.Grid.MessagingServer
|
||||||
regionProfile = new RegionProfileData();
|
regionProfile = new RegionProfileData();
|
||||||
regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]);
|
regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]);
|
||||||
regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/";
|
regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/";
|
||||||
regionProfile.regionHandle = Helpers.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize));
|
regionProfile.regionHandle = Utils.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize));
|
||||||
regionProfile.regionLocX = regX;
|
regionProfile.regionLocX = regX;
|
||||||
regionProfile.regionLocY = regY;
|
regionProfile.regionLocY = regY;
|
||||||
|
|
||||||
|
|
|
@ -3890,7 +3890,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
uint regionX;
|
uint regionX;
|
||||||
uint regionY;
|
uint regionY;
|
||||||
Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
|
Utils.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
|
||||||
locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX;
|
locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX;
|
||||||
locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY;
|
locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY;
|
||||||
locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
|
locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
|
||||||
|
@ -7175,7 +7175,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
Transfer.TransferInfo.Params = new byte[20];
|
Transfer.TransferInfo.Params = new byte[20];
|
||||||
Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
|
Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
|
||||||
int assType = req.AssetInf.Type;
|
int assType = req.AssetInf.Type;
|
||||||
Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
|
Array.Copy(Utils.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
|
||||||
}
|
}
|
||||||
else if (req.AssetRequestSource == 3)
|
else if (req.AssetRequestSource == 3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,7 +77,7 @@ namespace OpenSim.Region.DataSnapshot
|
||||||
{
|
{
|
||||||
//Very static for now, flexible enough to add new formats
|
//Very static for now, flexible enough to add new formats
|
||||||
LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse();
|
LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse();
|
||||||
llsd_response.snapshot_resources = new LLSDArray();
|
llsd_response.snapshot_resources = new OSDArray();
|
||||||
|
|
||||||
LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL();
|
LLSDDiscoveryDataURL llsd_dataurl = new LLSDDiscoveryDataURL();
|
||||||
llsd_dataurl.snapshot_format = "os-datasnapshot-v1";
|
llsd_dataurl.snapshot_format = "os-datasnapshot-v1";
|
||||||
|
|
|
@ -30,13 +30,13 @@ using OpenSim.Framework.Communications.Capabilities;
|
||||||
|
|
||||||
namespace OpenSim.Region.DataSnapshot
|
namespace OpenSim.Region.DataSnapshot
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDDiscoveryResponse
|
public class LLSDDiscoveryResponse
|
||||||
{
|
{
|
||||||
public LLSDArray snapshot_resources;
|
public OSDArray snapshot_resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
[LLSDMap]
|
[OSDMap]
|
||||||
public class LLSDDiscoveryDataURL
|
public class LLSDDiscoveryDataURL
|
||||||
{
|
{
|
||||||
public string snapshot_format;
|
public string snapshot_format;
|
||||||
|
|
|
@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
|
||||||
{
|
{
|
||||||
// for now (testing) we only support files under 1000 bytes
|
// for now (testing) we only support files under 1000 bytes
|
||||||
byte[] transferData = new byte[Data.Length + 4];
|
byte[] transferData = new byte[Data.Length + 4];
|
||||||
Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
||||||
Array.Copy(Data, 0, transferData, 4, Data.Length);
|
Array.Copy(Data, 0, transferData, 4, Data.Length);
|
||||||
Client.SendXferPacket(XferID, 0 + 0x80000000, transferData);
|
Client.SendXferPacket(XferID, 0 + 0x80000000, transferData);
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
byte[] transferData = new byte[1000 + 4];
|
byte[] transferData = new byte[1000 + 4];
|
||||||
Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
Array.Copy(Utils.IntToBytes(Data.Length), 0, transferData, 0, 4);
|
||||||
Array.Copy(Data, 0, transferData, 4, 1000);
|
Array.Copy(Data, 0, transferData, 4, 1000);
|
||||||
Client.SendXferPacket(XferID, 0, transferData);
|
Client.SendXferPacket(XferID, 0, transferData);
|
||||||
Packet++;
|
Packet++;
|
||||||
|
|
|
@ -44,18 +44,18 @@ using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Interfaces;
|
using OpenSim.Region.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
using LLSD = OpenMetaverse.StructuredData.LLSD;
|
using OSD = OpenMetaverse.StructuredData.OSD;
|
||||||
using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
|
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
||||||
using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
|
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
|
||||||
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
|
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
|
||||||
using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.LLSD>;
|
using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue<OpenMetaverse.StructuredData.OSD>;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.Framework
|
namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
{
|
{
|
||||||
public struct QueueItem
|
public struct QueueItem
|
||||||
{
|
{
|
||||||
public int id;
|
public int id;
|
||||||
public LLSDMap body;
|
public OSDMap body;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EventQueueGetModule : IEventQueue, IRegionModule
|
public class EventQueueGetModule : IEventQueue, IRegionModule
|
||||||
|
@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
|
|
||||||
|
|
||||||
#region IEventQueue Members
|
#region IEventQueue Members
|
||||||
public bool Enqueue(LLSD ev, UUID avatarID)
|
public bool Enqueue(OSD ev, UUID avatarID)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
|
m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName);
|
||||||
try
|
try
|
||||||
|
@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
// }
|
// }
|
||||||
|
|
||||||
BlockingLLSDQueue queue = GetQueue(agentID);
|
BlockingLLSDQueue queue = GetQueue(agentID);
|
||||||
LLSD element = queue.Dequeue(15000); // 15s timeout
|
OSD element = queue.Dequeue(15000); // 15s timeout
|
||||||
|
|
||||||
Hashtable responsedata = new Hashtable();
|
Hashtable responsedata = new Hashtable();
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LLSDArray array = new LLSDArray();
|
OSDArray array = new OSDArray();
|
||||||
if (element == null) // didn't have an event in 15s
|
if (element == null) // didn't have an event in 15s
|
||||||
{
|
{
|
||||||
// Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
|
// Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
|
||||||
|
@ -354,10 +354,10 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLSDMap events = new LLSDMap();
|
OSDMap events = new OSDMap();
|
||||||
events.Add("events", array);
|
events.Add("events", array);
|
||||||
|
|
||||||
events.Add("id", new LLSDInteger(thisID));
|
events.Add("id", new OSDInteger(thisID));
|
||||||
lock (m_ids)
|
lock (m_ids)
|
||||||
{
|
{
|
||||||
m_ids[agentID] = thisID + 1;
|
m_ids[agentID] = thisID + 1;
|
||||||
|
@ -366,7 +366,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
responsedata["int_response_code"] = 200;
|
responsedata["int_response_code"] = 200;
|
||||||
responsedata["content_type"] = "application/xml";
|
responsedata["content_type"] = "application/xml";
|
||||||
responsedata["keepalive"] = false;
|
responsedata["keepalive"] = false;
|
||||||
responsedata["str_response_string"] = LLSDParser.SerializeXmlString(events);
|
responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
|
||||||
m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
|
||||||
|
|
||||||
return responsedata;
|
return responsedata;
|
||||||
|
@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD EventQueueFallBack(string path, LLSD request, string endpoint)
|
public OSD EventQueueFallBack(string path, OSD request, string endpoint)
|
||||||
{
|
{
|
||||||
// This is a fallback element to keep the client from loosing EventQueueGet
|
// This is a fallback element to keep the client from loosing EventQueueGet
|
||||||
// Why does CAPS fail sometimes!?
|
// Why does CAPS fail sometimes!?
|
||||||
|
@ -473,7 +473,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
thisID = m_ids[AvatarID];
|
thisID = m_ids[AvatarID];
|
||||||
|
|
||||||
BlockingLLSDQueue queue = GetQueue(AvatarID);
|
BlockingLLSDQueue queue = GetQueue(AvatarID);
|
||||||
LLSDArray array = new LLSDArray();
|
OSDArray array = new OSDArray();
|
||||||
LLSD element = queue.Dequeue(15000); // 15s timeout
|
LLSD element = queue.Dequeue(15000); // 15s timeout
|
||||||
if (element == null)
|
if (element == null)
|
||||||
{
|
{
|
||||||
|
@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
thisID++;
|
thisID++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LLSDMap events = new LLSDMap();
|
OSDMap events = new OSDMap();
|
||||||
events.Add("events", array);
|
events.Add("events", array);
|
||||||
|
|
||||||
events.Add("id", new LLSDInteger(thisID));
|
events.Add("id", new LLSDInteger(thisID));
|
||||||
|
@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
|
||||||
{
|
{
|
||||||
//return new LLSD();
|
//return new LLSD();
|
||||||
}
|
}
|
||||||
return new LLSDString("shutdown404!");
|
return new OSDString("shutdown404!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,70 +52,70 @@ namespace OpenSim.Region.Environment
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LLSD buildEvent(string eventName, LLSD eventBody)
|
public static OSD buildEvent(string eventName, OSD eventBody)
|
||||||
{
|
{
|
||||||
LLSDMap llsdEvent = new LLSDMap(2);
|
OSDMap llsdEvent = new OSDMap(2);
|
||||||
llsdEvent.Add("message", new LLSDString(eventName));
|
llsdEvent.Add("message", new OSDString(eventName));
|
||||||
llsdEvent.Add("body", eventBody);
|
llsdEvent.Add("body", eventBody);
|
||||||
|
|
||||||
return llsdEvent;
|
return llsdEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint)
|
public static OSD EnableSimulator(ulong Handle, IPEndPoint endPoint)
|
||||||
{
|
{
|
||||||
LLSDMap llsdSimInfo = new LLSDMap(3);
|
OSDMap llsdSimInfo = new OSDMap(3);
|
||||||
|
|
||||||
llsdSimInfo.Add("Handle", new LLSDBinary(regionHandleToByteArray(Handle)));
|
llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle)));
|
||||||
llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes()));
|
llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes()));
|
||||||
llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port));
|
llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port));
|
||||||
|
|
||||||
LLSDArray arr = new LLSDArray(1);
|
OSDArray arr = new OSDArray(1);
|
||||||
arr.Add(llsdSimInfo);
|
arr.Add(llsdSimInfo);
|
||||||
|
|
||||||
LLSDMap llsdBody = new LLSDMap(1);
|
OSDMap llsdBody = new OSDMap(1);
|
||||||
llsdBody.Add("SimulatorInfo", arr);
|
llsdBody.Add("SimulatorInfo", arr);
|
||||||
|
|
||||||
return buildEvent("EnableSimulator", llsdBody);
|
return buildEvent("EnableSimulator", llsdBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LLSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt,
|
public static OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt,
|
||||||
IPEndPoint newRegionExternalEndPoint,
|
IPEndPoint newRegionExternalEndPoint,
|
||||||
string capsURL, UUID AgentID, UUID SessionID)
|
string capsURL, UUID AgentID, UUID SessionID)
|
||||||
{
|
{
|
||||||
LLSDArray LookAtArr = new LLSDArray(3);
|
OSDArray LookAtArr = new OSDArray(3);
|
||||||
LookAtArr.Add(LLSD.FromReal(lookAt.X));
|
LookAtArr.Add(OSD.FromReal(lookAt.X));
|
||||||
LookAtArr.Add(LLSD.FromReal(lookAt.Y));
|
LookAtArr.Add(OSD.FromReal(lookAt.Y));
|
||||||
LookAtArr.Add(LLSD.FromReal(lookAt.Z));
|
LookAtArr.Add(OSD.FromReal(lookAt.Z));
|
||||||
|
|
||||||
LLSDArray PositionArr = new LLSDArray(3);
|
OSDArray PositionArr = new OSDArray(3);
|
||||||
PositionArr.Add(LLSD.FromReal(pos.X));
|
PositionArr.Add(OSD.FromReal(pos.X));
|
||||||
PositionArr.Add(LLSD.FromReal(pos.Y));
|
PositionArr.Add(OSD.FromReal(pos.Y));
|
||||||
PositionArr.Add(LLSD.FromReal(pos.Z));
|
PositionArr.Add(OSD.FromReal(pos.Z));
|
||||||
|
|
||||||
LLSDMap InfoMap = new LLSDMap(2);
|
OSDMap InfoMap = new OSDMap(2);
|
||||||
InfoMap.Add("LookAt", LookAtArr);
|
InfoMap.Add("LookAt", LookAtArr);
|
||||||
InfoMap.Add("Position", PositionArr);
|
InfoMap.Add("Position", PositionArr);
|
||||||
|
|
||||||
LLSDArray InfoArr = new LLSDArray(1);
|
OSDArray InfoArr = new OSDArray(1);
|
||||||
InfoArr.Add(InfoMap);
|
InfoArr.Add(InfoMap);
|
||||||
|
|
||||||
LLSDMap AgentDataMap = new LLSDMap(2);
|
OSDMap AgentDataMap = new OSDMap(2);
|
||||||
AgentDataMap.Add("AgentID", LLSD.FromUUID(AgentID));
|
AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID));
|
||||||
AgentDataMap.Add("SessionID", LLSD.FromUUID(SessionID));
|
AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID));
|
||||||
|
|
||||||
LLSDArray AgentDataArr = new LLSDArray(1);
|
OSDArray AgentDataArr = new OSDArray(1);
|
||||||
AgentDataArr.Add(AgentDataMap);
|
AgentDataArr.Add(AgentDataMap);
|
||||||
|
|
||||||
LLSDMap RegionDataMap = new LLSDMap(4);
|
OSDMap RegionDataMap = new OSDMap(4);
|
||||||
RegionDataMap.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(Handle)));
|
RegionDataMap.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(Handle)));
|
||||||
RegionDataMap.Add("SeedCapability", LLSD.FromString(capsURL));
|
RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL));
|
||||||
RegionDataMap.Add("SimIP", LLSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes()));
|
RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes()));
|
||||||
RegionDataMap.Add("SimPort", LLSD.FromInteger(newRegionExternalEndPoint.Port));
|
RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port));
|
||||||
|
|
||||||
LLSDArray RegionDataArr = new LLSDArray(1);
|
OSDArray RegionDataArr = new OSDArray(1);
|
||||||
RegionDataArr.Add(RegionDataMap);
|
RegionDataArr.Add(RegionDataMap);
|
||||||
|
|
||||||
LLSDMap llsdBody = new LLSDMap(3);
|
OSDMap llsdBody = new OSDMap(3);
|
||||||
llsdBody.Add("Info", InfoArr);
|
llsdBody.Add("Info", InfoArr);
|
||||||
llsdBody.Add("AgentData", AgentDataArr);
|
llsdBody.Add("AgentData", AgentDataArr);
|
||||||
llsdBody.Add("RegionData", RegionDataArr);
|
llsdBody.Add("RegionData", RegionDataArr);
|
||||||
|
@ -123,49 +123,49 @@ namespace OpenSim.Region.Environment
|
||||||
return buildEvent("CrossedRegion", llsdBody);
|
return buildEvent("CrossedRegion", llsdBody);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LLSD TeleportFinishEvent(
|
public static OSD TeleportFinishEvent(
|
||||||
ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
|
ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint,
|
||||||
uint locationID, uint flags, string capsURL, UUID AgentID)
|
uint locationID, uint flags, string capsURL, UUID AgentID)
|
||||||
{
|
{
|
||||||
LLSDMap info = new LLSDMap();
|
OSDMap info = new OSDMap();
|
||||||
info.Add("AgentID", LLSD.FromUUID(AgentID));
|
info.Add("AgentID", OSD.FromUUID(AgentID));
|
||||||
info.Add("LocationID", LLSD.FromInteger(4)); // TODO what is this?
|
info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this?
|
||||||
info.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(regionHandle)));
|
info.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(regionHandle)));
|
||||||
info.Add("SeedCapability", LLSD.FromString(capsURL));
|
info.Add("SeedCapability", OSD.FromString(capsURL));
|
||||||
info.Add("SimAccess", LLSD.FromInteger(simAccess));
|
info.Add("SimAccess", OSD.FromInteger(simAccess));
|
||||||
info.Add("SimIP", LLSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
|
info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes()));
|
||||||
info.Add("SimPort", LLSD.FromInteger(regionExternalEndPoint.Port));
|
info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port));
|
||||||
info.Add("TeleportFlags", LLSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
|
info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation
|
||||||
|
|
||||||
LLSDArray infoArr = new LLSDArray();
|
OSDArray infoArr = new OSDArray();
|
||||||
infoArr.Add(info);
|
infoArr.Add(info);
|
||||||
|
|
||||||
LLSDMap body = new LLSDMap();
|
OSDMap body = new OSDMap();
|
||||||
body.Add("Info", infoArr);
|
body.Add("Info", infoArr);
|
||||||
|
|
||||||
return buildEvent("TeleportFinish", body);
|
return buildEvent("TeleportFinish", body);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono)
|
public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono)
|
||||||
{
|
{
|
||||||
LLSDMap script = new LLSDMap();
|
OSDMap script = new OSDMap();
|
||||||
script.Add("ObjectID", LLSD.FromUUID(objectID));
|
script.Add("ObjectID", OSD.FromUUID(objectID));
|
||||||
script.Add("ItemID", LLSD.FromUUID(itemID));
|
script.Add("ItemID", OSD.FromUUID(itemID));
|
||||||
script.Add("Running", LLSD.FromBoolean(running));
|
script.Add("Running", OSD.FromBoolean(running));
|
||||||
script.Add("Mono", LLSD.FromBoolean(mono));
|
script.Add("Mono", OSD.FromBoolean(mono));
|
||||||
|
|
||||||
LLSDArray scriptArr = new LLSDArray();
|
OSDArray scriptArr = new OSDArray();
|
||||||
scriptArr.Add(script);
|
scriptArr.Add(script);
|
||||||
|
|
||||||
LLSDMap body = new LLSDMap();
|
OSDMap body = new OSDMap();
|
||||||
body.Add("Script", scriptArr);
|
body.Add("Script", scriptArr);
|
||||||
|
|
||||||
return buildEvent("ScriptRunningReply", body);
|
return buildEvent("ScriptRunningReply", body);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LLSD KeepAliveEvent()
|
public static OSD KeepAliveEvent()
|
||||||
{
|
{
|
||||||
return buildEvent("FAKEEVENT", new LLSDMap());
|
return buildEvent("FAKEEVENT", new OSDMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,9 +46,9 @@ using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
|
|
||||||
using LLSD = OpenMetaverse.StructuredData.LLSD;
|
using OSD = OpenMetaverse.StructuredData.OSD;
|
||||||
using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
|
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
||||||
using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
|
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.InterGrid
|
namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
{
|
{
|
||||||
|
@ -218,7 +218,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public LLSD ProcessRegionDomainSeed(string path, LLSD request, string endpoint)
|
public OSD ProcessRegionDomainSeed(string path, OSD request, string endpoint)
|
||||||
{
|
{
|
||||||
string[] pathSegments = path.Split('/');
|
string[] pathSegments = path.Split('/');
|
||||||
|
|
||||||
|
@ -234,11 +234,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
//m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
|
//m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
|
||||||
// path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]);
|
// path, pathSegments.Length, pathSegments[1], pathSegments[pathSegments.Length - 1]);
|
||||||
//return new LLSDMap();
|
//return new OSDMap();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD ProcessAgentDomainMessage(string path, LLSD request, string endpoint)
|
public OSD ProcessAgentDomainMessage(string path, OSD request, string endpoint)
|
||||||
{
|
{
|
||||||
// /agent/*
|
// /agent/*
|
||||||
|
|
||||||
|
@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
//return null;
|
//return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LLSD GenerateRezAvatarRequestMessage(string regionname)
|
private OSD GenerateRezAvatarRequestMessage(string regionname)
|
||||||
{
|
{
|
||||||
Scene region = null;
|
Scene region = null;
|
||||||
bool usedroot = false;
|
bool usedroot = false;
|
||||||
|
@ -319,7 +319,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
RegionInfo reg = region.RegionInfo;
|
RegionInfo reg = region.RegionInfo;
|
||||||
|
|
||||||
LLSDMap responseMap = new LLSDMap();
|
OSDMap responseMap = new OSDMap();
|
||||||
string rezHttpProtocol = "http://";
|
string rezHttpProtocol = "http://";
|
||||||
//string regionCapsHttpProtocol = "http://";
|
//string regionCapsHttpProtocol = "http://";
|
||||||
string httpaddr = reg.ExternalHostName;
|
string httpaddr = reg.ExternalHostName;
|
||||||
|
@ -347,9 +347,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
httpaddr = httpsCN;
|
httpaddr = httpsCN;
|
||||||
}
|
}
|
||||||
|
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = OSD.FromBoolean(true);
|
||||||
LLSDMap capabilitiesMap = new LLSDMap();
|
OSDMap capabilitiesMap = new OSDMap();
|
||||||
capabilitiesMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath);
|
capabilitiesMap["rez_avatar/request"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath);
|
||||||
responseMap["capabilities"] = capabilitiesMap;
|
responseMap["capabilities"] = capabilitiesMap;
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
|
@ -376,11 +376,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public LLSD RequestRezAvatarMethod(string path, LLSD request)
|
public OSD RequestRezAvatarMethod(string path, OSD request)
|
||||||
{
|
{
|
||||||
//System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
|
//System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
|
||||||
|
|
||||||
LLSDMap requestMap = (LLSDMap)request;
|
OSDMap requestMap = (OSDMap)request;
|
||||||
|
|
||||||
|
|
||||||
Scene homeScene = null;
|
Scene homeScene = null;
|
||||||
|
@ -441,27 +441,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
UpdateOGPState(LocalAgentID, userState);
|
UpdateOGPState(LocalAgentID, userState);
|
||||||
|
|
||||||
LLSDMap responseMap = new LLSDMap();
|
OSDMap responseMap = new OSDMap();
|
||||||
|
|
||||||
if (RemoteAgentID == UUID.Zero)
|
if (RemoteAgentID == UUID.Zero)
|
||||||
{
|
{
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
responseMap["message"] = LLSD.FromString("No agent ID was specified in rez_avatar/request");
|
responseMap["message"] = OSD.FromString("No agent ID was specified in rez_avatar/request");
|
||||||
m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body");
|
m_log.Error("[OGP]: rez_avatar/request failed because no avatar UUID was provided in the request body");
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);
|
responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);
|
||||||
|
|
||||||
// DEPRECIATED
|
// DEPRECIATED
|
||||||
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
|
responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
|
||||||
|
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = OSD.FromBoolean(true);
|
||||||
responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port);
|
responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
|
||||||
responseMap["region_x"] = LLSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX
|
responseMap["region_x"] = OSD.FromInteger(reg.RegionLocX * (uint)Constants.RegionSize); // LLX
|
||||||
responseMap["region_y"] = LLSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY
|
responseMap["region_y"] = OSD.FromInteger(reg.RegionLocY * (uint)Constants.RegionSize); // LLY
|
||||||
responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID);
|
responseMap["region_id"] = OSD.FromUUID(reg.originRegionID);
|
||||||
responseMap["sim_access"] = LLSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG");
|
responseMap["sim_access"] = OSD.FromString((reg.RegionSettings.Maturity == 1) ? "Mature" : "PG");
|
||||||
|
|
||||||
// Generate a dummy agent for the user so we can get back a CAPS path
|
// Generate a dummy agent for the user so we can get back a CAPS path
|
||||||
AgentCircuitData agentData = new AgentCircuitData();
|
AgentCircuitData agentData = new AgentCircuitData();
|
||||||
|
@ -575,14 +575,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
|
|
||||||
// DEPRECIATED
|
// DEPRECIATED
|
||||||
responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
|
responseMap["seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
|
||||||
|
|
||||||
// REPLACEMENT
|
// REPLACEMENT
|
||||||
responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
|
responseMap["region_seed_capability"] = OSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
|
||||||
|
|
||||||
responseMap["rez_avatar"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
|
responseMap["rez_avatar"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
|
||||||
responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
|
responseMap["rez_avatar/rez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath);
|
||||||
responseMap["rez_avatar/derez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath);
|
responseMap["rez_avatar/derez"] = OSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath);
|
||||||
|
|
||||||
// Add the user to the list of CAPS that are outstanding.
|
// Add the user to the list of CAPS that are outstanding.
|
||||||
// well allow the caps hosts in this dictionary
|
// well allow the caps hosts in this dictionary
|
||||||
|
@ -605,27 +605,27 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD RezAvatarMethod(string path, LLSD request)
|
public OSD RezAvatarMethod(string path, OSD request)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString());
|
m_log.WarnFormat("[REZAVATAR]: {0}", request.ToString());
|
||||||
|
|
||||||
LLSDMap responseMap = new LLSDMap();
|
OSDMap responseMap = new OSDMap();
|
||||||
|
|
||||||
AgentCircuitData userData = null;
|
AgentCircuitData userData = null;
|
||||||
|
|
||||||
// Only people we've issued a cap can go further
|
// Only people we've issued a cap can go further
|
||||||
if (TryGetAgentCircuitData(path,out userData))
|
if (TryGetAgentCircuitData(path,out userData))
|
||||||
{
|
{
|
||||||
LLSDMap requestMap = (LLSDMap)request;
|
OSDMap requestMap = (OSDMap)request;
|
||||||
|
|
||||||
// take these values to start. There's a few more
|
// take these values to start. There's a few more
|
||||||
UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
|
UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
|
||||||
UUID SessionID = requestMap["session_id"].AsUUID();
|
UUID SessionID = requestMap["session_id"].AsUUID();
|
||||||
int circuitcode = requestMap["circuit_code"].AsInteger();
|
int circuitcode = requestMap["circuit_code"].AsInteger();
|
||||||
LLSDArray Parameter = new LLSDArray();
|
OSDArray Parameter = new OSDArray();
|
||||||
if (requestMap.ContainsKey("parameter"))
|
if (requestMap.ContainsKey("parameter"))
|
||||||
{
|
{
|
||||||
Parameter = (LLSDArray)((LLSD)requestMap["parameter"]);
|
Parameter = (OSDArray)requestMap["parameter"];
|
||||||
}
|
}
|
||||||
|
|
||||||
//int version = 1;
|
//int version = 1;
|
||||||
|
@ -636,7 +636,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
for (int i = 0; i < Parameter.Count; i++)
|
for (int i = 0; i < Parameter.Count; i++)
|
||||||
{
|
{
|
||||||
LLSDMap item = (LLSDMap)Parameter[i];
|
OSDMap item = (OSDMap)Parameter[i];
|
||||||
// if (item.ContainsKey("version"))
|
// if (item.ContainsKey("version"))
|
||||||
// {
|
// {
|
||||||
// version = item["version"].AsInteger();
|
// version = item["version"].AsInteger();
|
||||||
|
@ -714,15 +714,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
RegionInfo reg = homeScene.RegionInfo;
|
RegionInfo reg = homeScene.RegionInfo;
|
||||||
|
|
||||||
// Dummy positional and look at info.. we don't have it.
|
// Dummy positional and look at info.. we don't have it.
|
||||||
LLSDArray PositionArray = new LLSDArray();
|
OSDArray PositionArray = new OSDArray();
|
||||||
PositionArray.Add(LLSD.FromInteger(128));
|
PositionArray.Add(OSD.FromInteger(128));
|
||||||
PositionArray.Add(LLSD.FromInteger(128));
|
PositionArray.Add(OSD.FromInteger(128));
|
||||||
PositionArray.Add(LLSD.FromInteger(40));
|
PositionArray.Add(OSD.FromInteger(40));
|
||||||
|
|
||||||
LLSDArray LookAtArray = new LLSDArray();
|
OSDArray LookAtArray = new OSDArray();
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(OSD.FromInteger(1));
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(OSD.FromInteger(1));
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(OSD.FromInteger(1));
|
||||||
|
|
||||||
// Our region's X and Y position in OpenSimulator space.
|
// Our region's X and Y position in OpenSimulator space.
|
||||||
uint fooX = reg.RegionLocX;
|
uint fooX = reg.RegionLocX;
|
||||||
|
@ -732,31 +732,31 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID);
|
m_log.InfoFormat("[OGO]: region UUID {0} ", reg.RegionID);
|
||||||
|
|
||||||
// Convert the X and Y position to LL space
|
// Convert the X and Y position to LL space
|
||||||
responseMap["region_x"] = LLSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X
|
responseMap["region_x"] = OSD.FromInteger(fooX * (uint)Constants.RegionSize); // convert it to LL X
|
||||||
responseMap["region_y"] = LLSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y
|
responseMap["region_y"] = OSD.FromInteger(fooY * (uint)Constants.RegionSize); // convert it to LL Y
|
||||||
|
|
||||||
// Give em a new seed capability
|
// Give em a new seed capability
|
||||||
responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
|
responseMap["seed_capability"] = OSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");
|
||||||
responseMap["region"] = LLSD.FromUUID(reg.originRegionID);
|
responseMap["region"] = OSD.FromUUID(reg.originRegionID);
|
||||||
responseMap["look_at"] = LookAtArray;
|
responseMap["look_at"] = LookAtArray;
|
||||||
|
|
||||||
responseMap["sim_port"] = LLSD.FromInteger(reg.InternalEndPoint.Port);
|
responseMap["sim_port"] = OSD.FromInteger(reg.InternalEndPoint.Port);
|
||||||
responseMap["sim_host"] = LLSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString());
|
responseMap["sim_host"] = OSD.FromString(reg.ExternalHostName);// + ":" + reg.InternalEndPoint.Port.ToString());
|
||||||
|
|
||||||
// DEPRECIATED
|
// DEPRECIATED
|
||||||
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
|
responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(reg.ExternalHostName).ToString());
|
||||||
|
|
||||||
responseMap["session_id"] = LLSD.FromUUID(SessionID);
|
responseMap["session_id"] = OSD.FromUUID(SessionID);
|
||||||
responseMap["secure_session_id"] = LLSD.FromUUID(SecureSessionID);
|
responseMap["secure_session_id"] = OSD.FromUUID(SecureSessionID);
|
||||||
responseMap["circuit_code"] = LLSD.FromInteger(circuitcode);
|
responseMap["circuit_code"] = OSD.FromInteger(circuitcode);
|
||||||
|
|
||||||
responseMap["position"] = PositionArray;
|
responseMap["position"] = PositionArray;
|
||||||
|
|
||||||
responseMap["region_id"] = LLSD.FromUUID(reg.originRegionID);
|
responseMap["region_id"] = OSD.FromUUID(reg.originRegionID);
|
||||||
|
|
||||||
responseMap["sim_access"] = LLSD.FromString("Mature");
|
responseMap["sim_access"] = OSD.FromString("Mature");
|
||||||
|
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = OSD.FromBoolean(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -767,12 +767,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD DerezAvatarMethod(string path, LLSD request)
|
public OSD DerezAvatarMethod(string path, OSD request)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
|
m_log.ErrorFormat("DerezPath: {0}, Request: {1}", path, request.ToString());
|
||||||
|
|
||||||
//LLSD llsdResponse = null;
|
//LLSD llsdResponse = null;
|
||||||
LLSDMap responseMap = new LLSDMap();
|
OSDMap responseMap = new OSDMap();
|
||||||
|
|
||||||
string[] PathArray = path.Split('/');
|
string[] PathArray = path.Split('/');
|
||||||
m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
|
m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
|
||||||
|
@ -790,34 +790,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
OGPState userState = GetOGPState(LocalID);
|
OGPState userState = GetOGPState(LocalID);
|
||||||
if (userState.agent_id != UUID.Zero)
|
if (userState.agent_id != UUID.Zero)
|
||||||
{
|
{
|
||||||
//LLSDMap outboundRequestMap = new LLSDMap();
|
//OSDMap outboundRequestMap = new OSDMap();
|
||||||
LLSDMap inboundRequestMap = (LLSDMap)request;
|
OSDMap inboundRequestMap = (OSDMap)request;
|
||||||
string rezAvatarString = inboundRequestMap["rez_avatar"].AsString();
|
string rezAvatarString = inboundRequestMap["rez_avatar"].AsString();
|
||||||
if (rezAvatarString.Length == 0)
|
if (rezAvatarString.Length == 0)
|
||||||
{
|
{
|
||||||
rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString();
|
rezAvatarString = inboundRequestMap["rez_avatar/rez"].AsString();
|
||||||
}
|
}
|
||||||
LLSDArray LookAtArray = new LLSDArray();
|
OSDArray LookAtArray = new OSDArray();
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(OSD.FromInteger(1));
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(OSD.FromInteger(1));
|
||||||
LookAtArray.Add(LLSD.FromInteger(1));
|
LookAtArray.Add(OSD.FromInteger(1));
|
||||||
|
|
||||||
LLSDArray PositionArray = new LLSDArray();
|
OSDArray PositionArray = new OSDArray();
|
||||||
PositionArray.Add(LLSD.FromInteger(128));
|
PositionArray.Add(OSD.FromInteger(128));
|
||||||
PositionArray.Add(LLSD.FromInteger(128));
|
PositionArray.Add(OSD.FromInteger(128));
|
||||||
PositionArray.Add(LLSD.FromInteger(40));
|
PositionArray.Add(OSD.FromInteger(40));
|
||||||
|
|
||||||
LLSDArray lookArray = new LLSDArray();
|
OSDArray lookArray = new OSDArray();
|
||||||
lookArray.Add(LLSD.FromInteger(128));
|
lookArray.Add(OSD.FromInteger(128));
|
||||||
lookArray.Add(LLSD.FromInteger(128));
|
lookArray.Add(OSD.FromInteger(128));
|
||||||
lookArray.Add(LLSD.FromInteger(40));
|
lookArray.Add(OSD.FromInteger(40));
|
||||||
|
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);// it's okay to give this user up
|
responseMap["connect"] = OSD.FromBoolean(true);// it's okay to give this user up
|
||||||
responseMap["look_at"] = LookAtArray;
|
responseMap["look_at"] = LookAtArray;
|
||||||
|
|
||||||
m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name);
|
m_log.WarnFormat("[OGP]: Invoking rez_avatar on host:{0} for avatar: {1} {2}", rezAvatarString, userState.first_name, userState.last_name);
|
||||||
|
|
||||||
LLSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState);
|
OSDMap rezResponseMap = invokeRezAvatarCap(responseMap, rezAvatarString,userState);
|
||||||
|
|
||||||
// If invoking it returned an error, parse and end
|
// If invoking it returned an error, parse and end
|
||||||
if (rezResponseMap.ContainsKey("connect"))
|
if (rezResponseMap.ContainsKey("connect"))
|
||||||
|
@ -852,34 +852,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
int rrY = rezResponseMap["region_y"].AsInteger();
|
int rrY = rezResponseMap["region_y"].AsInteger();
|
||||||
m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
|
m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
|
||||||
UUID rrRID = rezResponseMap["region_id"].AsUUID();
|
UUID rrRID = rezResponseMap["region_id"].AsUUID();
|
||||||
LLSDArray RezResponsePositionArray = null;
|
OSDArray RezResponsePositionArray = null;
|
||||||
string rrAccess = rezResponseMap["sim_access"].AsString();
|
string rrAccess = rezResponseMap["sim_access"].AsString();
|
||||||
if (rezResponseMap.ContainsKey("position"))
|
if (rezResponseMap.ContainsKey("position"))
|
||||||
{
|
{
|
||||||
RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
|
RezResponsePositionArray = (OSDArray)rezResponseMap["position"];
|
||||||
}
|
}
|
||||||
// DEPRECIATED
|
// DEPRECIATED
|
||||||
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
|
responseMap["seed_capability"] = OSD.FromString(rezRespSeedCap);
|
||||||
|
|
||||||
// REPLACEMENT r3
|
// REPLACEMENT r3
|
||||||
responseMap["region_seed_capability"] = LLSD.FromString(rezRespSeedCap);
|
responseMap["region_seed_capability"] = OSD.FromString(rezRespSeedCap);
|
||||||
|
|
||||||
// DEPRECIATED
|
// DEPRECIATED
|
||||||
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
|
responseMap["sim_ip"] = OSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
|
||||||
|
|
||||||
responseMap["sim_host"] = LLSD.FromString(rezRespSim_host);
|
responseMap["sim_host"] = OSD.FromString(rezRespSim_host);
|
||||||
responseMap["sim_port"] = LLSD.FromInteger(rrPort);
|
responseMap["sim_port"] = OSD.FromInteger(rrPort);
|
||||||
responseMap["region_x"] = LLSD.FromInteger(rrX );
|
responseMap["region_x"] = OSD.FromInteger(rrX );
|
||||||
responseMap["region_y"] = LLSD.FromInteger(rrY );
|
responseMap["region_y"] = OSD.FromInteger(rrY );
|
||||||
responseMap["region_id"] = LLSD.FromUUID(rrRID);
|
responseMap["region_id"] = OSD.FromUUID(rrRID);
|
||||||
responseMap["sim_access"] = LLSD.FromString(rrAccess);
|
responseMap["sim_access"] = OSD.FromString(rrAccess);
|
||||||
|
|
||||||
if (RezResponsePositionArray != null)
|
if (RezResponsePositionArray != null)
|
||||||
{
|
{
|
||||||
responseMap["position"] = RezResponsePositionArray;
|
responseMap["position"] = RezResponsePositionArray;
|
||||||
}
|
}
|
||||||
responseMap["look_at"] = lookArray;
|
responseMap["look_at"] = lookArray;
|
||||||
responseMap["connect"] = LLSD.FromBoolean(true);
|
responseMap["connect"] = OSD.FromBoolean(true);
|
||||||
|
|
||||||
ShutdownConnection(LocalID,this);
|
ShutdownConnection(LocalID,this);
|
||||||
// PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS
|
// PLEASE STOP CHANGING THIS TO an M_LOG, M_LOG DOESN'T WORK ON MULTILINE .TOSTRINGS
|
||||||
|
@ -899,7 +899,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
//return responseMap;
|
//return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LLSDMap invokeRezAvatarCap(LLSDMap responseMap, string CapAddress, OGPState userState)
|
private OSDMap invokeRezAvatarCap(OSDMap responseMap, string CapAddress, OGPState userState)
|
||||||
{
|
{
|
||||||
Scene reg = GetRootScene();
|
Scene reg = GetRootScene();
|
||||||
|
|
||||||
|
@ -907,38 +907,38 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
DeRezRequest.Method = "POST";
|
DeRezRequest.Method = "POST";
|
||||||
DeRezRequest.ContentType = "application/xml+llsd";
|
DeRezRequest.ContentType = "application/xml+llsd";
|
||||||
|
|
||||||
LLSDMap RAMap = new LLSDMap();
|
OSDMap RAMap = new OSDMap();
|
||||||
LLSDMap AgentParms = new LLSDMap();
|
OSDMap AgentParms = new OSDMap();
|
||||||
LLSDMap RegionParms = new LLSDMap();
|
OSDMap RegionParms = new OSDMap();
|
||||||
|
|
||||||
LLSDArray Parameter = new LLSDArray(2);
|
OSDArray Parameter = new OSDArray(2);
|
||||||
|
|
||||||
LLSDMap version = new LLSDMap();
|
OSDMap version = new OSDMap();
|
||||||
version["version"] = LLSD.FromInteger(userState.src_version);
|
version["version"] = OSD.FromInteger(userState.src_version);
|
||||||
Parameter.Add((LLSD)version);
|
Parameter.Add(version);
|
||||||
|
|
||||||
LLSDMap SrcData = new LLSDMap();
|
OSDMap SrcData = new OSDMap();
|
||||||
SrcData["estate_id"] = LLSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID);
|
SrcData["estate_id"] = OSD.FromInteger(reg.RegionInfo.EstateSettings.EstateID);
|
||||||
SrcData["parent_estate_id"] = LLSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID));
|
SrcData["parent_estate_id"] = OSD.FromInteger((reg.RegionInfo.EstateSettings.ParentEstateID == 100 ? 1 : reg.RegionInfo.EstateSettings.ParentEstateID));
|
||||||
SrcData["region_id"] = LLSD.FromUUID(reg.RegionInfo.originRegionID);
|
SrcData["region_id"] = OSD.FromUUID(reg.RegionInfo.originRegionID);
|
||||||
SrcData["visible_to_parent"] = LLSD.FromBoolean(userState.visible_to_parent);
|
SrcData["visible_to_parent"] = OSD.FromBoolean(userState.visible_to_parent);
|
||||||
Parameter.Add((LLSD)SrcData);
|
Parameter.Add(SrcData);
|
||||||
|
|
||||||
AgentParms["first_name"] = LLSD.FromString(userState.first_name);
|
AgentParms["first_name"] = OSD.FromString(userState.first_name);
|
||||||
AgentParms["last_name"] = LLSD.FromString(userState.last_name);
|
AgentParms["last_name"] = OSD.FromString(userState.last_name);
|
||||||
AgentParms["agent_id"] = LLSD.FromUUID(userState.agent_id);
|
AgentParms["agent_id"] = OSD.FromUUID(userState.agent_id);
|
||||||
RegionParms["region_id"] = LLSD.FromUUID(userState.region_id);
|
RegionParms["region_id"] = OSD.FromUUID(userState.region_id);
|
||||||
AgentParms["circuit_code"] = LLSD.FromInteger(userState.circuit_code);
|
AgentParms["circuit_code"] = OSD.FromInteger(userState.circuit_code);
|
||||||
AgentParms["secure_session_id"] = LLSD.FromUUID(userState.secure_session_id);
|
AgentParms["secure_session_id"] = OSD.FromUUID(userState.secure_session_id);
|
||||||
AgentParms["session_id"] = LLSD.FromUUID(userState.session_id);
|
AgentParms["session_id"] = OSD.FromUUID(userState.session_id);
|
||||||
AgentParms["agent_access"] = LLSD.FromBoolean(userState.agent_access);
|
AgentParms["agent_access"] = OSD.FromBoolean(userState.agent_access);
|
||||||
AgentParms["god_level"] = LLSD.FromInteger(userState.god_level);
|
AgentParms["god_level"] = OSD.FromInteger(userState.god_level);
|
||||||
AgentParms["god_overide"] = LLSD.FromBoolean(userState.god_overide);
|
AgentParms["god_overide"] = OSD.FromBoolean(userState.god_overide);
|
||||||
AgentParms["identified"] = LLSD.FromBoolean(userState.identified);
|
AgentParms["identified"] = OSD.FromBoolean(userState.identified);
|
||||||
AgentParms["transacted"] = LLSD.FromBoolean(userState.transacted);
|
AgentParms["transacted"] = OSD.FromBoolean(userState.transacted);
|
||||||
AgentParms["age_verified"] = LLSD.FromBoolean(userState.age_verified);
|
AgentParms["age_verified"] = OSD.FromBoolean(userState.age_verified);
|
||||||
AgentParms["limited_to_estate"] = LLSD.FromInteger(userState.limited_to_estate);
|
AgentParms["limited_to_estate"] = OSD.FromInteger(userState.limited_to_estate);
|
||||||
AgentParms["inventory_host"] = LLSD.FromString(userState.inventory_host);
|
AgentParms["inventory_host"] = OSD.FromString(userState.inventory_host);
|
||||||
|
|
||||||
// version 1
|
// version 1
|
||||||
RAMap = AgentParms;
|
RAMap = AgentParms;
|
||||||
|
@ -951,11 +951,11 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
string RAMapString = RAMap.ToString();
|
string RAMapString = RAMap.ToString();
|
||||||
m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString);
|
m_log.InfoFormat("[OGP] RAMap string {0}", RAMapString);
|
||||||
LLSD LLSDofRAMap = RAMap; // RENAME if this works
|
OSD LLSDofRAMap = RAMap; // RENAME if this works
|
||||||
|
|
||||||
m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString());
|
m_log.InfoFormat("[OGP]: LLSD of map as string was {0}", LLSDofRAMap.ToString());
|
||||||
//m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap));
|
//m_log.InfoFormat("[OGP]: LLSD+XML: {0}", LLSDParser.SerializeXmlString(LLSDofRAMap));
|
||||||
byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap);
|
byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap);
|
||||||
|
|
||||||
//string bufferDump = System.Text.Encoding.ASCII.GetString(buffer);
|
//string bufferDump = System.Text.Encoding.ASCII.GetString(buffer);
|
||||||
//m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump);
|
//m_log.InfoFormat("[OGP]: buffer form is {0}",bufferDump);
|
||||||
|
@ -973,7 +973,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message);
|
m_log.InfoFormat("[OGP] Bad send on de_rez_avatar {0}", ex.Message);
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
@ -997,21 +997,21 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message);
|
m_log.InfoFormat("[OGP]: exception on read after send of rez avatar {0}", ex.Message);
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
LLSD rezResponse = null;
|
OSD rezResponse = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
rezResponse = LLSDParser.DeserializeXml(rez_avatar_reply);
|
rezResponse = OSDParser.DeserializeLLSDXml(rez_avatar_reply);
|
||||||
|
|
||||||
responseMap = (LLSDMap)rezResponse;
|
responseMap = (OSDMap)rezResponse;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
|
m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
@ -1019,22 +1019,22 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD GenerateNoHandlerMessage()
|
public OSD GenerateNoHandlerMessage()
|
||||||
{
|
{
|
||||||
LLSDMap map = new LLSDMap();
|
OSDMap map = new OSDMap();
|
||||||
map["reason"] = LLSD.FromString("LLSDRequest");
|
map["reason"] = OSD.FromString("LLSDRequest");
|
||||||
map["message"] = LLSD.FromString("No handler registered for LLSD Requests");
|
map["message"] = OSD.FromString("No handler registered for LLSD Requests");
|
||||||
map["login"] = LLSD.FromString("false");
|
map["login"] = OSD.FromString("false");
|
||||||
map["connect"] = LLSD.FromString("false");
|
map["connect"] = OSD.FromString("false");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
public LLSD GenerateNoStateMessage(UUID passedAvatar)
|
public OSD GenerateNoStateMessage(UUID passedAvatar)
|
||||||
{
|
{
|
||||||
LLSDMap map = new LLSDMap();
|
OSDMap map = new OSDMap();
|
||||||
map["reason"] = LLSD.FromString("derez failed");
|
map["reason"] = OSD.FromString("derez failed");
|
||||||
map["message"] = LLSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString());
|
map["message"] = OSD.FromString("Unable to locate OGP state for avatar " + passedAvatar.ToString());
|
||||||
map["login"] = LLSD.FromString("false");
|
map["login"] = OSD.FromString("false");
|
||||||
map["connect"] = LLSD.FromString("false");
|
map["connect"] = OSD.FromString("false");
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata)
|
private bool TryGetAgentCircuitData(string path, out AgentCircuitData userdata)
|
||||||
|
|
|
@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>();
|
List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>();
|
||||||
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
|
foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList)
|
||||||
{
|
{
|
||||||
if (entry.Flags == (AccessList) flags)
|
if (entry.Flags == (AccessList)flags)
|
||||||
{
|
{
|
||||||
toRemove.Add(entry);
|
toRemove.Add(entry);
|
||||||
}
|
}
|
||||||
|
@ -384,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry();
|
ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry();
|
||||||
temp.AgentID = entry.AgentID;
|
temp.AgentID = entry.AgentID;
|
||||||
temp.Time = new DateTime(); //Pointless? Yes.
|
temp.Time = new DateTime(); //Pointless? Yes.
|
||||||
temp.Flags = (AccessList) flags;
|
temp.Flags = (AccessList)flags;
|
||||||
|
|
||||||
if (!newData.ParcelAccessList.Contains(temp))
|
if (!newData.ParcelAccessList.Contains(temp))
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,9 +48,9 @@ using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.Types;
|
using OpenSim.Region.Environment.Types;
|
||||||
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
|
using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
|
||||||
|
|
||||||
using LLSD = OpenMetaverse.StructuredData.LLSD;
|
using OSD = OpenMetaverse.StructuredData.OSD;
|
||||||
using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
|
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
|
||||||
using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
|
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
{
|
{
|
||||||
|
@ -202,7 +202,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||||
mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
|
mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
|
||||||
return mapResponse.ToString();
|
return mapResponse.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
{
|
{
|
||||||
m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName);
|
m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName);
|
||||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||||
mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
|
mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
|
||||||
return mapResponse;
|
return mapResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected static LLSDMapLayer GetLLSDMapLayerResponse()
|
protected static OSDMapLayer GetOSDMapLayerResponse()
|
||||||
{
|
{
|
||||||
LLSDMapLayer mapLayer = new LLSDMapLayer();
|
OSDMapLayer mapLayer = new OSDMapLayer();
|
||||||
mapLayer.Right = 5000;
|
mapLayer.Right = 5000;
|
||||||
mapLayer.Top = 5000;
|
mapLayer.Top = 5000;
|
||||||
mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
|
mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
|
||||||
|
@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
}
|
}
|
||||||
uint xstart = 0;
|
uint xstart = 0;
|
||||||
uint ystart = 0;
|
uint ystart = 0;
|
||||||
Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
|
Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
|
||||||
if (itemtype == 6) // we only sevice 6 right now (avatar green dots)
|
if (itemtype == 6) // we only sevice 6 right now (avatar green dots)
|
||||||
{
|
{
|
||||||
if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
|
if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
|
||||||
|
@ -407,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
|
|
||||||
if (dorequest)
|
if (dorequest)
|
||||||
{
|
{
|
||||||
LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
|
OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
|
||||||
RequestMapItemsCompleted(response);
|
RequestMapItemsCompleted(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,8 +433,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends the mapitem response to the IClientAPI
|
/// Sends the mapitem response to the IClientAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="response">The LLSDMap Response for the mapitem</param>
|
/// <param name="response">The OSDMap Response for the mapitem</param>
|
||||||
private void RequestMapItemsCompleted(LLSDMap response)
|
private void RequestMapItemsCompleted(OSDMap response)
|
||||||
{
|
{
|
||||||
UUID requestID = response["requestID"].AsUUID();
|
UUID requestID = response["requestID"].AsUUID();
|
||||||
|
|
||||||
|
@ -460,10 +460,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
if (response.ContainsKey(mrs.itemtype.ToString()))
|
if (response.ContainsKey(mrs.itemtype.ToString()))
|
||||||
{
|
{
|
||||||
List<mapItemReply> returnitems = new List<mapItemReply>();
|
List<mapItemReply> returnitems = new List<mapItemReply>();
|
||||||
LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()];
|
OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()];
|
||||||
for (int i = 0; i < itemarray.Count; i++)
|
for (int i = 0; i < itemarray.Count; i++)
|
||||||
{
|
{
|
||||||
LLSDMap mapitem = (LLSDMap)itemarray[i];
|
OSDMap mapitem = (OSDMap)itemarray[i];
|
||||||
mapItemReply mi = new mapItemReply();
|
mapItemReply mi = new mapItemReply();
|
||||||
mi.x = (uint)mapitem["X"].AsInteger();
|
mi.x = (uint)mapitem["X"].AsInteger();
|
||||||
mi.y = (uint)mapitem["Y"].AsInteger();
|
mi.y = (uint)mapitem["Y"].AsInteger();
|
||||||
|
@ -517,7 +517,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
/// <param name="itemtype">passed in from packet</param>
|
/// <param name="itemtype">passed in from packet</param>
|
||||||
/// <param name="regionhandle">Region we're looking up</param>
|
/// <param name="regionhandle">Region we're looking up</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
|
private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
|
||||||
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
|
uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
|
||||||
{
|
{
|
||||||
bool blacklisted = false;
|
bool blacklisted = false;
|
||||||
|
@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
}
|
}
|
||||||
|
|
||||||
if (blacklisted)
|
if (blacklisted)
|
||||||
return new LLSDMap();
|
return new OSDMap();
|
||||||
|
|
||||||
UUID requestID = UUID.Random();
|
UUID requestID = UUID.Random();
|
||||||
lock (m_cachedRegionMapItemsAddress)
|
lock (m_cachedRegionMapItemsAddress)
|
||||||
|
@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
|
|
||||||
// Can't find the http server
|
// Can't find the http server
|
||||||
if (httpserver.Length == 0 || blacklisted)
|
if (httpserver.Length == 0 || blacklisted)
|
||||||
return new LLSDMap();
|
return new OSDMap();
|
||||||
|
|
||||||
MapRequestState mrs = new MapRequestState();
|
MapRequestState mrs = new MapRequestState();
|
||||||
mrs.agentID = id;
|
mrs.agentID = id;
|
||||||
|
@ -585,14 +585,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
WebRequest mapitemsrequest = WebRequest.Create(httpserver);
|
WebRequest mapitemsrequest = WebRequest.Create(httpserver);
|
||||||
mapitemsrequest.Method = "POST";
|
mapitemsrequest.Method = "POST";
|
||||||
mapitemsrequest.ContentType = "application/xml+llsd";
|
mapitemsrequest.ContentType = "application/xml+llsd";
|
||||||
LLSDMap RAMap = new LLSDMap();
|
OSDMap RAMap = new OSDMap();
|
||||||
|
|
||||||
// string RAMapString = RAMap.ToString();
|
// string RAMapString = RAMap.ToString();
|
||||||
LLSD LLSDofRAMap = RAMap; // RENAME if this works
|
OSD LLSDofRAMap = RAMap; // RENAME if this works
|
||||||
|
|
||||||
byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap);
|
byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap);
|
||||||
LLSDMap responseMap = new LLSDMap();
|
OSDMap responseMap = new OSDMap();
|
||||||
responseMap["requestID"] = LLSD.FromUUID(requestID);
|
responseMap["requestID"] = OSD.FromUUID(requestID);
|
||||||
|
|
||||||
Stream os = null;
|
Stream os = null;
|
||||||
try
|
try
|
||||||
|
@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message);
|
m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message);
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
lock (m_blacklistedurls)
|
lock (m_blacklistedurls)
|
||||||
{
|
{
|
||||||
if (!m_blacklistedurls.ContainsKey(httpserver))
|
if (!m_blacklistedurls.ContainsKey(httpserver))
|
||||||
|
@ -630,12 +630,12 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return new LLSDMap();
|
return new OSDMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
lock (m_blacklistedurls)
|
lock (m_blacklistedurls)
|
||||||
{
|
{
|
||||||
if (!m_blacklistedurls.ContainsKey(httpserver))
|
if (!m_blacklistedurls.ContainsKey(httpserver))
|
||||||
|
@ -646,18 +646,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
LLSD rezResponse = null;
|
OSD rezResponse = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply);
|
rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply);
|
||||||
|
|
||||||
responseMap = (LLSDMap)rezResponse;
|
responseMap = (OSDMap)rezResponse;
|
||||||
responseMap["requestID"] = LLSD.FromUUID(requestID);
|
responseMap["requestID"] = OSD.FromUUID(requestID);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
//m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
|
//m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
|
||||||
responseMap["connect"] = LLSD.FromBoolean(false);
|
responseMap["connect"] = OSD.FromBoolean(false);
|
||||||
|
|
||||||
return responseMap;
|
return responseMap;
|
||||||
}
|
}
|
||||||
|
@ -793,57 +793,57 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint)
|
public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint)
|
||||||
{
|
{
|
||||||
uint xstart = 0;
|
uint xstart = 0;
|
||||||
uint ystart = 0;
|
uint ystart = 0;
|
||||||
|
|
||||||
Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
|
Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
|
||||||
|
|
||||||
LLSDMap responsemap = new LLSDMap();
|
OSDMap responsemap = new OSDMap();
|
||||||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||||
LLSDArray responsearr = new LLSDArray(avatars.Count);
|
OSDArray responsearr = new OSDArray(avatars.Count);
|
||||||
LLSDMap responsemapdata = new LLSDMap();
|
OSDMap responsemapdata = new OSDMap();
|
||||||
int tc = System.Environment.TickCount;
|
int tc = System.Environment.TickCount;
|
||||||
/*
|
/*
|
||||||
foreach (ScenePresence av in avatars)
|
foreach (ScenePresence av in avatars)
|
||||||
{
|
{
|
||||||
responsemapdata = new LLSDMap();
|
responsemapdata = new OSDMap();
|
||||||
responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
|
responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
|
||||||
responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
|
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
|
||||||
responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
|
responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
|
||||||
responsemapdata["Name"] = LLSD.FromString("TH");
|
responsemapdata["Name"] = OSD.FromString("TH");
|
||||||
responsemapdata["Extra"] = LLSD.FromInteger(0);
|
responsemapdata["Extra"] = OSD.FromInteger(0);
|
||||||
responsemapdata["Extra2"] = LLSD.FromInteger(0);
|
responsemapdata["Extra2"] = OSD.FromInteger(0);
|
||||||
responsearr.Add(responsemapdata);
|
responsearr.Add(responsemapdata);
|
||||||
}
|
}
|
||||||
responsemap["1"] = responsearr;
|
responsemap["1"] = responsearr;
|
||||||
*/
|
*/
|
||||||
if (avatars.Count == 0)
|
if (avatars.Count == 0)
|
||||||
{
|
{
|
||||||
responsemapdata = new LLSDMap();
|
responsemapdata = new OSDMap();
|
||||||
responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1));
|
responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1));
|
||||||
responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1));
|
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1));
|
||||||
responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
|
responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
|
||||||
responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
|
responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
|
||||||
responsemapdata["Extra"] = LLSD.FromInteger(0);
|
responsemapdata["Extra"] = OSD.FromInteger(0);
|
||||||
responsemapdata["Extra2"] = LLSD.FromInteger(0);
|
responsemapdata["Extra2"] = OSD.FromInteger(0);
|
||||||
responsearr.Add(responsemapdata);
|
responsearr.Add(responsemapdata);
|
||||||
|
|
||||||
responsemap["6"] = responsearr;
|
responsemap["6"] = responsearr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
responsearr = new LLSDArray(avatars.Count);
|
responsearr = new OSDArray(avatars.Count);
|
||||||
foreach (ScenePresence av in avatars)
|
foreach (ScenePresence av in avatars)
|
||||||
{
|
{
|
||||||
responsemapdata = new LLSDMap();
|
responsemapdata = new OSDMap();
|
||||||
responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
|
responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
|
||||||
responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
|
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
|
||||||
responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
|
responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
|
||||||
responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
|
responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
|
||||||
responsemapdata["Extra"] = LLSD.FromInteger(1);
|
responsemapdata["Extra"] = OSD.FromInteger(1);
|
||||||
responsemapdata["Extra2"] = LLSD.FromInteger(0);
|
responsemapdata["Extra2"] = OSD.FromInteger(0);
|
||||||
responsearr.Add(responsemapdata);
|
responsearr.Add(responsemapdata);
|
||||||
}
|
}
|
||||||
responsemap["6"] = responsearr;
|
responsemap["6"] = responsearr;
|
||||||
|
|
|
@ -36,7 +36,7 @@ using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Communications;
|
using OpenSim.Framework.Communications;
|
||||||
using OpenSim.Region.Interfaces;
|
using OpenSim.Region.Interfaces;
|
||||||
using LLSD = OpenMetaverse.StructuredData.LLSD;
|
using OSD = OpenMetaverse.StructuredData.OSD;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>();
|
IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>();
|
||||||
if (eq != null)
|
if (eq != null)
|
||||||
{
|
{
|
||||||
LLSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint);
|
OSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint);
|
||||||
eq.Enqueue(Item, avatar.UUID);
|
eq.Enqueue(Item, avatar.UUID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
if (eq != null)
|
if (eq != null)
|
||||||
{
|
{
|
||||||
LLSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint,
|
OSD Item = EventQueueHelper.TeleportFinishEvent(reg.RegionHandle, 13, reg.ExternalEndPoint,
|
||||||
4, teleportFlags, capsPath, avatar.UUID);
|
4, teleportFlags, capsPath, avatar.UUID);
|
||||||
eq.Enqueue(Item, avatar.UUID);
|
eq.Enqueue(Item, avatar.UUID);
|
||||||
}
|
}
|
||||||
|
@ -748,7 +748,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
// and set the map-tile to '(Offline)'
|
// and set the map-tile to '(Offline)'
|
||||||
uint regX, regY;
|
uint regX, regY;
|
||||||
Helpers.LongToUInts(regionHandle, out regX, out regY);
|
Utils.LongToUInts(regionHandle, out regX, out regY);
|
||||||
|
|
||||||
MapBlockData block = new MapBlockData();
|
MapBlockData block = new MapBlockData();
|
||||||
block.X = (ushort)(regX / Constants.RegionSize);
|
block.X = (ushort)(regX / Constants.RegionSize);
|
||||||
|
|
|
@ -584,11 +584,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
invString.AddPermissionsStart();
|
invString.AddPermissionsStart();
|
||||||
|
|
||||||
invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask));
|
invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
|
||||||
invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
|
invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
|
||||||
invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
|
invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0));
|
||||||
invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
|
invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
|
||||||
invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextPermissions));
|
invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
|
||||||
|
|
||||||
invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
|
invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
|
||||||
invString.AddNameValueLine("owner_id", ownerID.ToString());
|
invString.AddNameValueLine("owner_id", ownerID.ToString());
|
||||||
|
@ -601,7 +601,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
|
invString.AddNameValueLine("asset_id", item.AssetID.ToString());
|
||||||
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
|
invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]);
|
||||||
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
|
invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]);
|
||||||
invString.AddNameValueLine("flags", Helpers.UIntToHexString(item.Flags));
|
invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
|
||||||
|
|
||||||
invString.AddSaleStart();
|
invString.AddSaleStart();
|
||||||
invString.AddNameValueLine("sale_type", "not");
|
invString.AddNameValueLine("sale_type", "not");
|
||||||
|
|
|
@ -1089,9 +1089,9 @@ if (m_shape != null) {
|
||||||
data[pos] = (byte)pTexAnim.SizeX; pos++;
|
data[pos] = (byte)pTexAnim.SizeX; pos++;
|
||||||
data[pos] = (byte)pTexAnim.SizeY; pos++;
|
data[pos] = (byte)pTexAnim.SizeY; pos++;
|
||||||
|
|
||||||
Helpers.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
||||||
Helpers.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
||||||
Helpers.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
||||||
|
|
||||||
m_TextureAnimation = data;
|
m_TextureAnimation = data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Types;
|
using OpenSim.Region.Environment.Types;
|
||||||
using OpenSim.Region.Interfaces;
|
using OpenSim.Region.Interfaces;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
using LLSD = OpenMetaverse.StructuredData.LLSD;
|
using OSD = OpenMetaverse.StructuredData.OSD;
|
||||||
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
|
@ -2171,7 +2171,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 vel = m_velocity;
|
Vector3 vel = m_velocity;
|
||||||
ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
|
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
|
||||||
SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
|
SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
|
||||||
if (neighbourRegion != null && ValidateAttachments())
|
if (neighbourRegion != null && ValidateAttachments())
|
||||||
{
|
{
|
||||||
|
@ -2209,7 +2209,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (eq != null)
|
if (eq != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
LLSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
|
OSD Item = EventQueueHelper.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
|
||||||
capsPath, UUID, ControllingClient.SessionId);
|
capsPath, UUID, ControllingClient.SessionId);
|
||||||
eq.Enqueue(Item, UUID);
|
eq.Enqueue(Item, UUID);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,6 @@ namespace OpenSim.Region.Interfaces
|
||||||
{
|
{
|
||||||
public interface IEventQueue
|
public interface IEventQueue
|
||||||
{
|
{
|
||||||
bool Enqueue(LLSD o, UUID avatarID);
|
bool Enqueue(OSD o, UUID avatarID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,9 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Security;
|
||||||
|
using System.Security.Policy;
|
||||||
|
using System.Security.Permissions;
|
||||||
using OpenSim.Region.ScriptEngine.Interfaces;
|
using OpenSim.Region.ScriptEngine.Interfaces;
|
||||||
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
|
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
|
||||||
|
|
||||||
|
@ -132,9 +135,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
ads.ConfigurationFile =
|
ads.ConfigurationFile =
|
||||||
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
|
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
|
||||||
|
|
||||||
|
|
||||||
AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" +
|
AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" +
|
||||||
AppDomainNameCount, null, ads);
|
AppDomainNameCount, null, ads);
|
||||||
|
|
||||||
m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName +
|
m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName +
|
||||||
"]: AppDomain Loading: " +
|
"]: AppDomain Loading: " +
|
||||||
AssemblyName.GetAssemblyName(
|
AssemblyName.GetAssemblyName(
|
||||||
|
|
|
@ -30,6 +30,7 @@ using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Security;
|
||||||
using System.Security.Policy;
|
using System.Security.Policy;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace OpenSim.TestSuite
|
||||||
client.Self.Movement.AtPos = true;
|
client.Self.Movement.AtPos = true;
|
||||||
Thread.Sleep(somthing.Next(25, 75)); // Makes sure the bots keep walking for this time.
|
Thread.Sleep(somthing.Next(25, 75)); // Makes sure the bots keep walking for this time.
|
||||||
}
|
}
|
||||||
client.Self.Jump();
|
client.Self.Jump(true);
|
||||||
|
|
||||||
string randomf = talkarray[somthing.Next(talkarray.Length)];
|
string randomf = talkarray[somthing.Next(talkarray.Length)];
|
||||||
if (talkarray.Length > 1 && randomf.Length > 1)
|
if (talkarray.Length > 1 && randomf.Length > 1)
|
||||||
|
@ -142,7 +142,7 @@ namespace OpenSim.TestSuite
|
||||||
m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed);
|
m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed);
|
||||||
m_action.Start();
|
m_action.Start();
|
||||||
OnConnected(this, EventType.CONNECTED);
|
OnConnected(this, EventType.CONNECTED);
|
||||||
client.Self.Jump();
|
client.Self.Jump(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace pCampBot
|
||||||
client.Self.Movement.AtPos = true;
|
client.Self.Movement.AtPos = true;
|
||||||
Thread.Sleep(somthing.Next(25, 75)); // Makes sure the bots keep walking for this time.
|
Thread.Sleep(somthing.Next(25, 75)); // Makes sure the bots keep walking for this time.
|
||||||
}
|
}
|
||||||
client.Self.Jump();
|
client.Self.Jump(true);
|
||||||
|
|
||||||
string randomf = talkarray[somthing.Next(talkarray.Length)];
|
string randomf = talkarray[somthing.Next(talkarray.Length)];
|
||||||
if (talkarray.Length > 1 && randomf.Length > 1)
|
if (talkarray.Length > 1 && randomf.Length > 1)
|
||||||
|
@ -141,7 +141,7 @@ namespace pCampBot
|
||||||
m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed);
|
m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed);
|
||||||
m_action.Start();
|
m_action.Start();
|
||||||
OnConnected(this, EventType.CONNECTED);
|
OnConnected(this, EventType.CONNECTED);
|
||||||
client.Self.Jump();
|
client.Self.Jump(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="osx" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0.dylib" />
|
<dllmap os="osx" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib" />
|
||||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-x86_64" />
|
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0" />
|
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue