aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs12
-rw-r--r--OpenSim/Framework/BlockingQueue.cs5
-rw-r--r--OpenSim/Framework/IClientAPI.cs5
-rw-r--r--OpenSim/Framework/PacketPool.cs3
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs70
-rw-r--r--OpenSim/Framework/Tests/AgentCircuitDataTest.cs3
6 files changed, 16 insertions, 82 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index 940ae3b..3f4214e 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -380,13 +380,13 @@ namespace OpenSim.Framework
380 /// <summary> 380 /// <summary>
381 /// Set up appearance textures and avatar parameters, including a height calculation 381 /// Set up appearance textures and avatar parameters, including a height calculation
382 /// </summary> 382 /// </summary>
383 /// <param name="texture"></param> 383 public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
384 /// <param name="visualParam"></param>
385 public virtual void SetAppearance(byte[] texture, List<byte> visualParam)
386 { 384 {
387 Primitive.TextureEntry textureEnt = new Primitive.TextureEntry(texture, 0, texture.Length); 385 if (textureEntry != null)
388 m_texture = textureEnt; 386 m_texture = textureEntry;
389 m_visualparams = visualParam.ToArray(); 387 if (visualParams != null)
388 m_visualparams = visualParams;
389
390 m_avatarHeight = 1.23077f // Shortest possible avatar height 390 m_avatarHeight = 1.23077f // Shortest possible avatar height
391 + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height 391 + 0.516945f * (float)m_visualparams[(int)VPElement.SHAPE_HEIGHT] / 255.0f // Body height
392 + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size 392 + 0.072514f * (float)m_visualparams[(int)VPElement.SHAPE_HEAD_SIZE] / 255.0f // Head size
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs
index e03229b..857930a 100644
--- a/OpenSim/Framework/BlockingQueue.cs
+++ b/OpenSim/Framework/BlockingQueue.cs
@@ -66,7 +66,9 @@ namespace OpenSim.Framework
66 if (m_pqueue.Count > 0) 66 if (m_pqueue.Count > 0)
67 return m_pqueue.Dequeue(); 67 return m_pqueue.Dequeue();
68 68
69 return m_queue.Dequeue(); 69 if (m_queue.Count > 0)
70 return m_queue.Dequeue();
71 return default(T);
70 } 72 }
71 } 73 }
72 74
@@ -119,6 +121,7 @@ namespace OpenSim.Framework
119 { 121 {
120 m_pqueue.Clear(); 122 m_pqueue.Clear();
121 m_queue.Clear(); 123 m_queue.Clear();
124 Monitor.Pulse(m_queueSync);
122 } 125 }
123 } 126 }
124 } 127 }
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 4bc35e6..d3bd9e7 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
65 65
66 public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes); 66 public delegate void NetworkStats(int inPackets, int outPackets, int unAckedBytes);
67 67
68 public delegate void SetAppearance(byte[] texture, List<byte> visualParamList); 68 public delegate void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams);
69 69
70 public delegate void StartAnim(IClientAPI remoteClient, UUID animID); 70 public delegate void StartAnim(IClientAPI remoteClient, UUID animID);
71 71
@@ -1127,7 +1127,6 @@ namespace OpenSim.Framework
1127 1127
1128 void SetClientOption(string option, string value); 1128 void SetClientOption(string option, string value);
1129 string GetClientOption(string option); 1129 string GetClientOption(string option);
1130 void Terminate();
1131 1130
1132 void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters); 1131 void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters);
1133 void SendClearFollowCamProperties(UUID objectID); 1132 void SendClearFollowCamProperties(UUID objectID);
@@ -1175,5 +1174,7 @@ namespace OpenSim.Framework
1175 void KillEndDone(); 1174 void KillEndDone();
1176 1175
1177 bool AddGenericPacketHandler(string MethodName, GenericMessage handler); 1176 bool AddGenericPacketHandler(string MethodName, GenericMessage handler);
1177
1178 void SendRebakeAvatarTextures(UUID textureID);
1178 } 1179 }
1179} 1180}
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs
index 8075ce6..7e2860e 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Framework/PacketPool.cs
@@ -234,7 +234,8 @@ namespace OpenSim.Framework
234 234
235 lock (DataBlocks) 235 lock (DataBlocks)
236 { 236 {
237 DataBlocks[typeof(T)].Push(block); 237 if (DataBlocks[typeof(T)].Count < 50)
238 DataBlocks[typeof(T)].Push(block);
238 } 239 }
239 } 240 }
240 } 241 }
diff --git a/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs b/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs
deleted file mode 100644
index 2fa118d..0000000
--- a/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs
+++ /dev/null
@@ -1,70 +0,0 @@
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
28using System;
29using System.Collections.Generic;
30using System.Text;
31using NUnit.Framework;
32using OpenSim.Tests.Common.Setup;
33
34namespace OpenSim.Framework.Servers.HttpServer.Tests
35{
36 [TestFixture]
37 public class BaseRequestHandlerTests
38 {
39 private const string BASE_PATH = "/testpath";
40
41 private class BaseRequestHandlerImpl : BaseRequestHandler
42 {
43 public BaseRequestHandlerImpl(string httpMethod, string path) : base(httpMethod, path)
44 {
45 }
46 }
47
48 [Test]
49 public void TestConstructor()
50 {
51 new BaseRequestHandlerImpl(null, null);
52 }
53
54 [Test]
55 public void TestGetParams()
56 {
57 BaseRequestHandlerImpl handler = new BaseRequestHandlerImpl(null, BASE_PATH);
58
59 BaseRequestHandlerTestHelper.BaseTestGetParams(handler, BASE_PATH);
60 }
61
62 [Test]
63 public void TestSplitParams()
64 {
65 BaseRequestHandlerImpl handler = new BaseRequestHandlerImpl(null, BASE_PATH);
66
67 BaseRequestHandlerTestHelper.BaseTestSplitParams(handler, BASE_PATH);
68 }
69 }
70}
diff --git a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
index ecd35c0..2fda6f3 100644
--- a/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
+++ b/OpenSim/Framework/Tests/AgentCircuitDataTest.cs
@@ -227,8 +227,7 @@ namespace OpenSim.Framework.Tests
227 wearbyte.Add(VisualParams[i]); 227 wearbyte.Add(VisualParams[i]);
228 } 228 }
229 229
230 230 AvAppearance.SetAppearance(AvAppearance.Texture, (byte[])VisualParams.Clone());
231 AvAppearance.SetAppearance(AvAppearance.Texture.GetBytes(), wearbyte);
232 } 231 }
233 232
234 /// <summary> 233 /// <summary>