diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
4 files changed, 56 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 457ee33..f5d49c5 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1065,10 +1065,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1065 | #endregion | 1065 | #endregion |
1066 | 1066 | ||
1067 | #region Enable Child Agent | 1067 | #region Enable Child Agent |
1068 | |||
1068 | /// <summary> | 1069 | /// <summary> |
1069 | /// This informs a single neighbouring region about agent "avatar". | 1070 | /// This informs a single neighbouring region about agent "avatar". |
1070 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 1071 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
1071 | /// </summary> | 1072 | /// </summary> |
1073 | /// <param name="sp"></param> | ||
1074 | /// <param name="region"></param> | ||
1072 | public void EnableChildAgent(ScenePresence sp, GridRegion region) | 1075 | public void EnableChildAgent(ScenePresence sp, GridRegion region) |
1073 | { | 1076 | { |
1074 | m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighbour {0}", region.RegionName); | 1077 | m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighbour {0}", region.RegionName); |
@@ -1126,6 +1129,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1126 | /// This informs all neighbouring regions about agent "avatar". | 1129 | /// This informs all neighbouring regions about agent "avatar". |
1127 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 1130 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
1128 | /// </summary> | 1131 | /// </summary> |
1132 | /// <param name="sp"></param> | ||
1129 | public void EnableChildAgents(ScenePresence sp) | 1133 | public void EnableChildAgents(ScenePresence sp) |
1130 | { | 1134 | { |
1131 | List<GridRegion> neighbours = new List<GridRegion>(); | 1135 | List<GridRegion> neighbours = new List<GridRegion>(); |
@@ -1312,7 +1316,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1312 | Utils.LongToUInts(reg.RegionHandle, out x, out y); | 1316 | Utils.LongToUInts(reg.RegionHandle, out x, out y); |
1313 | x = x / Constants.RegionSize; | 1317 | x = x / Constants.RegionSize; |
1314 | y = y / Constants.RegionSize; | 1318 | y = y / Constants.RegionSize; |
1315 | m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")"); | 1319 | m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint + ")"); |
1316 | 1320 | ||
1317 | string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); | 1321 | string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); |
1318 | 1322 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 4933147..65ba87b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -964,8 +964,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
964 | } | 964 | } |
965 | } | 965 | } |
966 | } | 966 | } |
967 | else | ||
968 | { | ||
969 | m_log.WarnFormat( | ||
970 | "[InventoryAccessModule]: Could not find asset {0} for item {1} {2} for {3} in RezObject()", item.AssetID, item.Name, item.ID, remoteClient.Name); | ||
971 | } | ||
972 | |||
967 | return group; | 973 | return group; |
968 | } | 974 | } |
975 | else | ||
976 | { | ||
977 | m_log.WarnFormat( | ||
978 | "[InventoryAccessModule]: Could not find item {0} for {1} in RezObject()", | ||
979 | itemID, remoteClient.Name); | ||
980 | } | ||
969 | 981 | ||
970 | return null; | 982 | return null; |
971 | } | 983 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs index 733ad25..e74310c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs | |||
@@ -65,8 +65,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
65 | config.AddConfig("Modules"); | 65 | config.AddConfig("Modules"); |
66 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 66 | config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
67 | 67 | ||
68 | m_scene = SceneSetupHelpers.SetupScene(); | 68 | m_scene = SceneHelpers.SetupScene(); |
69 | SceneSetupHelpers.SetupSceneModules(m_scene, config, m_iam); | 69 | SceneHelpers.SetupSceneModules(m_scene, config, m_iam); |
70 | 70 | ||
71 | // Create user | 71 | // Create user |
72 | string userFirstName = "Jock"; | 72 | string userFirstName = "Jock"; |
@@ -82,14 +82,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
82 | [Test] | 82 | [Test] |
83 | public void TestRezCoalescedObject() | 83 | public void TestRezCoalescedObject() |
84 | { | 84 | { |
85 | TestHelper.InMethod(); | 85 | TestHelpers.InMethod(); |
86 | // log4net.Config.XmlConfigurator.Configure(); | 86 | // log4net.Config.XmlConfigurator.Configure(); |
87 | 87 | ||
88 | // Create asset | 88 | // Create asset |
89 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); | 89 | SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "Object1", 0x20); |
90 | object1.AbsolutePosition = new Vector3(15, 30, 45); | 90 | object1.AbsolutePosition = new Vector3(15, 30, 45); |
91 | 91 | ||
92 | SceneObjectGroup object2 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); | 92 | SceneObjectGroup object2 = SceneHelpers.CreateSceneObject(1, m_userId, "Object2", 0x40); |
93 | object2.AbsolutePosition = new Vector3(25, 50, 75); | 93 | object2.AbsolutePosition = new Vector3(25, 50, 75); |
94 | 94 | ||
95 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); | 95 | CoalescedSceneObjects coa = new CoalescedSceneObjects(m_userId, object1, object2); |
@@ -138,11 +138,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
138 | [Test] | 138 | [Test] |
139 | public void TestRezObject() | 139 | public void TestRezObject() |
140 | { | 140 | { |
141 | TestHelper.InMethod(); | 141 | TestHelpers.InMethod(); |
142 | // log4net.Config.XmlConfigurator.Configure(); | 142 | // log4net.Config.XmlConfigurator.Configure(); |
143 | 143 | ||
144 | // Create asset | 144 | // Create asset |
145 | SceneObjectGroup object1 = SceneSetupHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40); | 145 | SceneObjectGroup object1 = SceneHelpers.CreateSceneObject(1, m_userId, "My Little Dog Object", 0x40); |
146 | 146 | ||
147 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); | 147 | UUID asset1Id = UUID.Parse("00000000-0000-0000-0000-000000000060"); |
148 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); | 148 | AssetBase asset1 = AssetHelpers.CreateAsset(asset1Id, object1); |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index a4861ec..b0b35e4 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -186,7 +186,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
189 | |||
190 | private string[] GetUserNames(UUID uuid) | 189 | private string[] GetUserNames(UUID uuid) |
191 | { | 190 | { |
192 | string[] returnstring = new string[2]; | 191 | string[] returnstring = new string[2]; |
@@ -292,6 +291,25 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
292 | return userID.ToString(); | 291 | return userID.ToString(); |
293 | } | 292 | } |
294 | 293 | ||
294 | public void AddUser(UUID uuid, string first, string last) | ||
295 | { | ||
296 | if (m_UserCache.ContainsKey(uuid)) | ||
297 | return; | ||
298 | |||
299 | UserData user = new UserData(); | ||
300 | user.Id = uuid; | ||
301 | user.FirstName = first; | ||
302 | user.LastName = last; | ||
303 | // user.ProfileURL = we should initialize this to the default | ||
304 | |||
305 | AddUserInternal(user); | ||
306 | } | ||
307 | |||
308 | public void AddUser(UUID uuid, string first, string last, string profileURL) | ||
309 | { | ||
310 | AddUser(uuid, profileURL + ";" + first + " " + last); | ||
311 | } | ||
312 | |||
295 | public void AddUser(UUID id, string creatorData) | 313 | public void AddUser(UUID id, string creatorData) |
296 | { | 314 | { |
297 | if (m_UserCache.ContainsKey(id)) | 315 | if (m_UserCache.ContainsKey(id)) |
@@ -299,18 +317,17 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
299 | 317 | ||
300 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, craetorData {1}", id, creatorData); | 318 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, craetorData {1}", id, creatorData); |
301 | 319 | ||
302 | UserData user = new UserData(); | ||
303 | user.Id = id; | ||
304 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id); | 320 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id); |
305 | 321 | ||
306 | if (account != null) | 322 | if (account != null) |
307 | { | 323 | { |
308 | user.FirstName = account.FirstName; | 324 | AddUser(id, account.FirstName, account.LastName); |
309 | user.LastName = account.LastName; | ||
310 | // user.ProfileURL = we should initialize this to the default | ||
311 | } | 325 | } |
312 | else | 326 | else |
313 | { | 327 | { |
328 | UserData user = new UserData(); | ||
329 | user.Id = id; | ||
330 | |||
314 | if (creatorData != null && creatorData != string.Empty) | 331 | if (creatorData != null && creatorData != string.Empty) |
315 | { | 332 | { |
316 | //creatorData = <endpoint>;<name> | 333 | //creatorData = <endpoint>;<name> |
@@ -338,17 +355,19 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
338 | user.FirstName = "Unknown"; | 355 | user.FirstName = "Unknown"; |
339 | user.LastName = "User"; | 356 | user.LastName = "User"; |
340 | } | 357 | } |
341 | } | ||
342 | 358 | ||
343 | lock (m_UserCache) | 359 | AddUserInternal(user); |
344 | m_UserCache[id] = user; | 360 | } |
345 | |||
346 | m_log.DebugFormat("[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", user.Id, user.FirstName, user.LastName, user.HomeURL); | ||
347 | } | 361 | } |
348 | 362 | ||
349 | public void AddUser(UUID uuid, string first, string last, string profileURL) | 363 | void AddUserInternal(UserData user) |
350 | { | 364 | { |
351 | AddUser(uuid, profileURL + ";" + first + " " + last); | 365 | lock (m_UserCache) |
366 | m_UserCache[user.Id] = user; | ||
367 | |||
368 | m_log.DebugFormat( | ||
369 | "[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", | ||
370 | user.Id, user.FirstName, user.LastName, user.HomeURL); | ||
352 | } | 371 | } |
353 | 372 | ||
354 | //public void AddUser(UUID uuid, string userData) | 373 | //public void AddUser(UUID uuid, string userData) |