diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index 45b8d6f4b9..00657028e4 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -122,9 +122,10 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
Thread.CurrentThread.ManagedThreadId.ToString() +
")");
- m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
+ bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]);
m_openSim.CreateRegion(regionsToLoad[i], true, out scene);
- regionsToLoad[i].EstateSettings.Save();
+ if (changed)
+ regionsToLoad[i].EstateSettings.Save();
if (scene != null)
{
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index d0463c8121..401dfd3e26 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -447,8 +447,8 @@ namespace OpenSim.Framework.Servers.HttpServer
{
if (DebugLevel >= 1)
m_log.DebugFormat(
- "[BASE HTTP SERVER]: Found stream handler for {0} {1}",
- request.HttpMethod, request.Url.PathAndQuery);
+ "[BASE HTTP SERVER]: Found stream handler for {0} {1} {2} {3}",
+ request.HttpMethod, request.Url.PathAndQuery, requestHandler.Name, requestHandler.Description);
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
byte[] buffer = null;
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 4ec64eeb55..6796f2bd33 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -618,10 +618,11 @@ namespace OpenSim
return;
}
- PopulateRegionEstateInfo(regInfo);
+ bool changed = PopulateRegionEstateInfo(regInfo);
IScene scene;
CreateRegion(regInfo, true, out scene);
- regInfo.EstateSettings.Save();
+ if (changed)
+ regInfo.EstateSettings.Save();
}
///
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 79259d8b3c..045e8d2f4a 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -977,13 +977,13 @@ namespace OpenSim
/// Load the estate information for the provided RegionInfo object.
///
///
- public void PopulateRegionEstateInfo(RegionInfo regInfo)
+ public bool PopulateRegionEstateInfo(RegionInfo regInfo)
{
if (EstateDataService != null)
regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false);
if (regInfo.EstateSettings.EstateID != 0)
- return;
+ return false; // estate info in the database did not change
m_log.WarnFormat("[ESTATE] Region {0} is not part of an estate.", regInfo.RegionName);
@@ -1018,7 +1018,7 @@ namespace OpenSim
}
if (defaultEstateJoined)
- return;
+ return true; // need to update the database
else
m_log.ErrorFormat(
"[OPENSIM BASE]: Joining default estate {0} failed", defaultEstateName);
@@ -1080,8 +1080,10 @@ namespace OpenSim
MainConsole.Instance.Output("Joining the estate failed. Please try again.");
}
}
- }
- }
+ }
+
+ return true; // need to update the database
+ }
}
public class OpenSimConfigSource
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 9791885ffa..6c28e78f20 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -309,7 +309,7 @@ namespace OpenSim.Region.ClientStack.Linden
m_HostCapsObj.HttpListener.AddStreamHandler(
new BinaryStreamHandler(
- "POST", capsBase + uploaderPath, uploader.uploaderCaps, "BunchOfCaps", null));
+ "POST", capsBase + uploaderPath, uploader.uploaderCaps, "TaskInventoryScriptUpdater", null));
string protocol = "http://";
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index ae5cbfff55..4d6081c447 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11955,21 +11955,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected void MakeAssetRequest(TransferRequestPacket transferRequest, UUID taskID)
{
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);
}
- else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem)
+ else if (sourceType == (int)SourceType.SimInventoryItem)
{
requestID = new UUID(transferRequest.TransferInfo.Params, 80);
}
- else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimEstate)
+ else if (sourceType == (int)SourceType.SimEstate)
{
requestID = taskID;
}
-
-// m_log.DebugFormat("[CLIENT]: {0} requesting asset {1}", Name, requestID);
+// m_log.DebugFormat(
+// "[LLCLIENTVIEW]: Received transfer request for {0} in {1} type {2} by {3}",
+// requestID, taskID, (SourceType)sourceType, Name);
m_assetService.Get(requestID.ToString(), transferRequest, AssetReceived);
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 816d3b64ce..8a26df1dc2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -300,6 +300,10 @@ namespace OpenSim.Region.Framework.Scenes
AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data, remoteClient.AgentId);
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)
{
part.Inventory.RemoveScriptInstance(item.ItemID, false);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 4bec2d4157..f911ef87a7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3321,10 +3321,10 @@ namespace OpenSim.Region.Framework.Scenes
public void SetVehicleFlags(int param, bool remove)
{
- if (PhysActor != null)
- {
- PhysActor.VehicleFlags(param, remove);
- }
+ PhysicsActor pa = PhysActor;
+
+ if (pa != null)
+ pa.VehicleFlags(param, remove);
}
public void SetGroup(UUID groupID, IClientAPI client)
@@ -3356,10 +3356,12 @@ namespace OpenSim.Region.Framework.Scenes
public void SetPhysicsAxisRotation()
{
- if (PhysActor != null)
+ PhysicsActor pa = PhysActor;
+
+ if (pa != null)
{
- PhysActor.LockAngularMotion(RotationAxis);
- ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+ pa.LockAngularMotion(RotationAxis);
+ ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa);
}
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index afd943b481..5b5cab860c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5529,6 +5529,91 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
return "en-us";
}
+ ///
+ /// 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.
+ ///
+ 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 presenceIds = new List();
+
+ 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)
{
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 7a797ac27b..7f5d1feec1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -109,6 +109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Vector llGetAccel();
LSL_Integer llGetAgentInfo(string id);
LSL_String llGetAgentLanguage(string id);
+ LSL_List llGetAgentList(LSL_Integer scope, LSL_List options);
LSL_Vector llGetAgentSize(string id);
LSL_Float llGetAlpha(int face);
LSL_Float llGetAndResetTime();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 2a28542a96..b6c21e6cdd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -501,6 +501,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int OBJECT_STREAMING_COST = 15;
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?
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);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 80fa530410..c0bf29ca2d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -389,6 +389,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
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)
{
return m_LSL_Functions.llGetAgentSize(id);
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs
index 0cc2a4b57f..42c82cf34c 100644
--- a/OpenSim/Server/Base/ServerUtils.cs
+++ b/OpenSim/Server/Base/ServerUtils.cs
@@ -268,7 +268,7 @@ namespace OpenSim.Server.Base
continue;
XmlElement elem = parent.OwnerDocument.CreateElement("",
- kvp.Key, "");
+ XmlConvert.EncodeLocalName(kvp.Key), "");
if (kvp.Value is Dictionary)
{
@@ -323,11 +323,11 @@ namespace OpenSim.Server.Base
XmlNode type = part.Attributes.GetNamedItem("type");
if (type == null || type.Value != "List")
{
- ret[part.Name] = part.InnerText;
+ ret[XmlConvert.DecodeName(part.Name)] = part.InnerText;
}
else
{
- ret[part.Name] = ParseElement(part);
+ ret[XmlConvert.DecodeName(part.Name)] = ParseElement(part);
}
}
diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
rename to OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Authentication/AuthenticationServiceConnector.cs
rename to OpenSim/Services/Connectors/Authentication/AuthenticationServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs
rename to OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs
rename to OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs
rename to OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
rename to OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
rename to OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Hypergrid/HGFriendsServiceConnector.cs
rename to OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs
rename to OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs
rename to OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Land/LandServiceConnector.cs b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Land/LandServiceConnector.cs
rename to OpenSim/Services/Connectors/Land/LandServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs
rename to OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Neighbour/NeighbourServiceConnector.cs
rename to OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs
rename to OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs
diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs
similarity index 100%
rename from OpenSim/Services/Connectors/UserAccounts/UserAccountServiceConnector.cs
rename to OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs