Compare commits

..

18 Commits

Author SHA1 Message Date
Justin Clark-Casey (justincc)
a2d327b70b Merge branch '0.7.5-post-fixes' of ssh://opensimulator.org/var/git/opensim into 0.7.5-post-fixes 2013-02-08 21:43:42 +00:00
Justin Clark-Casey (justincc)
30638317ab Bump 0.7.5 flavour to Release 2013-02-08 21:37:14 +00:00
Justin Clark-Casey (justincc)
689da0f14d If a component of a coalesced object fails to deserialization, do not add a null where the object should be.
This prevents a later load IAR failure.
This code is currently only used by IAR loading.
2013-02-08 21:33:08 +00:00
Justin Clark-Casey (justincc)
6d3b2d2cf7 On IAR loading, if loading of a coaleseced item entirely fails, then continue with the IAR load rather than failing completely. 2013-02-08 21:32:59 +00:00
teravus
78debc981f * the root prim was being given an OffsetPosition in addition to setting the position when creating the root prim. The offset position caused the positioning code to re-move the root prim when you selected it and released it. 2013-02-08 21:31:51 +00:00
Melanie
e3f01f23af Try to fix uploaded mesh rotations - code from Avination code base. 2013-02-08 21:31:38 +00:00
Dan Lake
f28a592310 Added option for UUID as command parameters. This lets the command handle the UUID parsing and type checking before the command is executed. 2013-02-08 21:30:41 +00:00
Justin Clark-Casey (justincc)
4c4cc917b4 minor: Tidy up disabled logging on AssetTransactionModule for future use. Make it clear that transaction parameter to HandleUDPUploadRequest is an ID. 2013-02-08 21:29:56 +00:00
Justin Clark-Casey (justincc)
430000ad24 minor: remove some mono compile warnings in XEngine.cs 2013-02-08 21:29:43 +00:00
Melanie
eab57cdd13 Prevent items being destroyed by rename operations. Renaming of a wearable also
sends an asset transaciton but it is empty. So we can't ignore name data
when a transaction is present and can't treat every transaction as valid.

Conflicts:

	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
2013-02-08 21:29:15 +00:00
Justin Clark-Casey (justincc)
5b60f632c9 Fix issue where the "set terrain texture" console command did not tell the viewers that textures had updated (hence they did not display the changes).
Addresses http://opensimulator.org/mantis/view.php?id=6513
2013-02-08 21:29:01 +00:00
Talun
d1320993a4 Mantis 6343: Turn a prim to flexy to OFF don't work llSetPrimParams
Correction so that scripts can turn Flexi off as well as on.
2013-02-08 21:28:48 +00:00
Oren Hurvitz
319069d193 Assign the SmartThreadPool name in the constructor
This is required because some threads are created in the constructor, so assigning the name afterwards would be too late.
2013-02-08 21:26:05 +00:00
Justin Clark-Casey (justincc)
82268d715e Explicitly stop PollServiceRequestManager() rather than relying on its destructor.
Hopes to address occasional shutdown failures from http://opensimulator.org/mantis/view.php?id=6503
2013-02-08 21:25:57 +00:00
Talun
efcbae372b Mantis 6507 keys returned by llGetAgentList incorrect for llList2Key
The type of the keys returned by llGetAgentList corrected to LSL_Key
2013-02-08 21:25:47 +00:00
Diva Canto
6e5d352bf6 Changed protection of CreateDefaultAppearanceEntries to protected, so extensions of the UserAccountService can reuse this. 2013-02-05 16:29:25 -08:00
Justin Clark-Casey (justincc)
8f32e16497 minor: Fix full scene part console report to show proper Light* names rather than all wrongly FlexiDrag 2013-01-26 00:33:28 +00:00
Justin Clark-Casey (justincc)
c42e2c6906 minor: Call down to base OpenSimTestCase.SetUp() in NPCModuleTests to disable any enabled logging from previous tests 2013-01-26 00:33:19 +00:00
19 changed files with 154 additions and 57 deletions

View File

@@ -1623,6 +1623,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// Long Poll Service Manager with 3 worker threads a 25 second timeout for no events
m_PollServiceManager = new PollServiceRequestManager(this, 3, 25000);
m_PollServiceManager.Start();
HTTPDRunning = true;
//HttpListenerContext context;
@@ -1673,6 +1674,8 @@ namespace OpenSim.Framework.Servers.HttpServer
HTTPDRunning = false;
try
{
m_PollServiceManager.Stop();
m_httpListener2.ExceptionThrown -= httpServerException;
//m_httpListener2.DisconnectHandler = null;

View File

@@ -45,19 +45,26 @@ namespace OpenSim.Framework.Servers.HttpServer
private uint m_WorkerThreadCount = 0;
private Thread[] m_workerThreads;
private PollServiceWorkerThread[] m_PollServiceWorkerThreads;
private bool m_running = true;
private volatile bool m_running = true;
private int m_pollTimeout;
public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
{
m_server = pSrv;
m_WorkerThreadCount = pWorkerThreadCount;
m_pollTimeout = pTimeout;
}
public void Start()
{
m_running = true;
m_workerThreads = new Thread[m_WorkerThreadCount];
m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
//startup worker threads
for (uint i = 0; i < m_WorkerThreadCount; i++)
{
m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, pTimeout);
m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, m_pollTimeout);
m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;
m_workerThreads[i]
@@ -136,8 +143,10 @@ namespace OpenSim.Framework.Servers.HttpServer
}
~PollServiceRequestManager()
public void Stop()
{
m_running = false;
foreach (object o in m_requests)
{
PollServiceHttpRequest req = (PollServiceHttpRequest) o;
@@ -151,8 +160,6 @@ namespace OpenSim.Framework.Servers.HttpServer
{
t.Abort();
}
m_running = false;
}
}
}

View File

@@ -30,7 +30,7 @@ namespace OpenSim
public class VersionInfo
{
private const string VERSION_NUMBER = "0.7.5";
private const Flavour VERSION_FLAVOUR = Flavour.RC2;
private const Flavour VERSION_FLAVOUR = Flavour.Release;
public enum Flavour
{

View File

@@ -1658,8 +1658,13 @@ namespace OpenSim.Framework
if (m_ThreadPool != null)
throw new InvalidOperationException("SmartThreadPool is already initialized");
m_ThreadPool = new SmartThreadPool(2000, maxThreads, 2);
m_ThreadPool.Name = "Util";
STPStartInfo startInfo = new STPStartInfo();
startInfo.ThreadPoolName = "Util";
startInfo.IdleTimeout = 2000;
startInfo.MaxWorkerThreads = maxThreads;
startInfo.MinWorkerThreads = 2;
m_ThreadPool = new SmartThreadPool(startInfo);
}
public static int FireAndForgetCount()

View File

@@ -617,7 +617,7 @@ namespace OpenSim.Region.ClientStack.Linden
= new SceneObjectPart(owner_id, pbs, position, Quaternion.Identity, Vector3.Zero);
prim.Scale = scale;
prim.OffsetPosition = position;
//prim.OffsetPosition = position;
rotations.Add(rotation);
positions.Add(position);
prim.UUID = UUID.Random();
@@ -641,25 +641,40 @@ namespace OpenSim.Region.ClientStack.Linden
grp.AddPart(prim);
}
// Fix first link number
Vector3 rootPos = positions[0];
if (grp.Parts.Length > 1)
{
// Fix first link number
grp.RootPart.LinkNum++;
Vector3 rootPos = positions[0];
grp.AbsolutePosition = rootPos;
for (int i = 0; i < positions.Count; i++)
Quaternion rootRotConj = Quaternion.Conjugate(rotations[0]);
Quaternion tmprot;
Vector3 offset;
// fix children rotations and positions
for (int i = 1; i < rotations.Count; i++)
{
tmprot = rotations[i];
tmprot = rootRotConj * tmprot;
grp.Parts[i].RotationOffset = tmprot;
offset = positions[i] - rootPos;
offset *= rootRotConj;
grp.Parts[i].OffsetPosition = offset;
}
grp.AbsolutePosition = rootPos;
grp.UpdateGroupRotationR(rotations[0]);
}
else
{
Vector3 offset = positions[i] - rootPos;
grp.Parts[i].OffsetPosition = offset;
grp.AbsolutePosition = rootPos;
grp.UpdateGroupRotationR(rotations[0]);
}
for (int i = 0; i < rotations.Count; i++)
{
if (i != 0)
grp.Parts[i].RotationOffset = rotations[i];
}
grp.UpdateGroupRotationR(rotations[0]);
data = ASCIIEncoding.ASCII.GetBytes(SceneObjectSerializer.ToOriginalXmlFormat(grp));
}

View File

@@ -214,9 +214,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
public void HandleTaskItemUpdateFromTransaction(
IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item)
{
m_log.DebugFormat(
"[ASSET TRANSACTION MODULE] Called HandleTaskItemUpdateFromTransaction with item {0} in {1} for {2} in {3}",
item.Name, part.Name, remoteClient.Name, m_Scene.RegionInfo.RegionName);
// m_log.DebugFormat(
// "[ASSET TRANSACTION MODULE]: Called HandleTaskItemUpdateFromTransaction with item {0} in {1} for {2} in {3}",
// item.Name, part.Name, remoteClient.Name, m_Scene.RegionInfo.RegionName);
AgentAssetTransactions transactions =
GetUserTransactions(remoteClient.AgentId);
@@ -230,15 +230,17 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="assetID"></param>
/// <param name="transaction"></param>
/// <param name="transactionID"></param>
/// <param name="type"></param>
/// <param name="data"></param></param>
/// <param name="tempFile"></param>
public void HandleUDPUploadRequest(IClientAPI remoteClient,
UUID assetID, UUID transaction, sbyte type, byte[] data,
UUID assetID, UUID transactionID, sbyte type, byte[] data,
bool storeLocal, bool tempFile)
{
// m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
// m_log.DebugFormat(
// "[ASSET TRANSACTION MODULE]: HandleUDPUploadRequest - assetID: {0}, transaction {1}, type {2}, storeLocal {3}, tempFile {4}, data.Length {5}",
// assetID, transactionID, type, storeLocal, tempFile, data.Length);
if (((AssetType)type == AssetType.Texture ||
(AssetType)type == AssetType.Sound ||
@@ -274,8 +276,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
uploader.StartUpload(remoteClient, assetID, transaction, type, data, storeLocal, tempFile);
AssetXferUploader uploader = transactions.RequestXferUploader(transactionID);
uploader.StartUpload(remoteClient, assetID, transactionID, type, data, storeLocal, tempFile);
}
/// <summary>

View File

@@ -321,7 +321,8 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
// to avoid a race condition when the appearance module retrieves the item to set the asset id in
// the AvatarAppearance structure.
item.AssetID = m_asset.FullID;
m_Scene.InventoryService.UpdateItem(item);
if (item.AssetID != UUID.Zero)
m_Scene.InventoryService.UpdateItem(item);
if (m_uploadState == UploadState.Complete)
{

View File

@@ -487,6 +487,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{
// m_log.DebugFormat(
// "[INVENTORY ARCHIVER]: Loaded coalescence {0} has {1} objects", assetId, coa.Count);
if (coa.Objects.Count == 0)
{
m_log.WarnFormat(
"[INVENTORY ARCHIVE READ REQUEST]: Aborting load of coalesced object from asset {0} as it has zero loaded components",
assetId);
return false;
}
sceneObjects.AddRange(coa.Objects);
}
@@ -495,7 +503,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
SceneObjectGroup deserializedObject = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
if (deserializedObject != null)
{
sceneObjects.Add(deserializedObject);
}
else
{
m_log.WarnFormat(
"[INVENTORY ARCHIVE READ REQUEST]: Aborting load of object from asset {0} as deserialization failed",
assetId);
return false;
}
}
foreach (SceneObjectGroup sog in sceneObjects)

View File

@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using OpenSim.Region.Framework.Interfaces;
using OpenMetaverse;
namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
{
@@ -152,6 +153,9 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
case "Boolean":
m_args[i].ArgumentValue = Boolean.Parse(arg.ToString());
break;
case "UUID":
m_args[i].ArgumentValue = UUID.Parse(arg.ToString());
break;
default:
Console.WriteLine("ERROR: Unknown desired type for argument " + m_args[i].Name + " on command " + m_name);
break;

View File

@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
m_module.Scene.RegionInfo.RegionSettings.Save();
m_module.TriggerRegionInfoChange();
m_module.sendRegionInfoPacketToAll();
m_module.sendRegionHandshakeToAll();
}
}
}

View File

@@ -592,11 +592,11 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
cdl.AddRow(
"LightColor",
string.Format("<{0},{1},{2},{3}>", s.LightColorR, s.LightColorB, s.LightColorG, s.LightColorA));
cdl.AddRow("FlexiDrag", s.LightCutoff);
cdl.AddRow("FlexiDrag", s.LightEntry);
cdl.AddRow("FlexiDrag", s.LightFalloff);
cdl.AddRow("FlexiDrag", s.LightIntensity);
cdl.AddRow("FlexiDrag", s.LightRadius);
cdl.AddRow("LightCutoff", s.LightCutoff);
cdl.AddRow("LightEntry", s.LightEntry);
cdl.AddRow("LightFalloff", s.LightFalloff);
cdl.AddRow("LightIntensity", s.LightIntensity);
cdl.AddRow("LightRadius", s.LightRadius);
cdl.AddRow("Media", string.Format("{0} entries", s.Media != null ? s.Media.Count.ToString() : "n/a"));
cdl.AddRow("PathBegin", s.PathBegin);
cdl.AddRow("PathEnd", s.PathEnd);

View File

@@ -407,16 +407,16 @@ namespace OpenSim.Region.Framework.Scenes
if (item.Owner != remoteClient.AgentId)
return;
if (UUID.Zero == transactionID)
{
item.Name = itemUpd.Name;
item.Description = itemUpd.Description;
item.Name = itemUpd.Name;
item.Description = itemUpd.Description;
// m_log.DebugFormat(
// "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}",
// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags,
// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions);
if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid
{
if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions))
item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
@@ -451,7 +451,8 @@ namespace OpenSim.Region.Framework.Scenes
InventoryService.UpdateItem(item);
}
else
if (UUID.Zero != transactionID)
{
if (AgentTransactionsModule != null)
{

View File

@@ -42,9 +42,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
/// <summary>
/// Serialize and deserialize coalesced scene objects.
/// </summary>
/// <remarks>
/// Deserialization not yet here.
/// </remarks>
public class CoalescedSceneObjectsSerializer
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -128,6 +125,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
// m_log.DebugFormat("[COALESCED SCENE OBJECTS SERIALIZER]: TryFromXml() deserializing {0}", xml);
coa = null;
int i = 0;
using (StringReader sr = new StringReader(xml))
{
@@ -153,7 +151,23 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
if (reader.Name == "SceneObjectGroup")
{
string soXml = reader.ReadOuterXml();
coa.Add(SceneObjectSerializer.FromOriginalXmlFormat(soXml));
SceneObjectGroup so = SceneObjectSerializer.FromOriginalXmlFormat(soXml);
if (so != null)
{
coa.Add(so);
}
else
{
// XXX: Possibly we should fail outright here rather than continuing if a particular component of the
// coalesced object fails to load.
m_log.WarnFormat(
"[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml for component {0} failed. Continuing.",
i);
}
i++;
}
}

View File

@@ -74,6 +74,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
[SetUp]
public void Init()
{
base.SetUp();
IConfigSource config = new IniConfigSource();
config.AddConfig("NPC");
config.Configs["NPC"].Set("Enabled", "true");

View File

@@ -1668,10 +1668,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.Shape.FlexiForceX = (float)Force.x;
part.Shape.FlexiForceY = (float)Force.y;
part.Shape.FlexiForceZ = (float)Force.z;
part.Shape.PathCurve = 0x80;
part.ParentGroup.HasGroupChanged = true;
part.ScheduleFullUpdate();
part.Shape.PathCurve = (byte)Extrusion.Flexible;
}
else
{
// Other values not set, they do not seem to be sent to the viewer
// Setting PathCurve appears to be what actually toggles the check box and turns Flexi on and off
part.Shape.PathCurve = (byte)Extrusion.Straight;
part.Shape.FlexiEntry = false;
}
part.ParentGroup.HasGroupChanged = true;
part.ScheduleFullUpdate();
}
/// <summary>
@@ -5770,13 +5777,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (parcelOwned && land.LandData.OwnerID == id ||
parcel && land.LandData.GlobalID == id)
{
result.Add(ssp.UUID.ToString());
result.Add(new LSL_Key(ssp.UUID.ToString()));
}
}
}
else
{
result.Add(ssp.UUID.ToString());
result.Add(new LSL_Key(ssp.UUID.ToString()));
}
}
// Maximum of 100 results

View File

@@ -47,7 +47,6 @@ using OpenSim.Framework.Console;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
using OpenSim.Region.ScriptEngine.Shared.CodeTools;
using OpenSim.Region.ScriptEngine.Shared.Instance;
using OpenSim.Region.ScriptEngine.Shared.Api;
@@ -606,7 +605,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
}
StringBuilder sb = new StringBuilder();
Queue eq = instance.EventQueue;
sb.AppendFormat("Script name : {0}\n", instance.ScriptName);
sb.AppendFormat("Status : {0}\n", status);
@@ -1486,7 +1484,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_MaxScriptQueue = maxScriptQueue;
STPStartInfo startInfo = new STPStartInfo();
startInfo.IdleTimeout = idleTimeout*1000; // convert to seconds as stated in .ini
startInfo.ThreadPoolName = "XEngine";
startInfo.IdleTimeout = idleTimeout * 1000; // convert to seconds as stated in .ini
startInfo.MaxWorkerThreads = maxThreads;
startInfo.MinWorkerThreads = minThreads;
startInfo.ThreadPriority = threadPriority;;
@@ -1494,7 +1493,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
startInfo.StartSuspended = true;
m_ThreadPool = new SmartThreadPool(startInfo);
m_ThreadPool.Name = "XEngine";
}
//

View File

@@ -545,7 +545,7 @@ namespace OpenSim.Services.UserAccountService
return account;
}
private void CreateDefaultAppearanceEntries(UUID principalID)
protected void CreateDefaultAppearanceEntries(UUID principalID)
{
m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default appearance items for {0}", principalID);

View File

@@ -32,6 +32,11 @@ namespace Amib.Threading
/// </summary>
private ThreadPriority _threadPriority;
/// <summary>
/// The thread pool name. Threads will get names depending on this.
/// </summary>
private string _threadPoolName;
/// <summary>
/// If this field is not null then the performance counters are enabled
/// and use the string as the name of the instance.
@@ -46,6 +51,7 @@ namespace Amib.Threading
_minWorkerThreads = SmartThreadPool.DefaultMinWorkerThreads;
_maxWorkerThreads = SmartThreadPool.DefaultMaxWorkerThreads;
_threadPriority = SmartThreadPool.DefaultThreadPriority;
_threadPoolName = SmartThreadPool.DefaultThreadPoolName;
_pcInstanceName = SmartThreadPool.DefaultPerformanceCounterInstanceName;
_stackSize = SmartThreadPool.DefaultStackSize;
}
@@ -56,6 +62,7 @@ namespace Amib.Threading
_minWorkerThreads = stpStartInfo._minWorkerThreads;
_maxWorkerThreads = stpStartInfo._maxWorkerThreads;
_threadPriority = stpStartInfo._threadPriority;
_threadPoolName = stpStartInfo._threadPoolName;
_pcInstanceName = stpStartInfo._pcInstanceName;
_stackSize = stpStartInfo._stackSize;
}
@@ -84,6 +91,13 @@ namespace Amib.Threading
set { _threadPriority = value; }
}
public virtual string ThreadPoolName
{
get { return _threadPoolName; }
set { _threadPoolName = value; }
}
public string PerformanceCounterInstanceName
{
get { return _pcInstanceName; }

View File

@@ -135,6 +135,11 @@ namespace Amib.Threading
/// </summary>
public const ThreadPriority DefaultThreadPriority = ThreadPriority.Normal;
/// <summary>
/// The default thread pool name
/// </summary>
public const string DefaultThreadPoolName = "SmartThreadPool";
#endregion
#region Member Variables
@@ -143,7 +148,7 @@ namespace Amib.Threading
/// Contains the name of this instance of SmartThreadPool.
/// Can be changed by the user.
/// </summary>
private string _name = "SmartThreadPool";
private string _name = DefaultThreadPoolName;
/// <summary>
/// Hashtable of all the threads in the thread pool.
@@ -307,6 +312,7 @@ namespace Amib.Threading
private void Initialize()
{
Name = _stpStartInfo.ThreadPoolName;
ValidateSTPStartInfo();
if (null != _stpStartInfo.PerformanceCounterInstanceName)