diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 36 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 20 |
2 files changed, 37 insertions, 19 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 613bc24..61b9045 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -248,7 +248,19 @@ namespace OpenSim.Region.ClientStack.Linden | |||
248 | //m_capsHandlers["MapLayer"] = | 248 | //m_capsHandlers["MapLayer"] = |
249 | // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", | 249 | // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", |
250 | // capsBase + m_mapLayerPath, | 250 | // capsBase + m_mapLayerPath, |
251 | // GetMapLayer); | 251 | // GetMapLayer); |
252 | |||
253 | IRequestHandler getObjectPhysicsDataHandler | ||
254 | = new RestStreamHandler( | ||
255 | "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null); | ||
256 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); | ||
257 | |||
258 | IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); | ||
259 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); | ||
260 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); | ||
261 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); | ||
262 | |||
263 | |||
252 | IRequestHandler req | 264 | IRequestHandler req |
253 | = new RestStreamHandler( | 265 | = new RestStreamHandler( |
254 | "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); | 266 | "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); |
@@ -283,14 +295,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
283 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); | 295 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); |
284 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); | 296 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); |
285 | 297 | ||
286 | IRequestHandler getObjectPhysicsDataHandler | 298 | |
287 | = new RestStreamHandler( | ||
288 | "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null); | ||
289 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); | ||
290 | IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); | ||
291 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); | ||
292 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); | ||
293 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); | ||
294 | 299 | ||
295 | IRequestHandler UpdateAgentInformationHandler | 300 | IRequestHandler UpdateAgentInformationHandler |
296 | = new RestStreamHandler( | 301 | = new RestStreamHandler( |
@@ -1379,6 +1384,17 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1379 | 1384 | ||
1380 | resp[uuid.ToString()] = object_data; | 1385 | resp[uuid.ToString()] = object_data; |
1381 | } | 1386 | } |
1387 | else | ||
1388 | { | ||
1389 | OSDMap object_data = new OSDMap(); | ||
1390 | object_data["linked_set_resource_cost"] = 0; | ||
1391 | object_data["resource_cost"] = 0; | ||
1392 | object_data["physics_cost"] = 0; | ||
1393 | object_data["linked_set_physics_cost"] = 0; | ||
1394 | |||
1395 | resp[uuid.ToString()] = object_data; | ||
1396 | } | ||
1397 | |||
1382 | } | 1398 | } |
1383 | } | 1399 | } |
1384 | 1400 | ||
@@ -1443,7 +1459,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1443 | } | 1459 | } |
1444 | } | 1460 | } |
1445 | 1461 | ||
1446 | if (simul != 0) | 1462 | // if (simul != 0) |
1447 | { | 1463 | { |
1448 | OSDMap object_data = new OSDMap(); | 1464 | OSDMap object_data = new OSDMap(); |
1449 | 1465 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index a3fdae1..0bb53c4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -301,8 +301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
301 | /// <remarks> | 301 | /// <remarks> |
302 | /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. | 302 | /// This allows the outbound loop to only operate when there is data to send rather than continuously polling. |
303 | /// Some data is sent immediately and not queued. That data would not trigger this event. | 303 | /// Some data is sent immediately and not queued. That data would not trigger this event. |
304 | /// WRONG use. May be usefull in future revision | ||
304 | /// </remarks> | 305 | /// </remarks> |
305 | private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); | 306 | // private AutoResetEvent m_dataPresentEvent = new AutoResetEvent(false); |
306 | 307 | ||
307 | private Pool<IncomingPacket> m_incomingPacketPool; | 308 | private Pool<IncomingPacket> m_incomingPacketPool; |
308 | 309 | ||
@@ -990,8 +991,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
990 | 991 | ||
991 | PacketPool.Instance.ReturnPacket(packet); | 992 | PacketPool.Instance.ReturnPacket(packet); |
992 | 993 | ||
993 | if (packetQueued) | 994 | /// WRONG use. May be usefull in future revision |
994 | m_dataPresentEvent.Set(); | 995 | // if (packetQueued) |
996 | // m_dataPresentEvent.Set(); | ||
995 | } | 997 | } |
996 | 998 | ||
997 | /// <summary> | 999 | /// <summary> |
@@ -1418,6 +1420,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1418 | queue.Enqueue(buffer); | 1420 | queue.Enqueue(buffer); |
1419 | return; | 1421 | return; |
1420 | } | 1422 | } |
1423 | |||
1421 | else if (packet.Type == PacketType.CompleteAgentMovement) | 1424 | else if (packet.Type == PacketType.CompleteAgentMovement) |
1422 | { | 1425 | { |
1423 | // Send ack straight away to let the viewer know that we got it. | 1426 | // Send ack straight away to let the viewer know that we got it. |
@@ -2150,13 +2153,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2150 | 2153 | ||
2151 | // If nothing was sent, sleep for the minimum amount of time before a | 2154 | // If nothing was sent, sleep for the minimum amount of time before a |
2152 | // token bucket could get more tokens | 2155 | // token bucket could get more tokens |
2153 | //if (!m_packetSent) | 2156 | |
2154 | // Thread.Sleep((int)TickCountResolution); | ||
2155 | // | ||
2156 | // Instead, now wait for data present to be explicitly signalled. Evidence so far is that with | ||
2157 | // modern mono it reduces CPU base load since there is no more continuous polling. | ||
2158 | if (!m_packetSent) | 2157 | if (!m_packetSent) |
2159 | m_dataPresentEvent.WaitOne(100); | 2158 | Thread.Sleep((int)TickCountResolution); |
2159 | |||
2160 | // .... wrong core code removed | ||
2161 | |||
2160 | 2162 | ||
2161 | Watchdog.UpdateThread(); | 2163 | Watchdog.UpdateThread(); |
2162 | } | 2164 | } |