aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs40
-rw-r--r--OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs25
-rw-r--r--OpenSim/Framework/Communications/Osp/OspResolver.cs19
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs32
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs18
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs23
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs9
8 files changed, 86 insertions, 86 deletions
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
index 3ad137e..1059338 100644
--- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
@@ -166,26 +166,10 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
166 /// <param name="libraryRootFolder"></param> 166 /// <param name="libraryRootFolder"></param>
167 protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) 167 protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder)
168 { 168 {
169 LocalInventoryService inventoryService = new LocalInventoryService();
170 List<IInventoryDataPlugin> plugins
171 = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
172 m_openSim.ConfigurationSettings.StandaloneInventoryPlugin,
173 m_openSim.ConfigurationSettings.StandaloneInventorySource);
174
175 foreach (IInventoryDataPlugin plugin in plugins)
176 {
177 // Using the OSP wrapper plugin for database plugins should be made configurable at some point
178 inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin));
179 }
180
181 LocalBackEndServices backendService = new LocalBackEndServices();
182
183 //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService);
184
185 m_commsManager 169 m_commsManager
186 = new CommunicationsLocal( 170 = new CommunicationsLocal(
187 m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, 171 m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache,
188 inventoryService, backendService, libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); 172 libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile);
189 173
190 CreateGridInfoService(); 174 CreateGridInfoService();
191 } 175 }
@@ -202,22 +186,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
202 } 186 }
203 187
204 protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) 188 protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder)
205 { 189 {
206 // Standalone mode
207
208 HGInventoryServiceClient inventoryService
209 = new HGInventoryServiceClient(m_openSim.NetServersInfo.InventoryURL, null, false);
210 List<IInventoryDataPlugin> plugins
211 = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
212 m_openSim.ConfigurationSettings.StandaloneInventoryPlugin,
213 m_openSim.ConfigurationSettings.StandaloneInventorySource);
214
215 foreach (IInventoryDataPlugin plugin in plugins)
216 {
217 // Using the OSP wrapper plugin should be made configurable at some point
218 inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin));
219 }
220
221 HGGridServicesStandalone gridService 190 HGGridServicesStandalone gridService
222 = new HGGridServicesStandalone( 191 = new HGGridServicesStandalone(
223 m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager); 192 m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager);
@@ -225,10 +194,9 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
225 m_commsManager 194 m_commsManager
226 = new HGCommunicationsStandalone( 195 = new HGCommunicationsStandalone(
227 m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, 196 m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache,
228 inventoryService, gridService, 197 gridService,
229 libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); 198 libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile);
230 199
231 inventoryService.UserProfileCache = m_commsManager.UserProfileCacheService;
232 HGServices = gridService; 200 HGServices = gridService;
233 201
234 CreateGridInfoService(); 202 CreateGridInfoService();
diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
index 3a692ae..95ef484 100644
--- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
+++ b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
@@ -37,10 +37,12 @@ namespace OpenSim.Framework.Communications.Osp
37 public class OspInventoryWrapperPlugin : IInventoryDataPlugin 37 public class OspInventoryWrapperPlugin : IInventoryDataPlugin
38 { 38 {
39 protected IInventoryDataPlugin m_wrappedPlugin; 39 protected IInventoryDataPlugin m_wrappedPlugin;
40 protected CommunicationsManager m_commsManager;
40 41
41 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin) 42 public OspInventoryWrapperPlugin(IInventoryDataPlugin wrappedPlugin, CommunicationsManager commsManager)
42 { 43 {
43 m_wrappedPlugin = wrappedPlugin; 44 m_wrappedPlugin = wrappedPlugin;
45 m_commsManager = commsManager;
44 } 46 }
45 47
46 public string Name { get { return "OspInventoryWrapperPlugin"; } } 48 public string Name { get { return "OspInventoryWrapperPlugin"; } }
@@ -51,24 +53,23 @@ namespace OpenSim.Framework.Communications.Osp
51 53
52 public InventoryItemBase getInventoryItem(UUID item) 54 public InventoryItemBase getInventoryItem(UUID item)
53 { 55 {
54 return m_wrappedPlugin.getInventoryItem(item); 56 return PostProcessItem(m_wrappedPlugin.getInventoryItem(item));
55
56 // TODO: Need to post process here
57 } 57 }
58 58
59 // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem? 59 // XXX: Why on earth does this exist as it appears to duplicate getInventoryItem?
60 public InventoryItemBase queryInventoryItem(UUID item) 60 public InventoryItemBase queryInventoryItem(UUID item)
61 { 61 {
62 return m_wrappedPlugin.queryInventoryItem(item); 62 return PostProcessItem(m_wrappedPlugin.queryInventoryItem(item));
63
64 // TODO: Need to post process here
65 } 63 }
66 64
67 public List<InventoryItemBase> getInventoryInFolder(UUID folderID) 65 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
68 { 66 {
69 return m_wrappedPlugin.getInventoryInFolder(folderID); 67 List<InventoryItemBase> items = m_wrappedPlugin.getInventoryInFolder(folderID);
70 68
71 // TODO: Need to post process here 69 foreach (InventoryItemBase item in items)
70 PostProcessItem(item);
71
72 return items;
72 } 73 }
73 74
74 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) 75 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID)
@@ -77,6 +78,12 @@ namespace OpenSim.Framework.Communications.Osp
77 78
78 // Presuming that no post processing is needed here as gestures don't refer to creator information (?) 79 // Presuming that no post processing is needed here as gestures don't refer to creator information (?)
79 } 80 }
81
82 protected InventoryItemBase PostProcessItem(InventoryItemBase item)
83 {
84 item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
85 return item;
86 }
80 87
81 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); } 88 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }
82 public List<InventoryFolderBase> getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); } 89 public List<InventoryFolderBase> getUserRootFolders(UUID user) { return m_wrappedPlugin.getUserRootFolders(user); }
diff --git a/OpenSim/Framework/Communications/Osp/OspResolver.cs b/OpenSim/Framework/Communications/Osp/OspResolver.cs
index a62e1c0..579b3df 100644
--- a/OpenSim/Framework/Communications/Osp/OspResolver.cs
+++ b/OpenSim/Framework/Communications/Osp/OspResolver.cs
@@ -85,16 +85,15 @@ namespace OpenSim.Framework.Communications.Osp
85 /// <param name="ospa"></param> 85 /// <param name="ospa"></param>
86 /// <param name="commsManager"></param> 86 /// <param name="commsManager"></param>
87 /// <returns> 87 /// <returns>
88 /// A suitable internal OpenSim identifier. If the input string wasn't ospi data, then we simply 88 /// A suitable UUID for use in Second Life client communication. If the string was not a valid ospa, then UUID.Zero
89 /// return that same string. If the input string was ospi data but no valid profile information has been found, 89 /// is returned.
90 /// then returns null.
91 /// </returns> 90 /// </returns>
92 public static string ResolveOspa(string ospa, CommunicationsManager commsManager) 91 public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager)
93 { 92 {
94 m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); 93 m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa);
95 94
96 if (!ospa.StartsWith(OSPA_PREFIX)) 95 if (!ospa.StartsWith(OSPA_PREFIX))
97 return ospa; 96 return UUID.Zero;
98 97
99 string ospaMeat = ospa.Substring(OSPA_PREFIX.Length); 98 string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
100 string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY); 99 string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY);
@@ -116,7 +115,7 @@ namespace OpenSim.Framework.Communications.Osp
116 return ResolveOspaName(value, commsManager); 115 return ResolveOspaName(value, commsManager);
117 } 116 }
118 117
119 return null; 118 return UUID.Zero;
120 } 119 }
121 120
122 /// <summary> 121 /// <summary>
@@ -138,14 +137,14 @@ namespace OpenSim.Framework.Communications.Osp
138 /// <returns> 137 /// <returns>
139 /// An OpenSim internal identifier for the name given. Returns null if the name was not valid 138 /// An OpenSim internal identifier for the name given. Returns null if the name was not valid
140 /// </returns> 139 /// </returns>
141 protected static string ResolveOspaName(string name, CommunicationsManager commsManager) 140 protected static UUID ResolveOspaName(string name, CommunicationsManager commsManager)
142 { 141 {
143 int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR); 142 int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR);
144 143
145 if (nameSeparatorIndex < 0) 144 if (nameSeparatorIndex < 0)
146 { 145 {
147 m_log.WarnFormat("[OSP RESOLVER]: Ignoring unseparated name {0}", name); 146 m_log.WarnFormat("[OSP RESOLVER]: Ignoring unseparated name {0}", name);
148 return null; 147 return UUID.Zero;
149 } 148 }
150 149
151 string firstName = name.Remove(nameSeparatorIndex).TrimEnd(); 150 string firstName = name.Remove(nameSeparatorIndex).TrimEnd();
@@ -153,7 +152,7 @@ namespace OpenSim.Framework.Communications.Osp
153 152
154 CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName); 153 CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName);
155 if (userInfo != null) 154 if (userInfo != null)
156 return userInfo.UserProfile.ID.ToString(); 155 return userInfo.UserProfile.ID;
157 156
158 UserProfileData tempUserProfile = new UserProfileData(); 157 UserProfileData tempUserProfile = new UserProfileData();
159 tempUserProfile.FirstName = firstName; 158 tempUserProfile.FirstName = firstName;
@@ -164,7 +163,7 @@ namespace OpenSim.Framework.Communications.Osp
164 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID); 163 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
165 commsManager.UserService.AddTemporaryUserProfile(tempUserProfile); 164 commsManager.UserService.AddTemporaryUserProfile(tempUserProfile);
166 165
167 return tempUserProfile.ID.ToString(); 166 return tempUserProfile.ID;
168 } 167 }
169 } 168 }
170} 169}
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 61771ab..f874de1 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -48,38 +48,30 @@ namespace OpenSim.Framework
48 /// <value> 48 /// <value>
49 /// The creator of this item 49 /// The creator of this item
50 /// </value> 50 /// </value>
51 public string CreatorId 51 public string CreatorId { get; set; }
52 {
53 get { return m_creatorId; }
54 set
55 {
56 m_creatorId = value;
57 UUID creatorIdAsUuid;
58
59 // For now, all IDs are UUIDs
60 UUID.TryParse(m_creatorId, out creatorIdAsUuid);
61 CreatorIdAsUuid = creatorIdAsUuid;
62 }
63 }
64
65 private string m_creatorId = String.Empty;
66 52
67 /// <value> 53 /// <value>
68 /// The creator of this item expressed as a UUID 54 /// The creator of this item expressed as a UUID. Database plugins don't need to set this, it will be set by
55 /// upstream code (or set by the get accessor if left unset).
69 /// </value> 56 /// </value>
70 public UUID CreatorIdAsUuid 57 public UUID CreatorIdAsUuid
71 { 58 {
72 get 59 get
73 { 60 {
61 if (UUID.Zero == m_creatorIdAsUuid)
62 {
63 UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
64 }
65
74 return m_creatorIdAsUuid; 66 return m_creatorIdAsUuid;
75 } 67 }
68
76 set 69 set
77 { 70 {
78 m_creatorIdAsUuid = value; 71 m_creatorIdAsUuid = value;
79 } 72 }
80 } 73 }
81 74 protected UUID m_creatorIdAsUuid = UUID.Zero;
82 private UUID m_creatorIdAsUuid = UUID.Zero;
83 75
84 /// <value> 76 /// <value>
85 /// The description of the inventory item (must be less than 64 characters) 77 /// The description of the inventory item (must be less than 64 characters)
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
index f5789b7..5c2fe33 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
@@ -25,9 +25,12 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
29using OpenSim.Data;
28using OpenSim.Framework; 30using OpenSim.Framework;
29using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
30using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Framework.Communications.Osp;
31using OpenSim.Framework.Servers; 34using OpenSim.Framework.Servers;
32using OpenSim.Framework.Servers.HttpServer; 35using OpenSim.Framework.Servers.HttpServer;
33using OpenSim.Region.Communications.Local; 36using OpenSim.Region.Communications.Local;
@@ -42,7 +45,6 @@ namespace OpenSim.Region.Communications.Hypergrid
42 NetworkServersInfo serversInfo, 45 NetworkServersInfo serversInfo,
43 BaseHttpServer httpServer, 46 BaseHttpServer httpServer,
44 IAssetCache assetCache, 47 IAssetCache assetCache,
45 LocalInventoryService inventoryService,
46 HGGridServices gridService, 48 HGGridServices gridService,
47 LibraryRootFolder libraryRootFolder, 49 LibraryRootFolder libraryRootFolder,
48 bool dumpAssetsToFile) 50 bool dumpAssetsToFile)
@@ -52,10 +54,24 @@ namespace OpenSim.Region.Communications.Hypergrid
52 new LocalUserServices( 54 new LocalUserServices(
53 serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); 55 serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this);
54 localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); 56 localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource);
57
58 HGInventoryServiceClient inventoryService
59 = new HGInventoryServiceClient(serversInfo.InventoryURL, null, false);
60 List<IInventoryDataPlugin> plugins
61 = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
62 configSettings.StandaloneInventoryPlugin,
63 configSettings.StandaloneInventorySource);
64
65 foreach (IInventoryDataPlugin plugin in plugins)
66 {
67 // Using the OSP wrapper plugin should be made configurable at some point
68 inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this));
69 }
55 70
56 AddInventoryService(inventoryService); 71 AddInventoryService(inventoryService);
57 m_defaultInventoryHost = inventoryService.Host; 72 m_defaultInventoryHost = inventoryService.Host;
58 m_interServiceInventoryService = inventoryService; 73 m_interServiceInventoryService = inventoryService;
74 inventoryService.UserProfileCache = UserProfileCacheService;
59 75
60 m_assetCache = assetCache; 76 m_assetCache = assetCache;
61 // Let's swap to always be secure access to inventory 77 // Let's swap to always be secure access to inventory
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index acb7496..60feee1 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -25,9 +25,12 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System.Collections.Generic;
29using OpenSim.Data;
28using OpenSim.Framework; 30using OpenSim.Framework;
29using OpenSim.Framework.Communications; 31using OpenSim.Framework.Communications;
30using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Framework.Communications.Osp;
31using OpenSim.Framework.Servers.HttpServer; 34using OpenSim.Framework.Servers.HttpServer;
32 35
33namespace OpenSim.Region.Communications.Local 36namespace OpenSim.Region.Communications.Local
@@ -39,12 +42,22 @@ namespace OpenSim.Region.Communications.Local
39 NetworkServersInfo serversInfo, 42 NetworkServersInfo serversInfo,
40 BaseHttpServer httpServer, 43 BaseHttpServer httpServer,
41 IAssetCache assetCache, 44 IAssetCache assetCache,
42 LocalInventoryService inventoryService,
43 IGridServices gridService,
44 LibraryRootFolder libraryRootFolder, 45 LibraryRootFolder libraryRootFolder,
45 bool dumpAssetsToFile) 46 bool dumpAssetsToFile)
46 : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) 47 : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
47 { 48 {
49 LocalInventoryService inventoryService = new LocalInventoryService();
50 List<IInventoryDataPlugin> plugins
51 = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>(
52 configSettings.StandaloneInventoryPlugin,
53 configSettings.StandaloneInventorySource);
54
55 foreach (IInventoryDataPlugin plugin in plugins)
56 {
57 // Using the OSP wrapper plugin for database plugins should be made configurable at some point
58 inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this));
59 }
60
48 AddInventoryService(inventoryService); 61 AddInventoryService(inventoryService);
49 m_defaultInventoryHost = inventoryService.Host; 62 m_defaultInventoryHost = inventoryService.Host;
50 m_interServiceInventoryService = inventoryService; 63 m_interServiceInventoryService = inventoryService;
@@ -58,8 +71,10 @@ namespace OpenSim.Region.Communications.Local
58 m_userAdminService = lus; 71 m_userAdminService = lus;
59 m_avatarService = lus; 72 m_avatarService = lus;
60 m_messageService = lus; 73 m_messageService = lus;
61 74
62 m_gridService = gridService; 75 m_gridService = new LocalBackEndServices();
76
77 //LocalLoginService loginService = CreateLoginService(libraryRootFolder, inventoryService, userService, backendService);
63 } 78 }
64 } 79 }
65} 80}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index bf3097a..b0c1d0b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -157,9 +157,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
157 // Don't use the item ID that's in the file 157 // Don't use the item ID that's in the file
158 item.ID = UUID.Random(); 158 item.ID = UUID.Random();
159 159
160 string ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); 160 UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
161 if (null != ospResolvedId) 161 if (UUID.Zero != ospResolvedId)
162 item.CreatorId = ospResolvedId; 162 item.CreatorIdAsUuid = ospResolvedId;
163 163
164 item.Owner = m_userInfo.UserProfile.ID; 164 item.Owner = m_userInfo.UserProfile.ID;
165 165
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index 274e329..4c6045a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -253,7 +253,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
253 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); 253 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
254 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); 254 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
255 255
256 Assert.That(foundItem.CreatorId, Is.EqualTo(user2Uuid.ToString())); 256 Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
257 Assert.That(foundItem.CreatorIdAsUuid, Is.EqualTo(user2Uuid));
257 Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); 258 Assert.That(foundItem.Owner, Is.EqualTo(userUuid));
258 259
259 Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod()); 260 Console.WriteLine("Successfully completed {0}", MethodBase.GetCurrentMethod());
@@ -321,8 +322,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
321 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName); 322 = scene.CommsManager.UserProfileCacheService.GetUserDetails(userFirstName, userLastName);
322 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName); 323 InventoryItemBase foundItem = userInfo.RootFolder.FindItemByPath(itemName);
323 324
324 Assert.That(foundItem.CreatorId, Is.EqualTo(user2Profile.ID.ToString())); 325 Assert.That(foundItem.CreatorId, Is.EqualTo(item1.CreatorId));
325 Assert.That(foundItem.Owner, Is.EqualTo(userUuid)); 326 Assert.That(
327 foundItem.CreatorIdAsUuid, Is.EqualTo(OspResolver.HashName(user2FirstName + " " + user2LastName)));
328 Assert.That(foundItem.Owner, Is.EqualTo(userUuid));
326 329
327 Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod()); 330 Console.WriteLine("### Successfully completed {0} ###", MethodBase.GetCurrentMethod());
328 } 331 }