diff options
author | Melanie | 2013-03-03 13:24:37 +0000 |
---|---|---|
committer | Melanie | 2013-03-03 13:24:37 +0000 |
commit | f39e4abf0ed67e3101286651f7a5efdf7140e4e4 (patch) | |
tree | a5e30b220b66136ec3812db84d962d54193944a8 | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Make Keyframe motion cross regions again (diff) | |
download | opensim-SC_OLD-f39e4abf0ed67e3101286651f7a5efdf7140e4e4.zip opensim-SC_OLD-f39e4abf0ed67e3101286651f7a5efdf7140e4e4.tar.gz opensim-SC_OLD-f39e4abf0ed67e3101286651f7a5efdf7140e4e4.tar.bz2 opensim-SC_OLD-f39e4abf0ed67e3101286651f7a5efdf7140e4e4.tar.xz |
Merge branch 'avination' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
15 files changed, 122 insertions, 59 deletions
diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs index bc6f6f9..241fef3 100644 --- a/OpenSim/Capabilities/Caps.cs +++ b/OpenSim/Capabilities/Caps.cs | |||
@@ -30,6 +30,7 @@ using System.Collections; | |||
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Threading; | ||
33 | using log4net; | 34 | using log4net; |
34 | using Nini.Config; | 35 | using Nini.Config; |
35 | using OpenMetaverse; | 36 | using OpenMetaverse; |
@@ -68,6 +69,7 @@ namespace OpenSim.Framework.Capabilities | |||
68 | private IHttpServer m_httpListener; | 69 | private IHttpServer m_httpListener; |
69 | private UUID m_agentID; | 70 | private UUID m_agentID; |
70 | private string m_regionName; | 71 | private string m_regionName; |
72 | private ManualResetEvent m_capsActive = new ManualResetEvent(false); | ||
71 | 73 | ||
72 | public UUID AgentID | 74 | public UUID AgentID |
73 | { | 75 | { |
@@ -171,5 +173,16 @@ namespace OpenSim.Framework.Capabilities | |||
171 | } | 173 | } |
172 | } | 174 | } |
173 | } | 175 | } |
176 | |||
177 | public void Activate() | ||
178 | { | ||
179 | m_capsActive.Set(); | ||
180 | } | ||
181 | |||
182 | public bool WaitForActivation() | ||
183 | { | ||
184 | // Wait for 30s. If that elapses, return false and run without caps | ||
185 | return m_capsActive.WaitOne(30000); | ||
186 | } | ||
174 | } | 187 | } |
175 | } | 188 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 9b945f4..eadca9b 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -342,6 +342,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
342 | m_log.DebugFormat( | 342 | m_log.DebugFormat( |
343 | "[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID); | 343 | "[CAPS]: Received SEED caps request in {0} for agent {1}", m_regionName, m_HostCapsObj.AgentID); |
344 | 344 | ||
345 | if (!m_HostCapsObj.WaitForActivation()) | ||
346 | return string.Empty; | ||
347 | |||
345 | if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint)) | 348 | if (!m_Scene.CheckClient(m_HostCapsObj.AgentID, httpRequest.RemoteIPEndPoint)) |
346 | { | 349 | { |
347 | m_log.WarnFormat( | 350 | m_log.WarnFormat( |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 986a665..f6e501d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -467,8 +467,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
467 | responsedata["content_type"] = "text/plain"; | 467 | responsedata["content_type"] = "text/plain"; |
468 | responsedata["keepalive"] = false; | 468 | responsedata["keepalive"] = false; |
469 | responsedata["reusecontext"] = false; | 469 | responsedata["reusecontext"] = false; |
470 | responsedata["str_response_string"] = "Upstream error: "; | 470 | responsedata["str_response_string"] = "<llsd></llsd>"; |
471 | responsedata["error_status_text"] = "Upstream error:"; | 471 | responsedata["error_status_text"] = "<llsd></llsd>"; |
472 | responsedata["http_protocol_version"] = "HTTP/1.0"; | 472 | responsedata["http_protocol_version"] = "HTTP/1.0"; |
473 | return responsedata; | 473 | return responsedata; |
474 | } | 474 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index a823dd8..707cc93 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -211,6 +211,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
211 | m_log.Error("Request: " + request); | 211 | m_log.Error("Request: " + request); |
212 | return; | 212 | return; |
213 | } | 213 | } |
214 | catch (System.Xml.XmlException) | ||
215 | { | ||
216 | m_log.ErrorFormat("[INVENTORY]: XML Format error"); | ||
217 | } | ||
214 | 218 | ||
215 | ArrayList foldersrequested = (ArrayList)hash["folders"]; | 219 | ArrayList foldersrequested = (ArrayList)hash["folders"]; |
216 | 220 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index cc4d014..9c26afe 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3901,6 +3901,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3901 | part.Shape.ProfileHollow = 27500; | 3901 | part.Shape.ProfileHollow = 27500; |
3902 | } | 3902 | } |
3903 | } | 3903 | } |
3904 | |||
3905 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | ||
3906 | { | ||
3907 | // Ensure that mesh has at least 8 valid faces | ||
3908 | part.Shape.ProfileBegin = 12500; | ||
3909 | part.Shape.ProfileEnd = 0; | ||
3910 | part.Shape.ProfileHollow = 27500; | ||
3911 | } | ||
3904 | } | 3912 | } |
3905 | 3913 | ||
3906 | ++updatesThisCall; | 3914 | ++updatesThisCall; |
@@ -4960,6 +4968,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4960 | position = part.OffsetPosition + presence.OffsetPosition * part.RotationOffset; | 4968 | position = part.OffsetPosition + presence.OffsetPosition * part.RotationOffset; |
4961 | rotation = part.RotationOffset * presence.Rotation; | 4969 | rotation = part.RotationOffset * presence.Rotation; |
4962 | } | 4970 | } |
4971 | angularVelocity = Vector3.Zero; | ||
4972 | } | ||
4973 | else | ||
4974 | { | ||
4975 | angularVelocity = presence.AngularVelocity; | ||
4976 | rotation = presence.Rotation; | ||
4963 | } | 4977 | } |
4964 | 4978 | ||
4965 | attachPoint = 0; | 4979 | attachPoint = 0; |
@@ -4972,9 +4986,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4972 | // may improve movement smoothness. | 4986 | // may improve movement smoothness. |
4973 | // acceleration = new Vector3(1, 0, 0); | 4987 | // acceleration = new Vector3(1, 0, 0); |
4974 | 4988 | ||
4975 | angularVelocity = presence.AngularVelocity; | ||
4976 | rotation = presence.Rotation; | ||
4977 | |||
4978 | if (sendTexture) | 4989 | if (sendTexture) |
4979 | textureEntry = presence.Appearance.Texture.GetBytes(); | 4990 | textureEntry = presence.Appearance.Texture.GetBytes(); |
4980 | else | 4991 | else |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 43b8b44..e13f479 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -260,10 +260,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
260 | { | 260 | { |
261 | CompleteTaskItemUpdate(m_updateTaskItemData); | 261 | CompleteTaskItemUpdate(m_updateTaskItemData); |
262 | } | 262 | } |
263 | // else if (m_storeLocal) | 263 | else if (m_asset.Local) |
264 | // { | 264 | { |
265 | // m_Scene.AssetService.Store(m_asset); | 265 | m_Scene.AssetService.Store(m_asset); |
266 | // } | 266 | } |
267 | } | 267 | } |
268 | 268 | ||
269 | m_log.DebugFormat( | 269 | m_log.DebugFormat( |
@@ -391,6 +391,11 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
391 | // m_asset.FullID, item.Name, ourClient.Name); | 391 | // m_asset.FullID, item.Name, ourClient.Name); |
392 | 392 | ||
393 | m_Scene.AssetService.Store(m_asset); | 393 | m_Scene.AssetService.Store(m_asset); |
394 | if (m_asset.FullID != UUID.Zero) | ||
395 | { | ||
396 | item.AssetID = m_asset.FullID; | ||
397 | m_Scene.InventoryService.UpdateItem(item); | ||
398 | } | ||
394 | 399 | ||
395 | m_transactions.RemoveXferUploader(m_transactionID); | 400 | m_transactions.RemoveXferUploader(m_transactionID); |
396 | } | 401 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 7f30e5a..2eb9bfb 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Each agent has its own capabilities handler. | 56 | /// Each agent has its own capabilities handler. |
57 | /// </summary> | 57 | /// </summary> |
58 | protected Dictionary<UUID, Caps> m_capsObjects = new Dictionary<UUID, Caps>(); | 58 | protected Dictionary<uint, Caps> m_capsObjects = new Dictionary<uint, Caps>(); |
59 | 59 | ||
60 | protected Dictionary<UUID, string> capsPaths = new Dictionary<UUID, string>(); | 60 | protected Dictionary<UUID, string> capsPaths = new Dictionary<UUID, string>(); |
61 | protected Dictionary<UUID, Dictionary<ulong, string>> childrenSeeds | 61 | protected Dictionary<UUID, Dictionary<ulong, string>> childrenSeeds |
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Framework | |||
100 | get { return null; } | 100 | get { return null; } |
101 | } | 101 | } |
102 | 102 | ||
103 | public void CreateCaps(UUID agentId) | 103 | public void CreateCaps(UUID agentId, uint circuitCode) |
104 | { | 104 | { |
105 | int flags = m_scene.GetUserFlags(agentId); | 105 | int flags = m_scene.GetUserFlags(agentId); |
106 | if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags)) | 106 | if (m_scene.RegionInfo.EstateSettings.IsBanned(agentId, flags)) |
@@ -108,9 +108,9 @@ namespace OpenSim.Region.CoreModules.Framework | |||
108 | 108 | ||
109 | String capsObjectPath = GetCapsPath(agentId); | 109 | String capsObjectPath = GetCapsPath(agentId); |
110 | 110 | ||
111 | if (m_capsObjects.ContainsKey(agentId)) | 111 | if (m_capsObjects.ContainsKey(circuitCode)) |
112 | { | 112 | { |
113 | Caps oldCaps = m_capsObjects[agentId]; | 113 | Caps oldCaps = m_capsObjects[circuitCode]; |
114 | 114 | ||
115 | m_log.DebugFormat( | 115 | m_log.DebugFormat( |
116 | "[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ", | 116 | "[CAPS]: Recreating caps for agent {0}. Old caps path {1}, new caps path {2}. ", |
@@ -125,12 +125,12 @@ namespace OpenSim.Region.CoreModules.Framework | |||
125 | (MainServer.Instance == null) ? 0: MainServer.Instance.Port, | 125 | (MainServer.Instance == null) ? 0: MainServer.Instance.Port, |
126 | capsObjectPath, agentId, m_scene.RegionInfo.RegionName); | 126 | capsObjectPath, agentId, m_scene.RegionInfo.RegionName); |
127 | 127 | ||
128 | m_capsObjects[agentId] = caps; | 128 | m_capsObjects[circuitCode] = caps; |
129 | 129 | ||
130 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); | 130 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); |
131 | } | 131 | } |
132 | 132 | ||
133 | public void RemoveCaps(UUID agentId) | 133 | public void RemoveCaps(UUID agentId, uint circuitCode) |
134 | { | 134 | { |
135 | if (childrenSeeds.ContainsKey(agentId)) | 135 | if (childrenSeeds.ContainsKey(agentId)) |
136 | { | 136 | { |
@@ -139,11 +139,11 @@ namespace OpenSim.Region.CoreModules.Framework | |||
139 | 139 | ||
140 | lock (m_capsObjects) | 140 | lock (m_capsObjects) |
141 | { | 141 | { |
142 | if (m_capsObjects.ContainsKey(agentId)) | 142 | if (m_capsObjects.ContainsKey(circuitCode)) |
143 | { | 143 | { |
144 | m_capsObjects[agentId].DeregisterHandlers(); | 144 | m_capsObjects[circuitCode].DeregisterHandlers(); |
145 | m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsObjects[agentId]); | 145 | m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsObjects[circuitCode]); |
146 | m_capsObjects.Remove(agentId); | 146 | m_capsObjects.Remove(circuitCode); |
147 | } | 147 | } |
148 | else | 148 | else |
149 | { | 149 | { |
@@ -154,19 +154,30 @@ namespace OpenSim.Region.CoreModules.Framework | |||
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | public Caps GetCapsForUser(UUID agentId) | 157 | public Caps GetCapsForUser(uint circuitCode) |
158 | { | 158 | { |
159 | lock (m_capsObjects) | 159 | lock (m_capsObjects) |
160 | { | 160 | { |
161 | if (m_capsObjects.ContainsKey(agentId)) | 161 | if (m_capsObjects.ContainsKey(circuitCode)) |
162 | { | 162 | { |
163 | return m_capsObjects[agentId]; | 163 | return m_capsObjects[circuitCode]; |
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
167 | return null; | 167 | return null; |
168 | } | 168 | } |
169 | 169 | ||
170 | public void ActivateCaps(uint circuitCode) | ||
171 | { | ||
172 | lock (m_capsObjects) | ||
173 | { | ||
174 | if (m_capsObjects.ContainsKey(circuitCode)) | ||
175 | { | ||
176 | m_capsObjects[circuitCode].Activate(); | ||
177 | } | ||
178 | } | ||
179 | } | ||
180 | |||
170 | public void SetAgentCapsSeeds(AgentCircuitData agent) | 181 | public void SetAgentCapsSeeds(AgentCircuitData agent) |
171 | { | 182 | { |
172 | capsPaths[agent.AgentID] = agent.CapsPath; | 183 | capsPaths[agent.AgentID] = agent.CapsPath; |
@@ -237,9 +248,9 @@ namespace OpenSim.Region.CoreModules.Framework | |||
237 | StringBuilder caps = new StringBuilder(); | 248 | StringBuilder caps = new StringBuilder(); |
238 | caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); | 249 | caps.AppendFormat("Region {0}:\n", m_scene.RegionInfo.RegionName); |
239 | 250 | ||
240 | foreach (KeyValuePair<UUID, Caps> kvp in m_capsObjects) | 251 | foreach (KeyValuePair<uint, Caps> kvp in m_capsObjects) |
241 | { | 252 | { |
242 | caps.AppendFormat("** User {0}:\n", kvp.Key); | 253 | caps.AppendFormat("** Circuit {0}:\n", kvp.Key); |
243 | 254 | ||
244 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); ) | 255 | for (IDictionaryEnumerator kvp2 = kvp.Value.CapsHandlers.GetCapsDetails(false).GetEnumerator(); kvp2.MoveNext(); ) |
245 | { | 256 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 6cfd332..f1de415 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -150,7 +150,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
150 | { | 150 | { |
151 | client.OnTeleportHomeRequest += TriggerTeleportHome; | 151 | client.OnTeleportHomeRequest += TriggerTeleportHome; |
152 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; | 152 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; |
153 | client.OnTeleportCancel += TeleportCancel; | ||
154 | } | 153 | } |
155 | 154 | ||
156 | public virtual void Close() {} | 155 | public virtual void Close() {} |
@@ -1020,11 +1019,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1020 | return neighbourRegion; | 1019 | return neighbourRegion; |
1021 | } | 1020 | } |
1022 | 1021 | ||
1023 | private void TeleportCancel(IClientAPI remoteClient) | ||
1024 | { | ||
1025 | m_entityTransferStateMachine.ResetFromTransit(remoteClient.AgentId); | ||
1026 | } | ||
1027 | |||
1028 | public bool Cross(ScenePresence agent, bool isFlying) | 1022 | public bool Cross(ScenePresence agent, bool isFlying) |
1029 | { | 1023 | { |
1030 | uint x; | 1024 | uint x; |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index ffb8e85..f2922d6 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
50 | public string url; | 50 | public string url; |
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 | } | 54 | } |
54 | 55 | ||
55 | public class RequestData | 56 | public class RequestData |
@@ -195,6 +196,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
195 | urlData.engine = engine; | 196 | urlData.engine = engine; |
196 | urlData.url = url; | 197 | urlData.url = url; |
197 | urlData.urlcode = urlcode; | 198 | urlData.urlcode = urlcode; |
199 | urlData.isSsl = false; | ||
198 | urlData.requests = new Dictionary<UUID, RequestData>(); | 200 | urlData.requests = new Dictionary<UUID, RequestData>(); |
199 | 201 | ||
200 | m_UrlMap[url] = urlData; | 202 | m_UrlMap[url] = urlData; |
@@ -240,6 +242,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
240 | urlData.engine = engine; | 242 | urlData.engine = engine; |
241 | urlData.url = url; | 243 | urlData.url = url; |
242 | urlData.urlcode = urlcode; | 244 | urlData.urlcode = urlcode; |
245 | urlData.isSsl = true; | ||
243 | urlData.requests = new Dictionary<UUID, RequestData>(); | 246 | urlData.requests = new Dictionary<UUID, RequestData>(); |
244 | 247 | ||
245 | 248 | ||
@@ -421,7 +424,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
421 | 424 | ||
422 | private void RemoveUrl(UrlData data) | 425 | private void RemoveUrl(UrlData data) |
423 | { | 426 | { |
424 | m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); | 427 | if (data.isSsl) |
428 | m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/"); | ||
429 | else | ||
430 | m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); | ||
425 | } | 431 | } |
426 | 432 | ||
427 | private Hashtable NoEvents(UUID requestID, UUID sessionID) | 433 | private Hashtable NoEvents(UUID requestID, UUID sessionID) |
diff --git a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs index 522c82d..30d404e 100644 --- a/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ICapabilitiesModule.cs | |||
@@ -40,19 +40,19 @@ namespace OpenSim.Region.Framework.Interfaces | |||
40 | /// </summary> | 40 | /// </summary> |
41 | /// <param name="agentId"></param> | 41 | /// <param name="agentId"></param> |
42 | /// <param name="capsObjectPath"></param> | 42 | /// <param name="capsObjectPath"></param> |
43 | void CreateCaps(UUID agentId); | 43 | void CreateCaps(UUID agentId, uint circuitCode); |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Remove the caps handler for a given agent. | 46 | /// Remove the caps handler for a given agent. |
47 | /// </summary> | 47 | /// </summary> |
48 | /// <param name="agentId"></param> | 48 | /// <param name="agentId"></param> |
49 | void RemoveCaps(UUID agentId); | 49 | void RemoveCaps(UUID agentId, uint circuitCode); |
50 | 50 | ||
51 | /// <summary> | 51 | /// <summary> |
52 | /// Will return null if the agent doesn't have a caps handler registered | 52 | /// Will return null if the agent doesn't have a caps handler registered |
53 | /// </summary> | 53 | /// </summary> |
54 | /// <param name="agentId"></param> | 54 | /// <param name="agentId"></param> |
55 | Caps GetCapsForUser(UUID agentId); | 55 | Caps GetCapsForUser(uint circuitCode); |
56 | 56 | ||
57 | void SetAgentCapsSeeds(AgentCircuitData agent); | 57 | void SetAgentCapsSeeds(AgentCircuitData agent); |
58 | 58 | ||
@@ -65,5 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
65 | void DropChildSeed(UUID agentID, ulong handle); | 65 | void DropChildSeed(UUID agentID, ulong handle); |
66 | 66 | ||
67 | string GetCapsPath(UUID agentId); | 67 | string GetCapsPath(UUID agentId); |
68 | |||
69 | void ActivateCaps(uint circuitCode); | ||
68 | } | 70 | } |
69 | } | 71 | } |
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 6dc6504..b102e48 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | |||
@@ -276,6 +276,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
276 | } | 276 | } |
277 | 277 | ||
278 | newMotion.m_timerStopped = false; | 278 | newMotion.m_timerStopped = false; |
279 | newMotion.m_running = true; | ||
279 | newMotion.m_isCrossing = false; | 280 | newMotion.m_isCrossing = false; |
280 | newMotion.m_waitingCrossing = false; | 281 | newMotion.m_waitingCrossing = false; |
281 | } | 282 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a229a9a..b03fee0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2758,8 +2758,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2758 | 2758 | ||
2759 | if (newPosition != Vector3.Zero) | 2759 | if (newPosition != Vector3.Zero) |
2760 | newObject.RootPart.GroupPosition = newPosition; | 2760 | newObject.RootPart.GroupPosition = newPosition; |
2761 | if (newObject.RootPart.KeyframeMotion != null) | ||
2762 | newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); | ||
2763 | 2761 | ||
2764 | if (!AddSceneObject(newObject)) | 2762 | if (!AddSceneObject(newObject)) |
2765 | { | 2763 | { |
@@ -2787,6 +2785,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2787 | // before we restart the scripts, or else some functions won't work. | 2785 | // before we restart the scripts, or else some functions won't work. |
2788 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | 2786 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); |
2789 | newObject.ResumeScripts(); | 2787 | newObject.ResumeScripts(); |
2788 | |||
2789 | if (newObject.RootPart.KeyframeMotion != null) | ||
2790 | newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); | ||
2790 | } | 2791 | } |
2791 | 2792 | ||
2792 | // Do this as late as possible so that listeners have full access to the incoming object | 2793 | // Do this as late as possible so that listeners have full access to the incoming object |
@@ -3611,7 +3612,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3611 | // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop | 3612 | // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop |
3612 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI | 3613 | // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI |
3613 | if (closeChildAgents && CapsModule != null) | 3614 | if (closeChildAgents && CapsModule != null) |
3614 | CapsModule.RemoveCaps(agentID); | 3615 | CapsModule.RemoveCaps(agentID, avatar.ControllingClient.CircuitCode); |
3615 | 3616 | ||
3616 | // // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever | 3617 | // // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever |
3617 | // // this method is doing is HORRIBLE!!! | 3618 | // // this method is doing is HORRIBLE!!! |
@@ -3842,20 +3843,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
3842 | return false; | 3843 | return false; |
3843 | } | 3844 | } |
3844 | 3845 | ||
3845 | |||
3846 | ScenePresence sp = GetScenePresence(agent.AgentID); | 3846 | ScenePresence sp = GetScenePresence(agent.AgentID); |
3847 | 3847 | ||
3848 | if (sp != null && !sp.IsChildAgent) | 3848 | // If we have noo presence here or if that presence is a zombie root |
3849 | // presence that will be kicled, we need a new CAPS object. | ||
3850 | if (sp == null || (sp != null && !sp.IsChildAgent)) | ||
3849 | { | 3851 | { |
3850 | // We have a zombie from a crashed session. | 3852 | if (CapsModule != null) |
3851 | // Or the same user is trying to be root twice here, won't work. | 3853 | { |
3852 | // Kill it. | 3854 | lock (agent) |
3853 | m_log.WarnFormat( | 3855 | { |
3854 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | 3856 | CapsModule.SetAgentCapsSeeds(agent); |
3855 | sp.Name, sp.UUID, RegionInfo.RegionName); | 3857 | CapsModule.CreateCaps(agent.AgentID, agent.circuitcode); |
3858 | } | ||
3859 | } | ||
3860 | } | ||
3856 | 3861 | ||
3857 | sp.ControllingClient.Close(true, true); | 3862 | if (sp != null) |
3858 | sp = null; | 3863 | { |
3864 | if (!sp.IsChildAgent) | ||
3865 | { | ||
3866 | // We have a zombie from a crashed session. | ||
3867 | // Or the same user is trying to be root twice here, won't work. | ||
3868 | // Kill it. | ||
3869 | m_log.WarnFormat( | ||
3870 | "[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.", | ||
3871 | sp.Name, sp.UUID, RegionInfo.RegionName); | ||
3872 | |||
3873 | sp.ControllingClient.Close(true, true); | ||
3874 | sp = null; | ||
3875 | } | ||
3859 | } | 3876 | } |
3860 | 3877 | ||
3861 | lock (agent) | 3878 | lock (agent) |
@@ -3896,7 +3913,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3896 | if (vialogin || (!m_seeIntoBannedRegion)) | 3913 | if (vialogin || (!m_seeIntoBannedRegion)) |
3897 | { | 3914 | { |
3898 | if (!AuthorizeUser(agent, out reason)) | 3915 | if (!AuthorizeUser(agent, out reason)) |
3916 | { | ||
3899 | return false; | 3917 | return false; |
3918 | } | ||
3900 | } | 3919 | } |
3901 | } | 3920 | } |
3902 | catch (Exception e) | 3921 | catch (Exception e) |
@@ -3911,11 +3930,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3911 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, | 3930 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, |
3912 | agent.AgentID, agent.circuitcode); | 3931 | agent.AgentID, agent.circuitcode); |
3913 | 3932 | ||
3914 | if (CapsModule != null) | ||
3915 | { | ||
3916 | CapsModule.SetAgentCapsSeeds(agent); | ||
3917 | CapsModule.CreateCaps(agent.AgentID); | ||
3918 | } | ||
3919 | } | 3933 | } |
3920 | else | 3934 | else |
3921 | { | 3935 | { |
@@ -3941,6 +3955,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3941 | agent.teleportFlags = teleportFlags; | 3955 | agent.teleportFlags = teleportFlags; |
3942 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); | 3956 | m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); |
3943 | 3957 | ||
3958 | if (CapsModule != null) | ||
3959 | { | ||
3960 | CapsModule.ActivateCaps(agent.circuitcode); | ||
3961 | } | ||
3962 | |||
3944 | if (vialogin) | 3963 | if (vialogin) |
3945 | { | 3964 | { |
3946 | // CleanDroppedAttachments(); | 3965 | // CleanDroppedAttachments(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 4a7f68b..e87bb04 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1655 | } | 1655 | } |
1656 | } | 1656 | } |
1657 | 1657 | ||
1658 | public Object osParseJSONNew(string JSON) | 1658 | private Object osParseJSONNew(string JSON) |
1659 | { | 1659 | { |
1660 | CheckThreatLevel(ThreatLevel.None, "osParseJSONNew"); | 1660 | CheckThreatLevel(ThreatLevel.None, "osParseJSONNew"); |
1661 | 1661 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 7eb347e..a652cb8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -260,7 +260,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
260 | string osGetScriptEngineName(); | 260 | string osGetScriptEngineName(); |
261 | string osGetSimulatorVersion(); | 261 | string osGetSimulatorVersion(); |
262 | string osGetPhysicsEngineType(); | 262 | string osGetPhysicsEngineType(); |
263 | Object osParseJSONNew(string JSON); | ||
264 | Hashtable osParseJSON(string JSON); | 263 | Hashtable osParseJSON(string JSON); |
265 | 264 | ||
266 | void osMessageObject(key objectUUID,string message); | 265 | void osMessageObject(key objectUUID,string message); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index c9902e4..b63773b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -435,11 +435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
435 | return m_OSSL_Functions.osParseJSON(JSON); | 435 | return m_OSSL_Functions.osParseJSON(JSON); |
436 | } | 436 | } |
437 | 437 | ||
438 | public Object osParseJSONNew(string JSON) | ||
439 | { | ||
440 | return m_OSSL_Functions.osParseJSONNew(JSON); | ||
441 | } | ||
442 | |||
443 | public void osMessageObject(key objectUUID,string message) | 438 | public void osMessageObject(key objectUUID,string message) |
444 | { | 439 | { |
445 | m_OSSL_Functions.osMessageObject(objectUUID,message); | 440 | m_OSSL_Functions.osMessageObject(objectUUID,message); |