diff options
3 files changed, 91 insertions, 6 deletions
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureServerConnector.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureServerConnector.cs new file mode 100644 index 0000000..10ea8ee --- /dev/null +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureServerConnector.cs | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using Nini.Config; | ||
30 | using OpenSim.Server.Base; | ||
31 | using OpenSim.Services.Interfaces; | ||
32 | using OpenSim.Framework.Servers.HttpServer; | ||
33 | using OpenSim.Server.Handlers.Base; | ||
34 | using OpenMetaverse; | ||
35 | |||
36 | namespace OpenSim.Capabilities.Handlers | ||
37 | { | ||
38 | public class UploadBakedTextureServerConnector : ServiceConnector | ||
39 | { | ||
40 | private IAssetService m_AssetService; | ||
41 | private string m_ConfigName = "CapsService"; | ||
42 | |||
43 | public UploadBakedTextureServerConnector(IConfigSource config, IHttpServer server, string configName) : | ||
44 | base(config, server, configName) | ||
45 | { | ||
46 | if (configName != String.Empty) | ||
47 | m_ConfigName = configName; | ||
48 | |||
49 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
50 | if (serverConfig == null) | ||
51 | throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName)); | ||
52 | |||
53 | string assetService = serverConfig.GetString("AssetService", String.Empty); | ||
54 | |||
55 | if (assetService == String.Empty) | ||
56 | throw new Exception("No AssetService in config file"); | ||
57 | |||
58 | Object[] args = new Object[] { config }; | ||
59 | m_AssetService = | ||
60 | ServerUtils.LoadPlugin<IAssetService>(assetService, args); | ||
61 | |||
62 | if (m_AssetService == null) | ||
63 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); | ||
64 | |||
65 | // NEED TO FIX THIS | ||
66 | OpenSim.Framework.Capabilities.Caps caps = new OpenSim.Framework.Capabilities.Caps(server, "", server.Port, "", UUID.Zero, ""); | ||
67 | server.AddStreamHandler(new RestStreamHandler( | ||
68 | "POST", | ||
69 | "/CAPS/UploadBakedTexture/", | ||
70 | new UploadBakedTextureHandler(caps, m_AssetService, true).UploadBakedTexture, | ||
71 | "UploadBakedTexture", | ||
72 | "Upload Baked Texture Capability")); | ||
73 | |||
74 | } | ||
75 | } | ||
76 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 2aab4f9..85270a6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -1469,7 +1469,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1469 | { | 1469 | { |
1470 | AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); | 1470 | AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code); |
1471 | bool tp = (aCircuit.teleportFlags > 0); | 1471 | bool tp = (aCircuit.teleportFlags > 0); |
1472 | // Let's delay this for TP agents, otherwise the viewer doesn't know where to get meshes from | 1472 | // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from |
1473 | if (!tp) | 1473 | if (!tp) |
1474 | client.SceneAgent.SendInitialDataToMe(); | 1474 | client.SceneAgent.SendInitialDataToMe(); |
1475 | } | 1475 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 774546c..bd4f68e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1010,7 +1010,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1010 | // recorded, which stops the input from being processed. | 1010 | // recorded, which stops the input from being processed. |
1011 | MovementFlag = 0; | 1011 | MovementFlag = 0; |
1012 | 1012 | ||
1013 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | 1013 | // DIVA NOTE: I moved TriggerOnMakeRootAgent out of here and into the end of |
1014 | // CompleteMovement. We don't want modules doing heavy computation before CompleteMovement | ||
1015 | // is over. | ||
1014 | } | 1016 | } |
1015 | 1017 | ||
1016 | public int GetStateSource() | 1018 | public int GetStateSource() |
@@ -1327,10 +1329,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1327 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | 1329 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
1328 | MakeRootAgent(AbsolutePosition, flying); | 1330 | MakeRootAgent(AbsolutePosition, flying); |
1329 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); | 1331 | ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); |
1332 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1333 | // This will also send the initial data to clients when TP to a neighboring region. | ||
1334 | // Not ideal, but until we know we're TP-ing from a neighboring region, there's not much we can do | ||
1335 | if (m_teleportFlags > 0) | ||
1336 | SendInitialDataToMe(); | ||
1330 | 1337 | ||
1331 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); | 1338 | // m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); |
1332 | 1339 | ||
1333 | if ((m_callbackURI != null) && !m_callbackURI.Equals("")) | 1340 | if (!string.IsNullOrEmpty(m_callbackURI)) |
1334 | { | 1341 | { |
1335 | // We cannot sleep here since this would hold up the inbound packet processing thread, as | 1342 | // We cannot sleep here since this would hold up the inbound packet processing thread, as |
1336 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release | 1343 | // CompleteMovement() is executed synchronously. However, it might be better to delay the release |
@@ -1358,9 +1365,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1358 | // Create child agents in neighbouring regions | 1365 | // Create child agents in neighbouring regions |
1359 | if (openChildAgents && !IsChildAgent) | 1366 | if (openChildAgents && !IsChildAgent) |
1360 | { | 1367 | { |
1361 | // Remember in HandleUseCircuitCode, we delayed this to here | ||
1362 | SendInitialDataToMe(); | ||
1363 | |||
1364 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | 1368 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); |
1365 | if (m_agentTransfer != null) | 1369 | if (m_agentTransfer != null) |
1366 | Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); | 1370 | Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); |
@@ -1382,6 +1386,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1382 | // m_log.DebugFormat( | 1386 | // m_log.DebugFormat( |
1383 | // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", | 1387 | // "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", |
1384 | // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); | 1388 | // client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); |
1389 | |||
1390 | // DIVA NOTE: moved this here from MakeRoot. We don't want modules making heavy | ||
1391 | // computations before CompleteMovement is over | ||
1392 | m_scene.EventManager.TriggerOnMakeRootAgent(this); | ||
1393 | |||
1385 | } | 1394 | } |
1386 | 1395 | ||
1387 | /// <summary> | 1396 | /// <summary> |