diff options
author | Teravus Ovares (Dan Olivares) | 2009-08-18 11:09:43 -0400 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-08-18 11:09:43 -0400 |
commit | 311b51a1843f43daa7796a46961b65fe702e1b85 (patch) | |
tree | 756554b330c8bdd970f319c3af0327efb9017673 /OpenSim/Framework/Communications | |
parent | * Some Physics Scene Changes to prepare for larger regions (diff) | |
parent | Fixes mantis #4020 (http://opensimulator.org/mantis/view.php?id=4020) (diff) | |
download | opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.zip opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.tar.gz opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.tar.bz2 opensim-SC_OLD-311b51a1843f43daa7796a46961b65fe702e1b85.tar.xz |
*remove conflicts
Diffstat (limited to 'OpenSim/Framework/Communications')
4 files changed, 33 insertions, 14 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 8ee1b1a..ca641d0 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -747,7 +747,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
747 | 747 | ||
748 | InventoryItemBase itemInfo = null; | 748 | InventoryItemBase itemInfo = null; |
749 | 749 | ||
750 | itemInfo = m_InventoryService.QueryItem(item); | 750 | itemInfo = m_InventoryService.GetItem(item); |
751 | 751 | ||
752 | if (itemInfo != null) | 752 | if (itemInfo != null) |
753 | { | 753 | { |
@@ -784,7 +784,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
784 | 784 | ||
785 | InventoryFolderBase folderInfo = null; | 785 | InventoryFolderBase folderInfo = null; |
786 | 786 | ||
787 | folderInfo = m_InventoryService.QueryFolder(folder); | 787 | folderInfo = m_InventoryService.GetFolder(folder); |
788 | 788 | ||
789 | if (folderInfo != null) | 789 | if (folderInfo != null) |
790 | { | 790 | { |
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index 9709975..cac6616 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs | |||
@@ -205,7 +205,8 @@ namespace OpenSim.Framework.Communications.Services | |||
205 | // Otherwise... | 205 | // Otherwise... |
206 | // Create a new agent session | 206 | // Create a new agent session |
207 | 207 | ||
208 | m_userManager.ResetAttachments(userProfile.ID); | 208 | // XXYY we don't need this |
209 | //m_userManager.ResetAttachments(userProfile.ID); | ||
209 | 210 | ||
210 | CreateAgent(userProfile, request); | 211 | CreateAgent(userProfile, request); |
211 | 212 | ||
@@ -462,7 +463,8 @@ namespace OpenSim.Framework.Communications.Services | |||
462 | // Otherwise... | 463 | // Otherwise... |
463 | // Create a new agent session | 464 | // Create a new agent session |
464 | 465 | ||
465 | m_userManager.ResetAttachments(userProfile.ID); | 466 | // XXYY We don't need this |
467 | //m_userManager.ResetAttachments(userProfile.ID); | ||
466 | 468 | ||
467 | CreateAgent(userProfile, request); | 469 | CreateAgent(userProfile, request); |
468 | 470 | ||
@@ -1129,7 +1131,18 @@ namespace OpenSim.Framework.Communications.Services | |||
1129 | // tools are creating the user profile directly in the database without creating the inventory. At | 1131 | // tools are creating the user profile directly in the database without creating the inventory. At |
1130 | // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already | 1132 | // this time we'll accomodate them by lazily creating the user inventory now if it doesn't already |
1131 | // exist. | 1133 | // exist. |
1132 | if ((m_interInventoryService != null) && !m_interInventoryService.CreateNewUserInventory(userID)) | 1134 | if (m_interInventoryService != null) |
1135 | { | ||
1136 | if (!m_interInventoryService.CreateNewUserInventory(userID)) | ||
1137 | { | ||
1138 | throw new Exception( | ||
1139 | String.Format( | ||
1140 | "The inventory creation request for user {0} did not succeed." | ||
1141 | + " Please contact your inventory service provider for more information.", | ||
1142 | userID)); | ||
1143 | } | ||
1144 | } | ||
1145 | else if ((m_InventoryService != null) && !m_InventoryService.CreateUserInventory(userID)) | ||
1133 | { | 1146 | { |
1134 | throw new Exception( | 1147 | throw new Exception( |
1135 | String.Format( | 1148 | String.Format( |
@@ -1138,6 +1151,7 @@ namespace OpenSim.Framework.Communications.Services | |||
1138 | userID)); | 1151 | userID)); |
1139 | } | 1152 | } |
1140 | 1153 | ||
1154 | |||
1141 | m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); | 1155 | m_log.InfoFormat("[LOGIN]: A new inventory skeleton was successfully created for user {0}", userID); |
1142 | 1156 | ||
1143 | if (m_InventoryService != null) | 1157 | if (m_InventoryService != null) |
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index fe88cf5..670c9ff 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | |||
@@ -186,14 +186,14 @@ namespace OpenSim.Framework.Communications.Tests | |||
186 | 186 | ||
187 | Assert.That( | 187 | Assert.That( |
188 | userInfo.CreateFolder("testFolder1", folderId, (ushort)AssetType.Animation, missingFolderId), Is.False); | 188 | userInfo.CreateFolder("testFolder1", folderId, (ushort)AssetType.Animation, missingFolderId), Is.False); |
189 | Assert.That(myScene.InventoryService.QueryFolder(myFolder), Is.Null); | 189 | Assert.That(myScene.InventoryService.GetFolder(myFolder), Is.Null); |
190 | Assert.That(userInfo.RootFolder.ContainsChildFolder(missingFolderId), Is.False); | 190 | Assert.That(userInfo.RootFolder.ContainsChildFolder(missingFolderId), Is.False); |
191 | Assert.That(userInfo.RootFolder.FindFolder(folderId), Is.Null); | 191 | Assert.That(userInfo.RootFolder.FindFolder(folderId), Is.Null); |
192 | 192 | ||
193 | // 2: Try a folder create that should work | 193 | // 2: Try a folder create that should work |
194 | Assert.That( | 194 | Assert.That( |
195 | userInfo.CreateFolder("testFolder2", folderId, (ushort)AssetType.Animation, userInfo.RootFolder.ID), Is.True); | 195 | userInfo.CreateFolder("testFolder2", folderId, (ushort)AssetType.Animation, userInfo.RootFolder.ID), Is.True); |
196 | Assert.That(myScene.InventoryService.QueryFolder(myFolder), Is.Not.Null); | 196 | Assert.That(myScene.InventoryService.GetFolder(myFolder), Is.Not.Null); |
197 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.True); | 197 | Assert.That(userInfo.RootFolder.ContainsChildFolder(folderId), Is.True); |
198 | } | 198 | } |
199 | 199 | ||
@@ -228,7 +228,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
228 | Assert.That(newFolderName1, Is.EqualTo(folder1.Name)); | 228 | Assert.That(newFolderName1, Is.EqualTo(folder1.Name)); |
229 | Assert.That(folderType1, Is.EqualTo((ushort)folder1.Type)); | 229 | Assert.That(folderType1, Is.EqualTo((ushort)folder1.Type)); |
230 | 230 | ||
231 | InventoryFolderBase dataFolder1 = myScene.InventoryService.QueryFolder(myFolder); | 231 | InventoryFolderBase dataFolder1 = myScene.InventoryService.GetFolder(myFolder); |
232 | Assert.That(newFolderName1, Is.EqualTo(dataFolder1.Name)); | 232 | Assert.That(newFolderName1, Is.EqualTo(dataFolder1.Name)); |
233 | Assert.That(folderType1, Is.EqualTo((ushort)dataFolder1.Type)); | 233 | Assert.That(folderType1, Is.EqualTo((ushort)dataFolder1.Type)); |
234 | } | 234 | } |
@@ -254,7 +254,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
254 | Assert.That(folder2.ContainsChildFolder(folder1Id), Is.True); | 254 | Assert.That(folder2.ContainsChildFolder(folder1Id), Is.True); |
255 | Assert.That(rootFolder.ContainsChildFolder(folder1Id), Is.False); | 255 | Assert.That(rootFolder.ContainsChildFolder(folder1Id), Is.False); |
256 | 256 | ||
257 | InventoryFolderBase dataFolder1 = myScene.InventoryService.QueryFolder(myFolder2); | 257 | InventoryFolderBase dataFolder1 = myScene.InventoryService.GetFolder(myFolder2); |
258 | Assert.That(newFolderName2, Is.EqualTo(dataFolder1.Name)); | 258 | Assert.That(newFolderName2, Is.EqualTo(dataFolder1.Name)); |
259 | Assert.That(folderType2, Is.EqualTo((ushort)dataFolder1.Type)); | 259 | Assert.That(folderType2, Is.EqualTo((ushort)dataFolder1.Type)); |
260 | Assert.That(folder2Id, Is.EqualTo(dataFolder1.ParentID)); | 260 | Assert.That(folder2Id, Is.EqualTo(dataFolder1.ParentID)); |
@@ -296,7 +296,7 @@ namespace OpenSim.Framework.Communications.Tests | |||
296 | InventoryFolderBase myFolder = new InventoryFolderBase(); | 296 | InventoryFolderBase myFolder = new InventoryFolderBase(); |
297 | myFolder.ID = folderToMoveId; | 297 | myFolder.ID = folderToMoveId; |
298 | Assert.That(folder2.ContainsChildFolder(folderToMoveId), Is.True); | 298 | Assert.That(folder2.ContainsChildFolder(folderToMoveId), Is.True); |
299 | Assert.That(myScene.InventoryService.QueryFolder(myFolder).ParentID, Is.EqualTo(folder2Id)); | 299 | Assert.That(myScene.InventoryService.GetFolder(myFolder).ParentID, Is.EqualTo(folder2Id)); |
300 | 300 | ||
301 | Assert.That(folder1.ContainsChildFolder(folderToMoveId), Is.False); | 301 | Assert.That(folder1.ContainsChildFolder(folderToMoveId), Is.False); |
302 | } | 302 | } |
@@ -322,13 +322,13 @@ namespace OpenSim.Framework.Communications.Tests | |||
322 | myFolder.ID = folder1Id; | 322 | myFolder.ID = folder1Id; |
323 | 323 | ||
324 | userInfo.CreateFolder("folder1", folder1Id, (ushort)AssetType.Animation, rootFolder.ID); | 324 | userInfo.CreateFolder("folder1", folder1Id, (ushort)AssetType.Animation, rootFolder.ID); |
325 | Assert.That(myScene.InventoryService.QueryFolder(myFolder), Is.Not.Null); | 325 | Assert.That(myScene.InventoryService.GetFolder(myFolder), Is.Not.Null); |
326 | 326 | ||
327 | // Test purge | 327 | // Test purge |
328 | userInfo.PurgeFolder(rootFolder.ID); | 328 | userInfo.PurgeFolder(rootFolder.ID); |
329 | 329 | ||
330 | Assert.That(rootFolder.RequestListOfFolders(), Is.Empty); | 330 | Assert.That(rootFolder.RequestListOfFolders(), Is.Empty); |
331 | Assert.That(myScene.InventoryService.QueryFolder(myFolder), Is.Null); | 331 | Assert.That(myScene.InventoryService.GetFolder(myFolder), Is.Null); |
332 | } | 332 | } |
333 | } | 333 | } |
334 | } \ No newline at end of file | 334 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index b1b7809..22dcef9 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -552,12 +552,12 @@ namespace OpenSim.Framework.Communications.Tests | |||
552 | return false; | 552 | return false; |
553 | } | 553 | } |
554 | 554 | ||
555 | public InventoryItemBase QueryItem(InventoryItemBase item) | 555 | public InventoryItemBase GetItem(InventoryItemBase item) |
556 | { | 556 | { |
557 | return null; | 557 | return null; |
558 | } | 558 | } |
559 | 559 | ||
560 | public InventoryFolderBase QueryFolder(InventoryFolderBase folder) | 560 | public InventoryFolderBase GetFolder(InventoryFolderBase folder) |
561 | { | 561 | { |
562 | return null; | 562 | return null; |
563 | } | 563 | } |
@@ -575,5 +575,10 @@ namespace OpenSim.Framework.Communications.Tests | |||
575 | root.ParentID = UUID.Zero; | 575 | root.ParentID = UUID.Zero; |
576 | return root; | 576 | return root; |
577 | } | 577 | } |
578 | |||
579 | public int GetAssetPermissions(UUID userID, UUID assetID) | ||
580 | { | ||
581 | return 1; | ||
582 | } | ||
578 | } | 583 | } |
579 | } | 584 | } |