diff options
Diffstat (limited to '')
5 files changed, 34 insertions, 2 deletions
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 7b0e053..e7f2e13 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs | |||
@@ -967,6 +967,7 @@ namespace OpenSim.Framework.Capabilities | |||
967 | InventoryItemBase item = new InventoryItemBase(); | 967 | InventoryItemBase item = new InventoryItemBase(); |
968 | item.Owner = m_agentID; | 968 | item.Owner = m_agentID; |
969 | item.CreatorId = m_agentID.ToString(); | 969 | item.CreatorId = m_agentID.ToString(); |
970 | item.CreatorData = String.Empty; | ||
970 | item.ID = inventoryItem; | 971 | item.ID = inventoryItem; |
971 | item.AssetID = asset.FullID; | 972 | item.AssetID = asset.FullID; |
972 | item.Description = assetDescription; | 973 | item.Description = assetDescription; |
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs index a8a53f2..940e567 100644 --- a/OpenSim/Framework/TaskInventoryDictionary.cs +++ b/OpenSim/Framework/TaskInventoryDictionary.cs | |||
@@ -151,6 +151,7 @@ namespace OpenSim.Framework | |||
151 | while (!m_itemLock.TryEnterWriteLock(60000)) | 151 | while (!m_itemLock.TryEnterWriteLock(60000)) |
152 | { | 152 | { |
153 | m_log.Error("Thread lock detected while trying to aquire WRITE lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed."); | 153 | m_log.Error("Thread lock detected while trying to aquire WRITE lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed."); |
154 | System.Console.WriteLine("My call stack:\n" + Environment.StackTrace); | ||
154 | if (m_itemLock.IsWriteLockHeld) | 155 | if (m_itemLock.IsWriteLockHeld) |
155 | { | 156 | { |
156 | m_itemLock = new System.Threading.ReaderWriterLockSlim(); | 157 | m_itemLock = new System.Threading.ReaderWriterLockSlim(); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 2e3db48..22da665 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -436,9 +436,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
436 | item = new InventoryItemBase(); | 436 | item = new InventoryItemBase(); |
437 | // Can't know creator is the same, so null it in inventory | 437 | // Can't know creator is the same, so null it in inventory |
438 | if (objlist.Count > 1) | 438 | if (objlist.Count > 1) |
439 | { | ||
439 | item.CreatorId = UUID.Zero.ToString(); | 440 | item.CreatorId = UUID.Zero.ToString(); |
441 | item.CreatorData = String.Empty; | ||
442 | } | ||
440 | else | 443 | else |
444 | { | ||
441 | item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); | 445 | item.CreatorId = objlist[0].RootPart.CreatorID.ToString(); |
446 | item.CreatorData = objlist[0].RootPart.CreatorData; | ||
447 | } | ||
442 | item.ID = UUID.Random(); | 448 | item.ID = UUID.Random(); |
443 | item.InvType = (int)InventoryType.Object; | 449 | item.InvType = (int)InventoryType.Object; |
444 | item.Folder = folder.ID; | 450 | item.Folder = folder.ID; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1ba28dc..7e9224d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10177,6 +10177,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10177 | if (str2 == String.Empty) | 10177 | if (str2 == String.Empty) |
10178 | return str1; | 10178 | return str1; |
10179 | 10179 | ||
10180 | int len = str2.Length; | ||
10181 | if ((len % 4) != 0) // LL is EVIL!!!! | ||
10182 | { | ||
10183 | while (str2.EndsWith("=")) | ||
10184 | str2 = str2.Substring(0, str2.Length - 1); | ||
10185 | |||
10186 | len = str2.Length; | ||
10187 | int mod = len % 4; | ||
10188 | |||
10189 | if (mod == 1) | ||
10190 | str2 = str2.Substring(0, str2.Length - 1); | ||
10191 | else if (mod == 2) | ||
10192 | str2 += "=="; | ||
10193 | else if (mod == 3) | ||
10194 | str2 += "="; | ||
10195 | } | ||
10196 | |||
10180 | byte[] data1; | 10197 | byte[] data1; |
10181 | byte[] data2; | 10198 | byte[] data2; |
10182 | try | 10199 | try |
@@ -10200,7 +10217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10200 | { | 10217 | { |
10201 | while (pos < data1.Length) | 10218 | while (pos < data1.Length) |
10202 | { | 10219 | { |
10203 | int len = data1.Length - pos; | 10220 | len = data1.Length - pos; |
10204 | if (len > data2.Length) | 10221 | if (len > data2.Length) |
10205 | len = data2.Length; | 10222 | len = data2.Length; |
10206 | 10223 | ||
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index 88fbda3..b3bfcc2 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | |||
@@ -302,6 +302,8 @@ namespace OpenSim.Services.Connectors | |||
302 | 302 | ||
303 | public bool AddItem(InventoryItemBase item) | 303 | public bool AddItem(InventoryItemBase item) |
304 | { | 304 | { |
305 | if (item.CreatorData == null) | ||
306 | item.CreatorData = String.Empty; | ||
305 | Dictionary<string,object> ret = MakeRequest("ADDITEM", | 307 | Dictionary<string,object> ret = MakeRequest("ADDITEM", |
306 | new Dictionary<string,object> { | 308 | new Dictionary<string,object> { |
307 | { "AssetID", item.AssetID.ToString() }, | 309 | { "AssetID", item.AssetID.ToString() }, |
@@ -335,6 +337,8 @@ namespace OpenSim.Services.Connectors | |||
335 | 337 | ||
336 | public bool UpdateItem(InventoryItemBase item) | 338 | public bool UpdateItem(InventoryItemBase item) |
337 | { | 339 | { |
340 | if (item.CreatorData == null) | ||
341 | item.CreatorData = String.Empty; | ||
338 | Dictionary<string,object> ret = MakeRequest("UPDATEITEM", | 342 | Dictionary<string,object> ret = MakeRequest("UPDATEITEM", |
339 | new Dictionary<string,object> { | 343 | new Dictionary<string,object> { |
340 | { "AssetID", item.AssetID.ToString() }, | 344 | { "AssetID", item.AssetID.ToString() }, |
@@ -558,7 +562,10 @@ namespace OpenSim.Services.Connectors | |||
558 | item.InvType = int.Parse(data["InvType"].ToString()); | 562 | item.InvType = int.Parse(data["InvType"].ToString()); |
559 | item.Folder = new UUID(data["Folder"].ToString()); | 563 | item.Folder = new UUID(data["Folder"].ToString()); |
560 | item.CreatorId = data["CreatorId"].ToString(); | 564 | item.CreatorId = data["CreatorId"].ToString(); |
561 | item.CreatorData = data["CreatorData"].ToString(); | 565 | if (data.ContainsKey("CreatorData")) |
566 | item.CreatorData = data["CreatorData"].ToString(); | ||
567 | else | ||
568 | item.CreatorData = String.Empty; | ||
562 | item.Description = data["Description"].ToString(); | 569 | item.Description = data["Description"].ToString(); |
563 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); | 570 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); |
564 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); | 571 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); |