Merge branch 'master' into careminster

avinationmerge
Melanie 2012-05-10 00:42:10 +01:00
commit a90822f4b8
24 changed files with 114 additions and 11 deletions

View File

@ -447,8 +447,8 @@ namespace OpenSim.Framework.Servers.HttpServer
{ {
if (DebugLevel >= 1) if (DebugLevel >= 1)
m_log.DebugFormat( m_log.DebugFormat(
"[BASE HTTP SERVER]: Found stream handler for {0} {1}", "[BASE HTTP SERVER]: Found stream handler for {0} {1} {2} {3}",
request.HttpMethod, request.Url.PathAndQuery); request.HttpMethod, request.Url.PathAndQuery, requestHandler.Name, requestHandler.Description);
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
byte[] buffer = null; byte[] buffer = null;

View File

@ -320,7 +320,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_HostCapsObj.HttpListener.AddStreamHandler( m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler( new BinaryStreamHandler(
"POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null)); "POST", capsBase + uploaderPath, uploader.uploaderCaps, "TaskInventoryScriptUpdater", null));
string protocol = "http://"; string protocol = "http://";

View File

@ -12109,21 +12109,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID) protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
{ {
UUID requestID = UUID.Zero; UUID requestID = UUID.Zero;
if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) int sourceType = transferRequest.TransferInfo.SourceType;
if (sourceType == (int)SourceType.Asset)
{ {
requestID = new UUID(transferRequest.TransferInfo.Params, 0); requestID = new UUID(transferRequest.TransferInfo.Params, 0);
} }
else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) else if (sourceType == (int)SourceType.SimInventoryItem)
{ {
requestID = new UUID(transferRequest.TransferInfo.Params, 80); requestID = new UUID(transferRequest.TransferInfo.Params, 80);
} }
else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate) else if (sourceType == (int)SourceType.SimEstate)
{ {
requestID = taskID; requestID = taskID;
} }
// m_log.DebugFormat(
// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID); // "[LLCLIENTVIEW]: Received transfer request for {0} in {1} type {2} by {3}",
// requestID, taskID, (SourceType)sourceType, Name);
//Note, the bool returned from the below function is useless since it is always false. //Note, the bool returned from the below function is useless since it is always false.

View File

@ -300,6 +300,10 @@ namespace OpenSim.Region.Framework.Scenes
AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data, remoteClient.AgentId); AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data, remoteClient.AgentId);
AssetService.Store(asset); AssetService.Store(asset);
// m_log.DebugFormat(
// "[PRIM INVENTORY]: Stored asset {0} when updating item {1} in prim {2} for {3}",
// asset.ID, item.Name, part.Name, remoteClient.Name);
if (isScriptRunning) if (isScriptRunning)
{ {
part.Inventory.RemoveScriptInstance(item.ItemID, false); part.Inventory.RemoveScriptInstance(item.ItemID, false);

View File

@ -5953,6 +5953,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
return "en-us"; return "en-us";
} }
/// <summary>
/// http://wiki.secondlife.com/wiki/LlGetAgentList
/// The list of options is currently not used in SL
/// scope is one of:-
/// AGENT_LIST_REGION - all in the region
/// AGENT_LIST_PARCEL - all in the same parcel as the scripted object
/// AGENT_LIST_PARCEL_OWNER - all in any parcel owned by the owner of the
/// current parcel.
/// </summary>
public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
{
m_host.AddScriptLPS(1);
// the constants are 1, 2 and 4 so bits are being set, but you
// get an error "INVALID_SCOPE" if it is anything but 1, 2 and 4
bool regionWide = scope == ScriptBaseClass.AGENT_LIST_REGION;
bool parcelOwned = scope == ScriptBaseClass.AGENT_LIST_PARCEL_OWNER;
bool parcel = scope == ScriptBaseClass.AGENT_LIST_PARCEL;
LSL_List result = new LSL_List();
if (!regionWide && !parcelOwned && !parcel)
{
result.Add("INVALID_SCOPE");
return result;
}
ILandObject land;
Vector3 pos;
UUID id = UUID.Zero;
if (parcel || parcelOwned)
{
pos = m_host.ParentGroup.RootPart.GetWorldPosition();
land = World.LandChannel.GetLandObject(pos.X, pos.Y);
if (land == null)
{
id = UUID.Zero;
}
else
{
if (parcelOwned)
{
id = land.LandData.OwnerID;
}
else
{
id = land.LandData.GlobalID;
}
}
}
List<UUID> presenceIds = new List<UUID>();
World.ForEachRootScenePresence(
delegate (ScenePresence ssp)
{
// Gods are not listed in SL
if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent)
{
if (!regionWide)
{
pos = ssp.AbsolutePosition;
land = World.LandChannel.GetLandObject(pos.X, pos.Y);
if (land != null)
{
if (parcelOwned && land.LandData.OwnerID == id ||
parcel && land.LandData.GlobalID == id)
{
result.Add(ssp.UUID.ToString());
}
}
}
else
{
result.Add(ssp.UUID.ToString());
}
}
// Maximum of 100 results
if (result.Length > 99)
{
return;
}
}
);
return result;
}
public void llAdjustSoundVolume(double volume) public void llAdjustSoundVolume(double volume)
{ {

View File

@ -109,6 +109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Vector llGetAccel(); LSL_Vector llGetAccel();
LSL_Integer llGetAgentInfo(string id); LSL_Integer llGetAgentInfo(string id);
LSL_String llGetAgentLanguage(string id); LSL_String llGetAgentLanguage(string id);
LSL_List llGetAgentList(LSL_Integer scope, LSL_List options);
LSL_Vector llGetAgentSize(string id); LSL_Vector llGetAgentSize(string id);
LSL_Float llGetAlpha(int face); LSL_Float llGetAlpha(int face);
LSL_Float llGetAndResetTime(); LSL_Float llGetAndResetTime();

View File

@ -503,6 +503,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int OBJECT_STREAMING_COST = 15; public const int OBJECT_STREAMING_COST = 15;
public const int OBJECT_PHYSICS_COST = 16; public const int OBJECT_PHYSICS_COST = 16;
// for llGetAgentList
public const int AGENT_LIST_PARCEL = 1;
public const int AGENT_LIST_PARCEL_OWNER = 2;
public const int AGENT_LIST_REGION = 4;
// Can not be public const? // Can not be public const?
public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);
public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0); public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0);

View File

@ -396,6 +396,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_LSL_Functions.llGetAgentLanguage(id); return m_LSL_Functions.llGetAgentLanguage(id);
} }
public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
{
return m_LSL_Functions.llGetAgentList(scope, options);
}
public LSL_Vector llGetAgentSize(string id) public LSL_Vector llGetAgentSize(string id)
{ {
return m_LSL_Functions.llGetAgentSize(id); return m_LSL_Functions.llGetAgentSize(id);

View File

@ -268,7 +268,7 @@ namespace OpenSim.Server.Base
continue; continue;
XmlElement elem = parent.OwnerDocument.CreateElement("", XmlElement elem = parent.OwnerDocument.CreateElement("",
kvp.Key, ""); XmlConvert.EncodeLocalName(kvp.Key), "");
if (kvp.Value is Dictionary<string, object>) if (kvp.Value is Dictionary<string, object>)
{ {
@ -323,11 +323,11 @@ namespace OpenSim.Server.Base
XmlNode type = part.Attributes.GetNamedItem("type"); XmlNode type = part.Attributes.GetNamedItem("type");
if (type == null || type.Value != "List") if (type == null || type.Value != "List")
{ {
ret[part.Name] = part.InnerText; ret[XmlConvert.DecodeName(part.Name)] = part.InnerText;
} }
else else
{ {
ret[part.Name] = ParseElement(part); ret[XmlConvert.DecodeName(part.Name)] = ParseElement(part);
} }
} }