diff options
author | Melanie | 2013-08-17 03:23:45 +0100 |
---|---|---|
committer | Melanie | 2013-08-17 03:23:45 +0100 |
commit | bef03fb30be67dbe671dcc330558daf8a6c4bb22 (patch) | |
tree | 6d221db8af5bdb1a09190527a79aae3dfe3116d9 /OpenSim/Region/CoreModules/Avatar | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove mono compiler warnings from UserProfilesModule (diff) | |
download | opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.zip opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.gz opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.bz2 opensim-SC_OLD-bef03fb30be67dbe671dcc330558daf8a6c4bb22.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
3 files changed, 20 insertions, 38 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 62b25d0..95cc6b7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -361,22 +361,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
361 | 361 | ||
362 | // If we're an NPC then skip all the item checks and manipulations since we don't have an | 362 | // If we're an NPC then skip all the item checks and manipulations since we don't have an |
363 | // inventory right now. | 363 | // inventory right now. |
364 | SceneObjectGroup objatt | 364 | RezSingleAttachmentFromInventoryInternal( |
365 | = RezSingleAttachmentFromInventoryInternal( | ||
366 | sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, attachmentPt, true, d); | 365 | sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, attachmentPt, true, d); |
367 | |||
368 | |||
369 | if (ThrottlePer100PrimsRezzed > 0) | ||
370 | { | ||
371 | int throttleMs = (int)Math.Round((float)objatt.PrimCount / 100 * ThrottlePer100PrimsRezzed); | ||
372 | |||
373 | if (DebugLevel > 0) | ||
374 | m_log.DebugFormat( | ||
375 | "[ATTACHMENTS MODULE]: Throttling by {0}ms after rez of {1} with {2} prims for attachment to {3} on point {4} in {5}", | ||
376 | throttleMs, objatt.Name, objatt.PrimCount, sp.Name, attachmentPt, m_scene.Name); | ||
377 | |||
378 | Thread.Sleep(throttleMs); | ||
379 | } | ||
380 | } | 366 | } |
381 | catch (Exception e) | 367 | catch (Exception e) |
382 | { | 368 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 35045b5..62acd78 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -844,7 +844,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
844 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID); | 844 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID); |
845 | TestClient tc = new TestClient(acd, sceneA); | 845 | TestClient tc = new TestClient(acd, sceneA); |
846 | List<TestClient> destinationTestClients = new List<TestClient>(); | 846 | List<TestClient> destinationTestClients = new List<TestClient>(); |
847 | EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients); | 847 | EntityTransferHelpers.SetupInformClientOfNeighbourTriggersNeighbourClientCreate(tc, destinationTestClients); |
848 | 848 | ||
849 | ScenePresence beforeTeleportSp = SceneHelpers.AddScenePresence(sceneA, tc, acd); | 849 | ScenePresence beforeTeleportSp = SceneHelpers.AddScenePresence(sceneA, tc, acd); |
850 | beforeTeleportSp.AbsolutePosition = new Vector3(30, 31, 32); | 850 | beforeTeleportSp.AbsolutePosition = new Vector3(30, 31, 32); |
@@ -925,7 +925,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
925 | IConfig modulesConfig = config.AddConfig("Modules"); | 925 | IConfig modulesConfig = config.AddConfig("Modules"); |
926 | modulesConfig.Set("EntityTransferModule", etmA.Name); | 926 | modulesConfig.Set("EntityTransferModule", etmA.Name); |
927 | modulesConfig.Set("SimulationServices", lscm.Name); | 927 | modulesConfig.Set("SimulationServices", lscm.Name); |
928 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); | ||
929 | 928 | ||
930 | modulesConfig.Set("InventoryAccessModule", "BasicInventoryAccessModule"); | 929 | modulesConfig.Set("InventoryAccessModule", "BasicInventoryAccessModule"); |
931 | 930 | ||
@@ -944,7 +943,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
944 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID); | 943 | AgentCircuitData acd = SceneHelpers.GenerateAgentData(ua1.PrincipalID); |
945 | TestClient tc = new TestClient(acd, sceneA); | 944 | TestClient tc = new TestClient(acd, sceneA); |
946 | List<TestClient> destinationTestClients = new List<TestClient>(); | 945 | List<TestClient> destinationTestClients = new List<TestClient>(); |
947 | EntityTransferHelpers.SetUpInformClientOfNeighbour(tc, destinationTestClients); | 946 | EntityTransferHelpers.SetupInformClientOfNeighbourTriggersNeighbourClientCreate(tc, destinationTestClients); |
948 | 947 | ||
949 | ScenePresence beforeTeleportSp = SceneHelpers.AddScenePresence(sceneA, tc, acd); | 948 | ScenePresence beforeTeleportSp = SceneHelpers.AddScenePresence(sceneA, tc, acd); |
950 | beforeTeleportSp.AbsolutePosition = new Vector3(30, 31, 32); | 949 | beforeTeleportSp.AbsolutePosition = new Vector3(30, 31, 32); |
@@ -966,7 +965,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
966 | // Both these operations will occur on different threads and will wait for each other. | 965 | // Both these operations will occur on different threads and will wait for each other. |
967 | // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 | 966 | // We have to do this via ThreadPool directly since FireAndForget has been switched to sync for the V1 |
968 | // test protocol, where we are trying to avoid unpredictable async operations in regression tests. | 967 | // test protocol, where we are trying to avoid unpredictable async operations in regression tests. |
969 | ((TestClient)beforeTeleportSp.ControllingClient).OnTestClientSendRegionTeleport | 968 | tc.OnTestClientSendRegionTeleport |
970 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) | 969 | += (regionHandle, simAccess, regionExternalEndPoint, locationID, flags, capsURL) |
971 | => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); | 970 | => ThreadPool.UnsafeQueueUserWorkItem(o => destinationTestClients[0].CompleteMovement(), null); |
972 | 971 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index c04098c..966a05c 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -307,7 +307,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
307 | } | 307 | } |
308 | 308 | ||
309 | string serverURI = string.Empty; | 309 | string serverURI = string.Empty; |
310 | bool foreign = GetUserProfileServerURI(targetID, out serverURI); | 310 | GetUserProfileServerURI(targetID, out serverURI); |
311 | UUID creatorId = UUID.Zero; | 311 | UUID creatorId = UUID.Zero; |
312 | 312 | ||
313 | OSDMap parameters= new OSDMap(); | 313 | OSDMap parameters= new OSDMap(); |
@@ -372,7 +372,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
372 | } | 372 | } |
373 | 373 | ||
374 | string serverURI = string.Empty; | 374 | string serverURI = string.Empty; |
375 | bool foreign = GetUserProfileServerURI(target, out serverURI); | 375 | GetUserProfileServerURI(target, out serverURI); |
376 | 376 | ||
377 | object Ad = (object)ad; | 377 | object Ad = (object)ad; |
378 | if(!JsonRpcRequest(ref Ad, "classifieds_info_query", serverURI, UUID.Random().ToString())) | 378 | if(!JsonRpcRequest(ref Ad, "classifieds_info_query", serverURI, UUID.Random().ToString())) |
@@ -441,10 +441,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
441 | Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; | 441 | Vector3 pos = remoteClient.SceneAgent.AbsolutePosition; |
442 | ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); | 442 | ILandObject land = s.LandChannel.GetLandObject(pos.X, pos.Y); |
443 | ScenePresence p = FindPresence(remoteClient.AgentId); | 443 | ScenePresence p = FindPresence(remoteClient.AgentId); |
444 | Vector3 avaPos = p.AbsolutePosition; | 444 | // Vector3 avaPos = p.AbsolutePosition; |
445 | 445 | ||
446 | string serverURI = string.Empty; | 446 | string serverURI = string.Empty; |
447 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 447 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
448 | 448 | ||
449 | if (land == null) | 449 | if (land == null) |
450 | { | 450 | { |
@@ -470,7 +470,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
470 | 470 | ||
471 | object Ad = ad; | 471 | object Ad = ad; |
472 | 472 | ||
473 | OSD X = OSD.SerializeMembers(Ad); | 473 | OSD.SerializeMembers(Ad); |
474 | 474 | ||
475 | if(!JsonRpcRequest(ref Ad, "classified_update", serverURI, UUID.Random().ToString())) | 475 | if(!JsonRpcRequest(ref Ad, "classified_update", serverURI, UUID.Random().ToString())) |
476 | { | 476 | { |
@@ -491,7 +491,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
491 | public void ClassifiedDelete(UUID queryClassifiedID, IClientAPI remoteClient) | 491 | public void ClassifiedDelete(UUID queryClassifiedID, IClientAPI remoteClient) |
492 | { | 492 | { |
493 | string serverURI = string.Empty; | 493 | string serverURI = string.Empty; |
494 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 494 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
495 | 495 | ||
496 | UUID classifiedId; | 496 | UUID classifiedId; |
497 | OSDMap parameters= new OSDMap(); | 497 | OSDMap parameters= new OSDMap(); |
@@ -541,7 +541,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
541 | } | 541 | } |
542 | 542 | ||
543 | string serverURI = string.Empty; | 543 | string serverURI = string.Empty; |
544 | bool foreign = GetUserProfileServerURI(targetId, out serverURI); | 544 | GetUserProfileServerURI(targetId, out serverURI); |
545 | 545 | ||
546 | OSDMap parameters= new OSDMap(); | 546 | OSDMap parameters= new OSDMap(); |
547 | parameters.Add("creatorId", OSD.FromUUID(targetId)); | 547 | parameters.Add("creatorId", OSD.FromUUID(targetId)); |
@@ -592,7 +592,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
592 | UUID targetID; | 592 | UUID targetID; |
593 | UUID.TryParse(args[0], out targetID); | 593 | UUID.TryParse(args[0], out targetID); |
594 | string serverURI = string.Empty; | 594 | string serverURI = string.Empty; |
595 | bool foreign = GetUserProfileServerURI(targetID, out serverURI); | 595 | GetUserProfileServerURI(targetID, out serverURI); |
596 | IClientAPI remoteClient = (IClientAPI)sender; | 596 | IClientAPI remoteClient = (IClientAPI)sender; |
597 | 597 | ||
598 | UserProfilePick pick = new UserProfilePick(); | 598 | UserProfilePick pick = new UserProfilePick(); |
@@ -660,7 +660,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
660 | m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); | 660 | m_log.DebugFormat("[PROFILES]: Start PickInfoUpdate Name: {0} PickId: {1} SnapshotId: {2}", name, pickID.ToString(), snapshotID.ToString()); |
661 | UserProfilePick pick = new UserProfilePick(); | 661 | UserProfilePick pick = new UserProfilePick(); |
662 | string serverURI = string.Empty; | 662 | string serverURI = string.Empty; |
663 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 663 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
664 | ScenePresence p = FindPresence(remoteClient.AgentId); | 664 | ScenePresence p = FindPresence(remoteClient.AgentId); |
665 | 665 | ||
666 | Vector3 avaPos = p.AbsolutePosition; | 666 | Vector3 avaPos = p.AbsolutePosition; |
@@ -720,7 +720,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
720 | public void PickDelete(IClientAPI remoteClient, UUID queryPickID) | 720 | public void PickDelete(IClientAPI remoteClient, UUID queryPickID) |
721 | { | 721 | { |
722 | string serverURI = string.Empty; | 722 | string serverURI = string.Empty; |
723 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 723 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
724 | 724 | ||
725 | OSDMap parameters= new OSDMap(); | 725 | OSDMap parameters= new OSDMap(); |
726 | parameters.Add("pickId", OSD.FromUUID(queryPickID)); | 726 | parameters.Add("pickId", OSD.FromUUID(queryPickID)); |
@@ -755,7 +755,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
755 | 755 | ||
756 | IClientAPI remoteClient = (IClientAPI)sender; | 756 | IClientAPI remoteClient = (IClientAPI)sender; |
757 | string serverURI = string.Empty; | 757 | string serverURI = string.Empty; |
758 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 758 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
759 | note.TargetId = remoteClient.AgentId; | 759 | note.TargetId = remoteClient.AgentId; |
760 | UUID.TryParse(args[0], out note.UserId); | 760 | UUID.TryParse(args[0], out note.UserId); |
761 | 761 | ||
@@ -791,7 +791,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
791 | note.Notes = queryNotes; | 791 | note.Notes = queryNotes; |
792 | 792 | ||
793 | string serverURI = string.Empty; | 793 | string serverURI = string.Empty; |
794 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 794 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
795 | 795 | ||
796 | object Note = note; | 796 | object Note = note; |
797 | if(!JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) | 797 | if(!JsonRpcRequest(ref Note, "avatar_notes_update", serverURI, UUID.Random().ToString())) |
@@ -836,7 +836,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
836 | prop.Language = languages; | 836 | prop.Language = languages; |
837 | 837 | ||
838 | string serverURI = string.Empty; | 838 | string serverURI = string.Empty; |
839 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 839 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
840 | 840 | ||
841 | object Param = prop; | 841 | object Param = prop; |
842 | if(!JsonRpcRequest(ref Param, "avatar_interests_update", serverURI, UUID.Random().ToString())) | 842 | if(!JsonRpcRequest(ref Param, "avatar_interests_update", serverURI, UUID.Random().ToString())) |
@@ -958,7 +958,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
958 | prop.FirstLifeText = newProfile.FirstLifeAboutText; | 958 | prop.FirstLifeText = newProfile.FirstLifeAboutText; |
959 | 959 | ||
960 | string serverURI = string.Empty; | 960 | string serverURI = string.Empty; |
961 | bool foreign = GetUserProfileServerURI(remoteClient.AgentId, out serverURI); | 961 | GetUserProfileServerURI(remoteClient.AgentId, out serverURI); |
962 | 962 | ||
963 | object Prop = prop; | 963 | object Prop = prop; |
964 | 964 | ||
@@ -972,7 +972,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
972 | } | 972 | } |
973 | } | 973 | } |
974 | 974 | ||
975 | |||
976 | /// <summary> | 975 | /// <summary> |
977 | /// Gets the profile data. | 976 | /// Gets the profile data. |
978 | /// </summary> | 977 | /// </summary> |
@@ -997,7 +996,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
997 | } | 996 | } |
998 | 997 | ||
999 | string serverURI = string.Empty; | 998 | string serverURI = string.Empty; |
1000 | bool foreign = GetUserProfileServerURI(properties.UserId, out serverURI); | 999 | GetUserProfileServerURI(properties.UserId, out serverURI); |
1001 | 1000 | ||
1002 | // This is checking a friend on the home grid | 1001 | // This is checking a friend on the home grid |
1003 | // Not HG friend | 1002 | // Not HG friend |
@@ -1245,11 +1244,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1245 | return false; | 1244 | return false; |
1246 | } | 1245 | } |
1247 | 1246 | ||
1248 | byte[] buf = new byte[8192]; | ||
1249 | Stream rstream = webResponse.GetResponseStream(); | 1247 | Stream rstream = webResponse.GetResponseStream(); |
1250 | OSDMap mret = (OSDMap)OSDParser.DeserializeJson(rstream); | 1248 | OSDMap mret = (OSDMap)OSDParser.DeserializeJson(rstream); |
1251 | 1249 | ||
1252 | if(mret.ContainsKey("error")) | 1250 | if (mret.ContainsKey("error")) |
1253 | return false; | 1251 | return false; |
1254 | 1252 | ||
1255 | // get params... | 1253 | // get params... |
@@ -1311,7 +1309,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
1311 | return false; | 1309 | return false; |
1312 | } | 1310 | } |
1313 | 1311 | ||
1314 | byte[] buf = new byte[8192]; | ||
1315 | Stream rstream = webResponse.GetResponseStream(); | 1312 | Stream rstream = webResponse.GetResponseStream(); |
1316 | 1313 | ||
1317 | OSDMap response = new OSDMap(); | 1314 | OSDMap response = new OSDMap(); |