diff options
author | Melanie | 2013-06-06 03:20:15 +0100 |
---|---|---|
committer | Melanie | 2013-06-06 03:20:15 +0100 |
commit | fe4a67efb6f54cad3f00884712abe03704216421 (patch) | |
tree | 04de93aaa8e9430c7c33e15912b3683b0297a10a /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Update HTTP server (diff) | |
download | opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.zip opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.tar.gz opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.tar.bz2 opensim-SC-fe4a67efb6f54cad3f00884712abe03704216421.tar.xz |
Merge branch 'avination-current' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
OpenSim/Region/Framework/Interfaces/IDynamicMenuModule.cs
OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
Diffstat (limited to '')
6 files changed, 68 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index d22f3f4..5b12ecb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -65,9 +65,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
65 | protected Scene m_scene; | 65 | protected Scene m_scene; |
66 | protected IDialogModule m_dialogModule; | 66 | protected IDialogModule m_dialogModule; |
67 | 67 | ||
68 | protected Dictionary<UUID, string> m_capsDict = | ||
69 | new Dictionary<UUID, string>(); | ||
70 | |||
71 | protected IDialogModule DialogModule | 68 | protected IDialogModule DialogModule |
72 | { | 69 | { |
73 | get | 70 | get |
@@ -89,7 +86,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
89 | m_scene.RegisterModuleInterface<IGodsModule>(this); | 86 | m_scene.RegisterModuleInterface<IGodsModule>(this); |
90 | m_scene.EventManager.OnNewClient += SubscribeToClientEvents; | 87 | m_scene.EventManager.OnNewClient += SubscribeToClientEvents; |
91 | m_scene.EventManager.OnRegisterCaps += OnRegisterCaps; | 88 | m_scene.EventManager.OnRegisterCaps += OnRegisterCaps; |
92 | m_scene.EventManager.OnClientClosed += OnClientClosed; | ||
93 | scene.EventManager.OnIncomingInstantMessage += | 89 | scene.EventManager.OnIncomingInstantMessage += |
94 | OnIncomingInstantMessage; | 90 | OnIncomingInstantMessage; |
95 | } | 91 | } |
@@ -125,15 +121,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
125 | client.OnRequestGodlikePowers -= RequestGodlikePowers; | 121 | client.OnRequestGodlikePowers -= RequestGodlikePowers; |
126 | } | 122 | } |
127 | 123 | ||
128 | private void OnClientClosed(UUID agentID, Scene scene) | ||
129 | { | ||
130 | m_capsDict.Remove(agentID); | ||
131 | } | ||
132 | |||
133 | private void OnRegisterCaps(UUID agentID, Caps caps) | 124 | private void OnRegisterCaps(UUID agentID, Caps caps) |
134 | { | 125 | { |
135 | string uri = "/CAPS/" + UUID.Random(); | 126 | string uri = "/CAPS/" + UUID.Random(); |
136 | m_capsDict[agentID] = uri; | ||
137 | 127 | ||
138 | caps.RegisterHandler("UntrustedSimulatorMessage", | 128 | caps.RegisterHandler("UntrustedSimulatorMessage", |
139 | new RestStreamHandler("POST", uri, | 129 | new RestStreamHandler("POST", uri, |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 6b90097..b9c88d4 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1113,14 +1113,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1113 | ((Scene)(client.Scene)).RequestTeleportLocation( | 1113 | ((Scene)(client.Scene)).RequestTeleportLocation( |
1114 | client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, | 1114 | client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, |
1115 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); | 1115 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); |
1116 | return true; | ||
1116 | } | 1117 | } |
1117 | else | 1118 | else |
1118 | { | 1119 | { |
1119 | // can't find the Home region: Tell viewer and abort | 1120 | // can't find the Home region: Tell viewer and abort |
1120 | client.SendTeleportFailed("Your home region could not be found."); | 1121 | client.SendTeleportFailed("Your home region could not be found."); |
1121 | return false; | ||
1122 | } | 1122 | } |
1123 | return true; | 1123 | return false; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | #endregion | 1126 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index f5b509f..d5c2661 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -387,7 +387,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
387 | inventoryStoredPosition = objectGroup.RootPart.AttachOffset; | 387 | inventoryStoredPosition = objectGroup.RootPart.AttachOffset; |
388 | inventoryStoredRotation = objectGroup.RootPart.AttachRotation; | 388 | inventoryStoredRotation = objectGroup.RootPart.AttachRotation; |
389 | } | 389 | } |
390 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | 390 | |
391 | // Trees could be attached and it's been done, but it makes | ||
392 | // no sense. State must be preserved because it's the tree type | ||
393 | if (objectGroup.RootPart.Shape.PCode != (byte)PCode.Tree && | ||
394 | objectGroup.RootPart.Shape.PCode != (byte)PCode.NewTree) | ||
395 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | ||
391 | 396 | ||
392 | objectGroup.AbsolutePosition = inventoryStoredPosition; | 397 | objectGroup.AbsolutePosition = inventoryStoredPosition; |
393 | objectGroup.RootPart.RotationOffset = inventoryStoredRotation; | 398 | objectGroup.RootPart.RotationOffset = inventoryStoredRotation; |
@@ -797,7 +802,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
797 | g.RootPart.AttachPoint = g.RootPart.Shape.State; | 802 | g.RootPart.AttachPoint = g.RootPart.Shape.State; |
798 | g.RootPart.AttachOffset = g.AbsolutePosition; | 803 | g.RootPart.AttachOffset = g.AbsolutePosition; |
799 | g.RootPart.AttachRotation = g.GroupRotation; | 804 | g.RootPart.AttachRotation = g.GroupRotation; |
800 | g.RootPart.Shape.State = 0; | 805 | if (g.RootPart.Shape.PCode != (byte)PCode.NewTree && |
806 | g.RootPart.Shape.PCode != (byte)PCode.Tree) | ||
807 | g.RootPart.Shape.State = 0; | ||
801 | } | 808 | } |
802 | 809 | ||
803 | objlist.Add(g); | 810 | objlist.Add(g); |
@@ -831,7 +838,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
831 | g.RootPart.AttachPoint = g.RootPart.Shape.State; | 838 | g.RootPart.AttachPoint = g.RootPart.Shape.State; |
832 | g.RootPart.AttachOffset = g.AbsolutePosition; | 839 | g.RootPart.AttachOffset = g.AbsolutePosition; |
833 | g.RootPart.AttachRotation = g.GroupRotation; | 840 | g.RootPart.AttachRotation = g.GroupRotation; |
834 | g.RootPart.Shape.State = 0; | 841 | if (g.RootPart.Shape.PCode != (byte)PCode.NewTree && |
842 | g.RootPart.Shape.PCode != (byte)PCode.Tree) | ||
843 | g.RootPart.Shape.State = 0; | ||
835 | 844 | ||
836 | objlist.Add(g); | 845 | objlist.Add(g); |
837 | XmlElement el = (XmlElement)n; | 846 | XmlElement el = (XmlElement)n; |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index f2922d6..2a4d440 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -51,6 +51,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
51 | public UUID urlcode; | 51 | public UUID urlcode; |
52 | public Dictionary<UUID, RequestData> requests; | 52 | public Dictionary<UUID, RequestData> requests; |
53 | public bool isSsl; | 53 | public bool isSsl; |
54 | public Scene scene; | ||
54 | } | 55 | } |
55 | 56 | ||
56 | public class RequestData | 57 | public class RequestData |
@@ -66,6 +67,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
66 | public int startTime; | 67 | public int startTime; |
67 | public bool responseSent; | 68 | public bool responseSent; |
68 | public string uri; | 69 | public string uri; |
70 | public bool allowResponseType = false; | ||
71 | public UUID hostID; | ||
72 | public Scene scene; | ||
69 | } | 73 | } |
70 | 74 | ||
71 | /// <summary> | 75 | /// <summary> |
@@ -171,6 +175,17 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
171 | 175 | ||
172 | public void RemoveRegion(Scene scene) | 176 | public void RemoveRegion(Scene scene) |
173 | { | 177 | { |
178 | // Drop references to that scene | ||
179 | foreach (KeyValuePair<string, UrlData> kvp in m_UrlMap) | ||
180 | { | ||
181 | if (kvp.Value.scene == scene) | ||
182 | kvp.Value.scene = null; | ||
183 | } | ||
184 | foreach (KeyValuePair<UUID, UrlData> kvp in m_RequestMap) | ||
185 | { | ||
186 | if (kvp.Value.scene == scene) | ||
187 | kvp.Value.scene = null; | ||
188 | } | ||
174 | } | 189 | } |
175 | 190 | ||
176 | public void Close() | 191 | public void Close() |
@@ -198,6 +213,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
198 | urlData.urlcode = urlcode; | 213 | urlData.urlcode = urlcode; |
199 | urlData.isSsl = false; | 214 | urlData.isSsl = false; |
200 | urlData.requests = new Dictionary<UUID, RequestData>(); | 215 | urlData.requests = new Dictionary<UUID, RequestData>(); |
216 | urlData.scene = host.ParentGroup.Scene; | ||
201 | 217 | ||
202 | m_UrlMap[url] = urlData; | 218 | m_UrlMap[url] = urlData; |
203 | 219 | ||
@@ -316,6 +332,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
316 | if (!urlData.requests[request].responseSent) | 332 | if (!urlData.requests[request].responseSent) |
317 | { | 333 | { |
318 | string responseBody = body; | 334 | string responseBody = body; |
335 | |||
336 | // If we have no OpenID from built-in browser, disable this | ||
337 | if (!urlData.requests[request].allowResponseType) | ||
338 | urlData.requests[request].responseType = "text/plain"; | ||
339 | |||
319 | if (urlData.requests[request].responseType.Equals("text/plain")) | 340 | if (urlData.requests[request].responseType.Equals("text/plain")) |
320 | { | 341 | { |
321 | string value; | 342 | string value; |
@@ -532,7 +553,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
532 | //put response | 553 | //put response |
533 | response["int_response_code"] = requestData.responseCode; | 554 | response["int_response_code"] = requestData.responseCode; |
534 | response["str_response_string"] = requestData.responseBody; | 555 | response["str_response_string"] = requestData.responseBody; |
535 | response["content_type"] = "text/plain"; | 556 | response["content_type"] = requestData.responseType; |
536 | response["keepalive"] = false; | 557 | response["keepalive"] = false; |
537 | response["reusecontext"] = false; | 558 | response["reusecontext"] = false; |
538 | 559 | ||
@@ -600,6 +621,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
600 | requestData.requestDone = false; | 621 | requestData.requestDone = false; |
601 | requestData.startTime = System.Environment.TickCount; | 622 | requestData.startTime = System.Environment.TickCount; |
602 | requestData.uri = uri; | 623 | requestData.uri = uri; |
624 | requestData.hostID = url.hostID; | ||
625 | requestData.scene = url.scene; | ||
603 | if (requestData.headers == null) | 626 | if (requestData.headers == null) |
604 | requestData.headers = new Dictionary<string, string>(); | 627 | requestData.headers = new Dictionary<string, string>(); |
605 | 628 | ||
@@ -608,6 +631,32 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
608 | string key = (string)header.Key; | 631 | string key = (string)header.Key; |
609 | string value = (string)header.Value; | 632 | string value = (string)header.Value; |
610 | requestData.headers.Add(key, value); | 633 | requestData.headers.Add(key, value); |
634 | if (key == "cookie") | ||
635 | { | ||
636 | string[] parts = value.Split(new char[] {'='}); | ||
637 | if (parts[0] == "agni_sl_session_id" && parts.Length > 1) | ||
638 | { | ||
639 | string cookie = Uri.UnescapeDataString(parts[1]); | ||
640 | string[] crumbs = cookie.Split(new char[] {':'}); | ||
641 | UUID owner; | ||
642 | if (crumbs.Length == 2 && UUID.TryParse(crumbs[0], out owner)) | ||
643 | { | ||
644 | if (crumbs[1].Length == 32) | ||
645 | { | ||
646 | Scene scene = requestData.scene; | ||
647 | if (scene != null) | ||
648 | { | ||
649 | SceneObjectPart host = scene.GetSceneObjectPart(requestData.hostID); | ||
650 | if (host != null) | ||
651 | { | ||
652 | if (host.OwnerID == owner) | ||
653 | requestData.allowResponseType = true; | ||
654 | } | ||
655 | } | ||
656 | } | ||
657 | } | ||
658 | } | ||
659 | } | ||
611 | } | 660 | } |
612 | foreach (DictionaryEntry de in request) | 661 | foreach (DictionaryEntry de in request) |
613 | { | 662 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 317dfd8..dbc9296 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -940,6 +940,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
940 | newLand.LandData.Name = newLand.LandData.Name; | 940 | newLand.LandData.Name = newLand.LandData.Name; |
941 | newLand.LandData.GlobalID = UUID.Random(); | 941 | newLand.LandData.GlobalID = UUID.Random(); |
942 | newLand.LandData.Dwell = 0; | 942 | newLand.LandData.Dwell = 0; |
943 | // Clear "Show in search" on the cut out parcel to prevent double-charging | ||
944 | newLand.LandData.Flags &= ~(uint)ParcelFlags.ShowDirectory; | ||
943 | 945 | ||
944 | newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y)); | 946 | newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y)); |
945 | 947 | ||
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 4c96a50..14deeb6 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -211,8 +211,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
211 | { | 211 | { |
212 | if (regionInfos.Count == 0) | 212 | if (regionInfos.Count == 0) |
213 | remoteClient.SendAgentAlertMessage("No regions found with that name.", true); | 213 | remoteClient.SendAgentAlertMessage("No regions found with that name.", true); |
214 | else if (regionInfos.Count == 1) | 214 | // else if (regionInfos.Count == 1) |
215 | remoteClient.SendAgentAlertMessage("Region found!", false); | 215 | // remoteClient.SendAgentAlertMessage("Region found!", false); |
216 | } | 216 | } |
217 | }); | 217 | }); |
218 | } | 218 | } |