diff options
author | Melanie | 2012-08-25 18:08:10 +0100 |
---|---|---|
committer | Melanie | 2012-08-25 18:08:10 +0100 |
commit | 007a45aa76af0029a43b634a0a44a48f15ea5654 (patch) | |
tree | 5a5202f11b7b54953ea462d70a25dec77502f5eb | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Following on from f8a89a79, do not allow more than one 'type' folder (e.g. ca... (diff) | |
download | opensim-SC-007a45aa76af0029a43b634a0a44a48f15ea5654.zip opensim-SC-007a45aa76af0029a43b634a0a44a48f15ea5654.tar.gz opensim-SC-007a45aa76af0029a43b634a0a44a48f15ea5654.tar.bz2 opensim-SC-007a45aa76af0029a43b634a0a44a48f15ea5654.tar.xz |
Merge commit 'a0d178b284050df64d0eb5b9728565fd72615c22' into careminster
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 6 | ||||
-rw-r--r-- | OpenSim/Services/InventoryService/XInventoryService.cs | 64 |
9 files changed, 66 insertions, 37 deletions
@@ -29,6 +29,7 @@ addon-modules/ | |||
29 | bin/Debug/*.dll | 29 | bin/Debug/*.dll |
30 | bin/*.dll.mdb | 30 | bin/*.dll.mdb |
31 | bin/*.db | 31 | bin/*.db |
32 | bin/*.db-journal | ||
32 | bin/addin-db-* | 33 | bin/addin-db-* |
33 | bin/*.dll | 34 | bin/*.dll |
34 | bin/OpenSim.vshost.exe.config | 35 | bin/OpenSim.vshost.exe.config |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 574c9af..863aa49 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
93 | /// </summary> | 93 | /// </summary> |
94 | public void StartScripts() | 94 | public void StartScripts() |
95 | { | 95 | { |
96 | m_log.InfoFormat("[SCENE]: Starting scripts in {0}, please wait.", RegionInfo.RegionName); | 96 | // m_log.InfoFormat("[SCENE]: Starting scripts in {0}, please wait.", RegionInfo.RegionName); |
97 | 97 | ||
98 | IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>(); | 98 | IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>(); |
99 | 99 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 431b903..7e781c3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -493,7 +493,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
493 | if (!InventoryService.AddFolder(folder)) | 493 | if (!InventoryService.AddFolder(folder)) |
494 | { | 494 | { |
495 | m_log.WarnFormat( | 495 | m_log.WarnFormat( |
496 | "[AGENT INVENTORY]: Failed to move create folder for user {0} {1}", | 496 | "[AGENT INVENTORY]: Failed to create folder for user {0} {1}", |
497 | remoteClient.Name, remoteClient.AgentId); | 497 | remoteClient.Name, remoteClient.AgentId); |
498 | } | 498 | } |
499 | } | 499 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2499460..fcc2953 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3737,7 +3737,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3737 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3737 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", |
3738 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3738 | sp.Name, sp.UUID, RegionInfo.RegionName); |
3739 | 3739 | ||
3740 | sp.ControllingClient.Close(); | 3740 | sp.ControllingClient.Close(true); |
3741 | sp = null; | 3741 | sp = null; |
3742 | } | 3742 | } |
3743 | 3743 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index fa66858..c4b7b27 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -342,7 +342,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
342 | public bool AddNewSceneObject( | 342 | public bool AddNewSceneObject( |
343 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel) | 343 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3? pos, Quaternion? rot, Vector3 vel) |
344 | { | 344 | { |
345 | AddNewSceneObject(sceneObject, true, false); | 345 | AddNewSceneObject(sceneObject, attachToBackup, false); |
346 | 346 | ||
347 | if (pos != null) | 347 | if (pos != null) |
348 | sceneObject.AbsolutePosition = (Vector3)pos; | 348 | sceneObject.AbsolutePosition = (Vector3)pos; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cfd4a51..3e8c7e5 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -974,7 +974,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
974 | { | 974 | { |
975 | if (wasChild && HasAttachments()) | 975 | if (wasChild && HasAttachments()) |
976 | { | 976 | { |
977 | m_log.DebugFormat("[SCENE PRESENCE]: Restarting scripts in attachments..."); | 977 | m_log.DebugFormat( |
978 | "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); | ||
979 | |||
978 | // Resume scripts | 980 | // Resume scripts |
979 | Util.FireAndForget(delegate(object x) { | 981 | Util.FireAndForget(delegate(object x) { |
980 | foreach (SceneObjectGroup sog in m_attachments) | 982 | foreach (SceneObjectGroup sog in m_attachments) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0c7f49b..5386a28 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5571,25 +5571,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5571 | /// separated list. There is a space after | 5571 | /// separated list. There is a space after |
5572 | /// each comma. | 5572 | /// each comma. |
5573 | /// </summary> | 5573 | /// </summary> |
5574 | |||
5575 | public LSL_String llList2CSV(LSL_List src) | 5574 | public LSL_String llList2CSV(LSL_List src) |
5576 | { | 5575 | { |
5577 | |||
5578 | string ret = String.Empty; | ||
5579 | int x = 0; | ||
5580 | |||
5581 | m_host.AddScriptLPS(1); | 5576 | m_host.AddScriptLPS(1); |
5582 | 5577 | ||
5583 | if (src.Data.Length > 0) | 5578 | return string.Join(", ", |
5584 | { | 5579 | (new List<object>(src.Data)).ConvertAll<string>(o => |
5585 | ret = src.Data[x++].ToString(); | 5580 | { |
5586 | for (; x < src.Data.Length; x++) | 5581 | return o.ToString(); |
5587 | { | 5582 | }).ToArray()); |
5588 | ret += ", "+src.Data[x].ToString(); | ||
5589 | } | ||
5590 | } | ||
5591 | |||
5592 | return ret; | ||
5593 | } | 5583 | } |
5594 | 5584 | ||
5595 | /// <summary> | 5585 | /// <summary> |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 2d17977..9f05666 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -994,6 +994,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
994 | // This delay exists to stop mono problems where script compilation and startup would stop the sim | 994 | // This delay exists to stop mono problems where script compilation and startup would stop the sim |
995 | // working properly for the session. | 995 | // working properly for the session. |
996 | System.Threading.Thread.Sleep(m_StartDelay); | 996 | System.Threading.Thread.Sleep(m_StartDelay); |
997 | |||
998 | m_log.InfoFormat("[XEngine]: Performing initial script startup on {0}", m_Scene.Name); | ||
997 | } | 999 | } |
998 | 1000 | ||
999 | object[] o; | 1001 | object[] o; |
@@ -1009,13 +1011,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1009 | if (m_InitialStartup) | 1011 | if (m_InitialStartup) |
1010 | if (scriptsStarted % 50 == 0) | 1012 | if (scriptsStarted % 50 == 0) |
1011 | m_log.InfoFormat( | 1013 | m_log.InfoFormat( |
1012 | "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); | 1014 | "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.Name); |
1013 | } | 1015 | } |
1014 | } | 1016 | } |
1015 | 1017 | ||
1016 | if (m_InitialStartup) | 1018 | if (m_InitialStartup) |
1017 | m_log.InfoFormat( | 1019 | m_log.InfoFormat( |
1018 | "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.RegionInfo.RegionName); | 1020 | "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.Name); |
1019 | 1021 | ||
1020 | // NOTE: Despite having a lockless queue, this lock is required | 1022 | // NOTE: Despite having a lockless queue, this lock is required |
1021 | // to make sure there is never no compile thread while there | 1023 | // to make sure there is never no compile thread while there |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 7518b86..deacd5a 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -229,10 +229,28 @@ namespace OpenSim.Services.InventoryService | |||
229 | public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) | 229 | public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) |
230 | { | 230 | { |
231 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); | 231 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); |
232 | |||
233 | InventoryFolderBase rootFolder = GetRootFolder(principalID); | ||
234 | |||
235 | if (rootFolder == null) | ||
236 | { | ||
237 | m_log.WarnFormat( | ||
238 | "[XINVENTORY]: Found no root folder for {0} in GetFolderForType() when looking for {1}", | ||
239 | principalID, type); | ||
240 | |||
241 | return null; | ||
242 | } | ||
243 | |||
244 | return GetSystemFolderForType(rootFolder, type); | ||
245 | } | ||
246 | |||
247 | private InventoryFolderBase GetSystemFolderForType(InventoryFolderBase rootFolder, AssetType type) | ||
248 | { | ||
249 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); | ||
232 | 250 | ||
233 | XInventoryFolder[] folders = m_Database.GetFolders( | 251 | XInventoryFolder[] folders = m_Database.GetFolders( |
234 | new string[] { "agentID", "type"}, | 252 | new string[] { "agentID", "parentFolderID", "type"}, |
235 | new string[] { principalID.ToString(), ((int)type).ToString() }); | 253 | new string[] { rootFolder.Owner.ToString(), rootFolder.ID.ToString(), ((int)type).ToString() }); |
236 | 254 | ||
237 | if (folders.Length == 0) | 255 | if (folders.Length == 0) |
238 | { | 256 | { |
@@ -308,22 +326,38 @@ namespace OpenSim.Services.InventoryService | |||
308 | if (check != null) | 326 | if (check != null) |
309 | return false; | 327 | return false; |
310 | 328 | ||
311 | if (folder.Type == (short)AssetType.Folder | 329 | if (folder.Type != (short)AssetType.Folder || folder.Type != (short)AssetType.Unknown) |
312 | || folder.Type == (short)AssetType.Unknown | ||
313 | || folder.Type == (short)AssetType.OutfitFolder | ||
314 | || GetFolderForType(folder.Owner, (AssetType)(folder.Type)) == null) | ||
315 | { | ||
316 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); | ||
317 | return m_Database.StoreFolder(xFolder); | ||
318 | } | ||
319 | else | ||
320 | { | 330 | { |
321 | m_log.WarnFormat( | 331 | InventoryFolderBase rootFolder = GetRootFolder(folder.Owner); |
322 | "[XINVENTORY]: Folder of type {0} already exists when tried to add {1} to {2} for {3}", | 332 | |
323 | folder.Type, folder.Name, folder.ParentID, folder.Owner); | 333 | if (rootFolder == null) |
334 | { | ||
335 | m_log.WarnFormat( | ||
336 | "[XINVENTORY]: Found no root folder for {0} in AddFolder() when looking for {1}", | ||
337 | folder.Owner, folder.Type); | ||
338 | |||
339 | return false; | ||
340 | } | ||
341 | |||
342 | // Check we're not trying to add this as a system folder. | ||
343 | if (folder.ParentID == rootFolder.ID) | ||
344 | { | ||
345 | InventoryFolderBase existingSystemFolder | ||
346 | = GetSystemFolderForType(rootFolder, (AssetType)folder.Type); | ||
347 | |||
348 | if (existingSystemFolder != null) | ||
349 | { | ||
350 | m_log.WarnFormat( | ||
351 | "[XINVENTORY]: System folder of type {0} already exists when tried to add {1} to {2} for {3}", | ||
352 | folder.Type, folder.Name, folder.ParentID, folder.Owner); | ||
353 | |||
354 | return false; | ||
355 | } | ||
356 | } | ||
324 | } | 357 | } |
325 | 358 | ||
326 | return false; | 359 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); |
360 | return m_Database.StoreFolder(xFolder); | ||
327 | } | 361 | } |
328 | 362 | ||
329 | public virtual bool UpdateFolder(InventoryFolderBase folder) | 363 | public virtual bool UpdateFolder(InventoryFolderBase folder) |