aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs5
-rw-r--r--OpenSim/Framework/Animation.cs5
-rw-r--r--OpenSim/Framework/Servers/MainServer.cs8
-rw-r--r--OpenSim/Framework/WebUtil.cs54
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs64
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs40
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt4
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs124
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs24
15 files changed, 227 insertions, 122 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 448962a..de52623 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -457,8 +457,6 @@ namespace OpenSim.Data.MySQL
457 if (prim.ParentUUID == UUID.Zero) 457 if (prim.ParentUUID == UUID.Zero)
458 { 458 {
459 objects[prim.UUID] = new SceneObjectGroup(prim); 459 objects[prim.UUID] = new SceneObjectGroup(prim);
460 if (prim.KeyframeMotion != null)
461 prim.KeyframeMotion.UpdateSceneObject(objects[prim.UUID]);
462 } 460 }
463 } 461 }
464 462
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 70b76c9..c35bba2 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -732,11 +732,12 @@ namespace OpenSim.Data.SQLite
732 } 732 }
733 733
734 SceneObjectGroup group = new SceneObjectGroup(prim); 734 SceneObjectGroup group = new SceneObjectGroup(prim);
735 if (prim.KeyframeMotion != null) 735
736 prim.KeyframeMotion.UpdateSceneObject(group);
737 createdObjects.Add(group.UUID, group); 736 createdObjects.Add(group.UUID, group);
738 retvals.Add(group); 737 retvals.Add(group);
739 LoadItems(prim); 738 LoadItems(prim);
739
740
740 } 741 }
741 } 742 }
742 catch (Exception e) 743 catch (Exception e)
diff --git a/OpenSim/Framework/Animation.cs b/OpenSim/Framework/Animation.cs
index 8bdf8f4..3425505 100644
--- a/OpenSim/Framework/Animation.cs
+++ b/OpenSim/Framework/Animation.cs
@@ -125,11 +125,10 @@ namespace OpenSim.Framework
125 Animation other = obj as Animation; 125 Animation other = obj as Animation;
126 if (other != null) 126 if (other != null)
127 { 127 {
128 return (other.AnimID == this.AnimID 128 return (other.AnimID.Equals(this.AnimID)
129 && other.SequenceNum == this.SequenceNum 129 && other.SequenceNum == this.SequenceNum
130 && other.ObjectID == this.ObjectID); 130 && other.ObjectID.Equals(this.ObjectID) );
131 } 131 }
132
133 return base.Equals(obj); 132 return base.Equals(obj);
134 } 133 }
135 134
diff --git a/OpenSim/Framework/Servers/MainServer.cs b/OpenSim/Framework/Servers/MainServer.cs
index cfd34bb..d189580 100644
--- a/OpenSim/Framework/Servers/MainServer.cs
+++ b/OpenSim/Framework/Servers/MainServer.cs
@@ -121,12 +121,14 @@ namespace OpenSim.Framework.Servers
121 + " level >= 2 then long warnings are logged when receiving bad input data.\n" 121 + " level >= 2 then long warnings are logged when receiving bad input data.\n"
122 + " level >= 3 then short notices about all incoming non-poll HTTP requests are logged.\n" 122 + " level >= 3 then short notices about all incoming non-poll HTTP requests are logged.\n"
123 + " level >= 4 then the time taken to fulfill the request is logged.\n" 123 + " level >= 4 then the time taken to fulfill the request is logged.\n"
124 + " level >= 5 then a sample from the beginning of the incoming data is logged.\n" 124 + " level >= 5 then a sample from the beginning of the data is logged.\n"
125 + " level >= 6 then the entire incoming data is logged.\n" 125 + " level >= 6 then the entire data is logged.\n"
126 + " no level is specified then the current level is returned.\n\n" 126 + " no level is specified then the current level is returned.\n\n"
127 + "If out or all and\n" 127 + "If out or all and\n"
128 + " level >= 3 then short notices about all outgoing requests going through WebUtil are logged.\n" 128 + " level >= 3 then short notices about all outgoing requests going through WebUtil are logged.\n"
129 + " level >= 4 then the time taken to fulfill the request is logged.\n", 129 + " level >= 4 then the time taken to fulfill the request is logged.\n"
130 + " level >= 5 then a sample from the beginning of the data is logged.\n"
131 + " level >= 6 then the entire data is logged.\n",
130 HandleDebugHttpCommand); 132 HandleDebugHttpCommand);
131 } 133 }
132 134
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 701fbb0..4599f62 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -151,6 +151,39 @@ namespace OpenSim.Framework
151 } 151 }
152 } 152 }
153 153
154 public static void LogOutgoingDetail(Stream outputStream)
155 {
156 using (StreamReader reader = new StreamReader(Util.Copy(outputStream), Encoding.UTF8))
157 {
158 string output;
159
160 if (DebugLevel == 5)
161 {
162 const int sampleLength = 80;
163 char[] sampleChars = new char[sampleLength];
164 reader.Read(sampleChars, 0, sampleLength);
165 output = new string(sampleChars);
166 }
167 else
168 {
169 output = reader.ReadToEnd();
170 }
171
172 LogOutgoingDetail(output);
173 }
174 }
175
176 public static void LogOutgoingDetail(string output)
177 {
178 if (DebugLevel == 5)
179 {
180 output = output.Substring(0, 80);
181 output = output + "...";
182 }
183
184 m_log.DebugFormat("[WEB UTIL]: {0}", output.Replace("\n", @"\n"));
185 }
186
154 private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed) 187 private static OSDMap ServiceOSDRequestWorker(string url, OSDMap data, string method, int timeout, bool compressed)
155 { 188 {
156 int reqnum = RequestNumber++; 189 int reqnum = RequestNumber++;
@@ -178,7 +211,11 @@ namespace OpenSim.Framework
178 // If there is some input, write it into the request 211 // If there is some input, write it into the request
179 if (data != null) 212 if (data != null)
180 { 213 {
181 strBuffer = OSDParser.SerializeJsonString(data); 214 strBuffer = OSDParser.SerializeJsonString(data);
215
216 if (DebugLevel >= 5)
217 LogOutgoingDetail(strBuffer);
218
182 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer); 219 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(strBuffer);
183 220
184 if (compressed) 221 if (compressed)
@@ -357,6 +394,10 @@ namespace OpenSim.Framework
357 if (data != null) 394 if (data != null)
358 { 395 {
359 queryString = BuildQueryString(data); 396 queryString = BuildQueryString(data);
397
398 if (DebugLevel >= 5)
399 LogOutgoingDetail(queryString);
400
360 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString); 401 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString);
361 402
362 request.ContentLength = buffer.Length; 403 request.ContentLength = buffer.Length;
@@ -767,6 +808,9 @@ namespace OpenSim.Framework
767 int length = (int)buffer.Length; 808 int length = (int)buffer.Length;
768 request.ContentLength = length; 809 request.ContentLength = length;
769 810
811 if (WebUtil.DebugLevel >= 5)
812 WebUtil.LogOutgoingDetail(buffer);
813
770 request.BeginGetRequestStream(delegate(IAsyncResult res) 814 request.BeginGetRequestStream(delegate(IAsyncResult res)
771 { 815 {
772 Stream requestStream = request.EndGetRequestStream(res); 816 Stream requestStream = request.EndGetRequestStream(res);
@@ -954,6 +998,9 @@ namespace OpenSim.Framework
954 length = (int)obj.Length; 998 length = (int)obj.Length;
955 request.ContentLength = length; 999 request.ContentLength = length;
956 1000
1001 if (WebUtil.DebugLevel >= 5)
1002 WebUtil.LogOutgoingDetail(buffer);
1003
957 Stream requestStream = null; 1004 Stream requestStream = null;
958 try 1005 try
959 { 1006 {
@@ -1096,6 +1143,9 @@ namespace OpenSim.Framework
1096 int length = (int)buffer.Length; 1143 int length = (int)buffer.Length;
1097 request.ContentLength = length; 1144 request.ContentLength = length;
1098 1145
1146 if (WebUtil.DebugLevel >= 5)
1147 WebUtil.LogOutgoingDetail(buffer);
1148
1099 Stream requestStream = null; 1149 Stream requestStream = null;
1100 try 1150 try
1101 { 1151 {
@@ -1198,4 +1248,4 @@ namespace OpenSim.Framework
1198 return deserial; 1248 return deserial;
1199 } 1249 }
1200 } 1250 }
1201} 1251} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
index 7073433..4f75191 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs
@@ -42,7 +42,7 @@ using OpenSim.Tests.Common;
42namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests 42namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
43{ 43{
44 [TestFixture] 44 [TestFixture]
45 public class AssetConnectorsTests : OpenSimTestCase 45 public class AssetConnectorTests : OpenSimTestCase
46 { 46 {
47 [Test] 47 [Test]
48 public void TestAddAsset() 48 public void TestAddAsset()
@@ -77,7 +77,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
77 // TODO: Add cache and check that this does receive a copy of the asset 77 // TODO: Add cache and check that this does receive a copy of the asset
78 } 78 }
79 79
80 [Test]
81 public void TestAddTemporaryAsset() 80 public void TestAddTemporaryAsset()
82 { 81 {
83 TestHelpers.InMethod(); 82 TestHelpers.InMethod();
@@ -93,10 +92,45 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
93 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector(); 92 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
94 lasc.Initialise(config); 93 lasc.Initialise(config);
95 94
96 // If it is local, it should not be stored 95 // If it is remote, it should be stored
96 AssetBase a2 = AssetHelpers.CreateNotecardAsset();
97 a2.Local = false;
98 a2.Temporary = true;
99
100 lasc.Store(a2);
101
102 AssetBase retreivedA2 = lasc.Get(a2.ID);
103 Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
104 Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
105 Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
106
107 AssetMetadata retrievedA2Metadata = lasc.GetMetadata(a2.ID);
108 Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
109
110 byte[] retrievedA2Data = lasc.GetData(a2.ID);
111 Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
112
113 // TODO: Add cache and check that this does receive a copy of the asset
114 }
115
116 [Test]
117 public void TestAddLocalAsset()
118 {
119 TestHelpers.InMethod();
120// TestHelpers.EnableLogging();
121
122 IConfigSource config = new IniConfigSource();
123 config.AddConfig("Modules");
124 config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
125 config.AddConfig("AssetService");
126 config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
127 config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
128
129 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
130 lasc.Initialise(config);
131
97 AssetBase a1 = AssetHelpers.CreateNotecardAsset(); 132 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
98 a1.Local = true; 133 a1.Local = true;
99 a1.Temporary = true;
100 134
101 lasc.Store(a1); 135 lasc.Store(a1);
102 136
@@ -104,29 +138,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
104 Assert.That(lasc.GetData(a1.ID), Is.Null); 138 Assert.That(lasc.GetData(a1.ID), Is.Null);
105 Assert.That(lasc.GetMetadata(a1.ID), Is.Null); 139 Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
106 140
107 // If it is remote, it should be stored
108 // AssetBase a2 = AssetHelpers.CreateNotecardAsset();
109 // a2.Local = false;
110 // a2.Temporary = true;
111
112 // lasc.Store(a2);
113
114 // AssetBase retreivedA2 = lasc.Get(a2.ID);
115 // Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
116 // Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
117 // Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
118
119 // AssetMetadata retrievedA2Metadata = lasc.GetMetadata(a2.ID);
120 // Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
121
122 // byte[] retrievedA2Data = lasc.GetData(a2.ID);
123 // Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
124
125 // TODO: Add cache and check that this does receive a copy of the asset 141 // TODO: Add cache and check that this does receive a copy of the asset
126 } 142 }
127 143
128 [Test] 144 [Test]
129 public void TestAddLocalAsset() 145 public void TestAddTemporaryLocalAsset()
130 { 146 {
131 TestHelpers.InMethod(); 147 TestHelpers.InMethod();
132// TestHelpers.EnableLogging(); 148// TestHelpers.EnableLogging();
@@ -141,8 +157,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
141 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector(); 157 LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
142 lasc.Initialise(config); 158 lasc.Initialise(config);
143 159
160 // If it is local, it should not be stored
144 AssetBase a1 = AssetHelpers.CreateNotecardAsset(); 161 AssetBase a1 = AssetHelpers.CreateNotecardAsset();
145 a1.Local = true; 162 a1.Local = true;
163 a1.Temporary = true;
146 164
147 lasc.Store(a1); 165 lasc.Store(a1);
148 166
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 5dee64d..b7400ea 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -312,18 +312,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
312 buff.Append("dflt="); 312 buff.Append("dflt=");
313 buff.Append(DefaultAnimation.ToString()); 313 buff.Append(DefaultAnimation.ToString());
314 buff.Append(",iDflt="); 314 buff.Append(",iDflt=");
315 if (DefaultAnimation == ImplicitDefaultAnimation) 315 if (DefaultAnimation.Equals(ImplicitDefaultAnimation))
316 buff.Append("same"); 316 buff.Append("same");
317 else 317 else
318 buff.Append(ImplicitDefaultAnimation.ToString()); 318 buff.Append(ImplicitDefaultAnimation.ToString());
319 if (m_animations.Count > 0) 319 if (m_animations.Count > 0)
320 { 320 {
321 buff.Append(",anims="); 321 buff.Append(",anims=");
322 bool firstTime = true;
322 foreach (OpenSim.Framework.Animation anim in m_animations) 323 foreach (OpenSim.Framework.Animation anim in m_animations)
323 { 324 {
325 if (!firstTime)
326 buff.Append(",");
324 buff.Append("<"); 327 buff.Append("<");
325 buff.Append(anim.ToString()); 328 buff.Append(anim.ToString());
326 buff.Append(">,"); 329 buff.Append(">");
330 firstTime = false;
327 } 331 }
328 } 332 }
329 return buff.ToString(); 333 return buff.ToString();
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index a701a79..3b5a5bd 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -94,6 +94,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
94 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) 94 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
95 { 95 {
96 SendAnimPack(); 96 SendAnimPack();
97 m_scenePresence.TriggerScenePresenceUpdated();
97 } 98 }
98 } 99 }
99 100
@@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
135 if (m_animations.Remove(animID, allowNoDefault)) 136 if (m_animations.Remove(animID, allowNoDefault))
136 { 137 {
137 SendAnimPack(); 138 SendAnimPack();
139 m_scenePresence.TriggerScenePresenceUpdated();
138 } 140 }
139 } 141 }
140 142
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index da80e4f..7b5fdcb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -763,6 +763,11 @@ namespace OpenSim.Region.Framework.Scenes
763 for (int i = 0; i < parts.Length; i++) 763 for (int i = 0; i < parts.Length; i++)
764 { 764 {
765 SceneObjectPart part = parts[i]; 765 SceneObjectPart part = parts[i];
766 if (part.KeyframeMotion != null)
767 {
768 part.KeyframeMotion.UpdateSceneObject(this);
769 }
770
766 if (Object.ReferenceEquals(part, m_rootPart)) 771 if (Object.ReferenceEquals(part, m_rootPart))
767 continue; 772 continue;
768 773
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index bab14dd..774546c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes
77// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); 77// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
78// } 78// }
79 79
80 private void TriggerScenePresenceUpdated() 80 public void TriggerScenePresenceUpdated()
81 { 81 {
82 if (m_scene != null) 82 if (m_scene != null)
83 m_scene.EventManager.TriggerScenePresenceUpdated(this); 83 m_scene.EventManager.TriggerScenePresenceUpdated(this);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 202a4ce..006a9c1 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -168,10 +168,10 @@ public abstract class BSShape
168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched) 168 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
169 { 169 {
170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing; 170 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}", 171 physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. prim={1}, texture={2}",
172 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 172 LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}", 173 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,prim={1},tex={2}",
174 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); 174 prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
175 } 175 }
176 else 176 else
177 { 177 {
@@ -238,17 +238,17 @@ public abstract class BSShape
238 { 238 {
239 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch) 239 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
240 { 240 {
241 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}", 241 physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. prim={1}, texture={2}",
242 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 242 LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
243 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}", 243 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,prim={1},tex={2}",
244 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); 244 prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
245 } 245 }
246 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing) 246 if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
247 { 247 {
248 physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}", 248 physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. prim={1}, texture={2}",
249 LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture); 249 LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
250 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}", 250 physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,prim={1},tex={2}",
251 prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture); 251 prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
252 } 252 }
253 } 253 }
254 } 254 }
@@ -260,6 +260,19 @@ public abstract class BSShape
260 return fillShape.physShapeInfo; 260 return fillShape.physShapeInfo;
261 } 261 }
262 262
263 public static String UsefulPrimInfo(BSScene pScene, BSPhysObject prim)
264 {
265 StringBuilder buff = new StringBuilder(prim.PhysObjectName);
266 buff.Append("/pos=");
267 buff.Append(prim.RawPosition.ToString());
268 if (pScene != null)
269 {
270 buff.Append("/rgn=");
271 buff.Append(pScene.Name);
272 }
273 return buff.ToString();
274 }
275
263 #endregion // Common shape routines 276 #endregion // Common shape routines
264} 277}
265 278
@@ -528,8 +541,7 @@ public class BSShapeMesh : BSShape
528 { 541 {
529 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. 542 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
530 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing; 543 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
531 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 544 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim={1}", LogHeader, UsefulPrimInfo(physicsScene, prim) );
532 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
533 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); 545 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
534 } 546 }
535 } 547 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
index 1e01526..4357ef1 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt
@@ -1,5 +1,9 @@
1CURRENT PROBLEMS TO FIX AND/OR LOOK AT 1CURRENT PROBLEMS TO FIX AND/OR LOOK AT
2================================================= 2=================================================
3Vehicle buoyancy. Computed correctly? Possibly creating very large effective mass.
4 Interaction of llSetBuoyancy and vehicle buoyancy. Should be additive?
5 Negative buoyancy computed correctly
6Computation of mesh mass. How done? How should it be done?
3Script changing rotation of child prim while vehicle moving (eg turning wheel) causes 7Script changing rotation of child prim while vehicle moving (eg turning wheel) causes
4 the wheel to appear to jump back. Looks like sending position from previous update. 8 the wheel to appear to jump back. Looks like sending position from previous update.
5Enable vehicle border crossings (at least as poorly as ODE) 9Enable vehicle border crossings (at least as poorly as ODE)
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 64127c2..9d28dc3 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Server.Handlers.Asset
155 } 155 }
156 catch (Exception e) 156 catch (Exception e)
157 { 157 {
158 m_log.DebugFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace); 158 m_log.ErrorFormat("[XINVENTORY HANDLER]: Exception {0}", e.StackTrace);
159 } 159 }
160 160
161 return FailureResult(); 161 return FailureResult();
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index 44f5e01..36d4ae2 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -84,6 +84,30 @@ namespace OpenSim.Services.Connectors
84 m_ServerURI = serviceURI; 84 m_ServerURI = serviceURI;
85 } 85 }
86 86
87 private bool CheckReturn(Dictionary<string, object> ret)
88 {
89 if (ret == null)
90 return false;
91
92 if (ret.Count == 0)
93 return false;
94
95 if (ret.ContainsKey("RESULT"))
96 {
97 if (ret["RESULT"] is string)
98 {
99 bool result;
100
101 if (bool.TryParse((string)ret["RESULT"], out result))
102 return result;
103
104 return false;
105 }
106 }
107
108 return true;
109 }
110
87 public bool CreateUserInventory(UUID principalID) 111 public bool CreateUserInventory(UUID principalID)
88 { 112 {
89 Dictionary<string,object> ret = MakeRequest("CREATEUSERINVENTORY", 113 Dictionary<string,object> ret = MakeRequest("CREATEUSERINVENTORY",
@@ -91,12 +115,7 @@ namespace OpenSim.Services.Connectors
91 { "PRINCIPAL", principalID.ToString() } 115 { "PRINCIPAL", principalID.ToString() }
92 }); 116 });
93 117
94 if (ret == null) 118 return CheckReturn(ret);
95 return false;
96 if (ret.Count == 0)
97 return false;
98
99 return bool.Parse(ret["RESULT"].ToString());
100 } 119 }
101 120
102 public List<InventoryFolderBase> GetInventorySkeleton(UUID principalID) 121 public List<InventoryFolderBase> GetInventorySkeleton(UUID principalID)
@@ -106,9 +125,7 @@ namespace OpenSim.Services.Connectors
106 { "PRINCIPAL", principalID.ToString() } 125 { "PRINCIPAL", principalID.ToString() }
107 }); 126 });
108 127
109 if (ret == null) 128 if (!CheckReturn(ret))
110 return null;
111 if (ret.Count == 0)
112 return null; 129 return null;
113 130
114 Dictionary<string, object> folders = (Dictionary<string, object>)ret["FOLDERS"]; 131 Dictionary<string, object> folders = (Dictionary<string, object>)ret["FOLDERS"];
@@ -135,9 +152,7 @@ namespace OpenSim.Services.Connectors
135 { "PRINCIPAL", principalID.ToString() } 152 { "PRINCIPAL", principalID.ToString() }
136 }); 153 });
137 154
138 if (ret == null) 155 if (!CheckReturn(ret))
139 return null;
140 if (ret.Count == 0)
141 return null; 156 return null;
142 157
143 return BuildFolder((Dictionary<string, object>)ret["folder"]); 158 return BuildFolder((Dictionary<string, object>)ret["folder"]);
@@ -151,9 +166,7 @@ namespace OpenSim.Services.Connectors
151 { "TYPE", ((int)type).ToString() } 166 { "TYPE", ((int)type).ToString() }
152 }); 167 });
153 168
154 if (ret == null) 169 if (!CheckReturn(ret))
155 return null;
156 if (ret.Count == 0)
157 return null; 170 return null;
158 171
159 return BuildFolder((Dictionary<string, object>)ret["folder"]); 172 return BuildFolder((Dictionary<string, object>)ret["folder"]);
@@ -174,9 +187,7 @@ namespace OpenSim.Services.Connectors
174 { "FOLDER", folderID.ToString() } 187 { "FOLDER", folderID.ToString() }
175 }); 188 });
176 189
177 if (ret == null) 190 if (!CheckReturn(ret))
178 return null;
179 if (ret.Count == 0)
180 return null; 191 return null;
181 192
182 Dictionary<string,object> folders = 193 Dictionary<string,object> folders =
@@ -205,9 +216,7 @@ namespace OpenSim.Services.Connectors
205 { "FOLDER", folderID.ToString() } 216 { "FOLDER", folderID.ToString() }
206 }); 217 });
207 218
208 if (ret == null) 219 if (!CheckReturn(ret))
209 return null;
210 if (ret.Count == 0)
211 return null; 220 return null;
212 221
213 Dictionary<string, object> items = (Dictionary<string, object>)ret["ITEMS"]; 222 Dictionary<string, object> items = (Dictionary<string, object>)ret["ITEMS"];
@@ -230,10 +239,7 @@ namespace OpenSim.Services.Connectors
230 { "ID", folder.ID.ToString() } 239 { "ID", folder.ID.ToString() }
231 }); 240 });
232 241
233 if (ret == null) 242 return CheckReturn(ret);
234 return false;
235
236 return bool.Parse(ret["RESULT"].ToString());
237 } 243 }
238 244
239 public bool UpdateFolder(InventoryFolderBase folder) 245 public bool UpdateFolder(InventoryFolderBase folder)
@@ -248,10 +254,7 @@ namespace OpenSim.Services.Connectors
248 { "ID", folder.ID.ToString() } 254 { "ID", folder.ID.ToString() }
249 }); 255 });
250 256
251 if (ret == null) 257 return CheckReturn(ret);
252 return false;
253
254 return bool.Parse(ret["RESULT"].ToString());
255 } 258 }
256 259
257 public bool MoveFolder(InventoryFolderBase folder) 260 public bool MoveFolder(InventoryFolderBase folder)
@@ -263,10 +266,7 @@ namespace OpenSim.Services.Connectors
263 { "PRINCIPAL", folder.Owner.ToString() } 266 { "PRINCIPAL", folder.Owner.ToString() }
264 }); 267 });
265 268
266 if (ret == null) 269 return CheckReturn(ret);
267 return false;
268
269 return bool.Parse(ret["RESULT"].ToString());
270 } 270 }
271 271
272 public bool DeleteFolders(UUID principalID, List<UUID> folderIDs) 272 public bool DeleteFolders(UUID principalID, List<UUID> folderIDs)
@@ -282,10 +282,7 @@ namespace OpenSim.Services.Connectors
282 { "FOLDERS", slist } 282 { "FOLDERS", slist }
283 }); 283 });
284 284
285 if (ret == null) 285 return CheckReturn(ret);
286 return false;
287
288 return bool.Parse(ret["RESULT"].ToString());
289 } 286 }
290 287
291 public bool PurgeFolder(InventoryFolderBase folder) 288 public bool PurgeFolder(InventoryFolderBase folder)
@@ -295,10 +292,7 @@ namespace OpenSim.Services.Connectors
295 { "ID", folder.ID.ToString() } 292 { "ID", folder.ID.ToString() }
296 }); 293 });
297 294
298 if (ret == null) 295 return CheckReturn(ret);
299 return false;
300
301 return bool.Parse(ret["RESULT"].ToString());
302 } 296 }
303 297
304 public bool AddItem(InventoryItemBase item) 298 public bool AddItem(InventoryItemBase item)
@@ -330,10 +324,7 @@ namespace OpenSim.Services.Connectors
330 { "CreationDate", item.CreationDate.ToString() } 324 { "CreationDate", item.CreationDate.ToString() }
331 }); 325 });
332 326
333 if (ret == null) 327 return CheckReturn(ret);
334 return false;
335
336 return bool.Parse(ret["RESULT"].ToString());
337 } 328 }
338 329
339 public bool UpdateItem(InventoryItemBase item) 330 public bool UpdateItem(InventoryItemBase item)
@@ -365,10 +356,7 @@ namespace OpenSim.Services.Connectors
365 { "CreationDate", item.CreationDate.ToString() } 356 { "CreationDate", item.CreationDate.ToString() }
366 }); 357 });
367 358
368 if (ret == null) 359 return CheckReturn(ret);
369 return false;
370
371 return bool.Parse(ret["RESULT"].ToString());
372 } 360 }
373 361
374 public bool MoveItems(UUID principalID, List<InventoryItemBase> items) 362 public bool MoveItems(UUID principalID, List<InventoryItemBase> items)
@@ -389,10 +377,7 @@ namespace OpenSim.Services.Connectors
389 { "DESTLIST", destlist } 377 { "DESTLIST", destlist }
390 }); 378 });
391 379
392 if (ret == null) 380 return CheckReturn(ret);
393 return false;
394
395 return bool.Parse(ret["RESULT"].ToString());
396 } 381 }
397 382
398 public bool DeleteItems(UUID principalID, List<UUID> itemIDs) 383 public bool DeleteItems(UUID principalID, List<UUID> itemIDs)
@@ -408,10 +393,7 @@ namespace OpenSim.Services.Connectors
408 { "ITEMS", slist } 393 { "ITEMS", slist }
409 }); 394 });
410 395
411 if (ret == null) 396 return CheckReturn(ret);
412 return false;
413
414 return bool.Parse(ret["RESULT"].ToString());
415 } 397 }
416 398
417 public InventoryItemBase GetItem(InventoryItemBase item) 399 public InventoryItemBase GetItem(InventoryItemBase item)
@@ -423,9 +405,7 @@ namespace OpenSim.Services.Connectors
423 { "ID", item.ID.ToString() } 405 { "ID", item.ID.ToString() }
424 }); 406 });
425 407
426 if (ret == null) 408 if (!CheckReturn(ret))
427 return null;
428 if (ret.Count == 0)
429 return null; 409 return null;
430 410
431 return BuildItem((Dictionary<string, object>)ret["item"]); 411 return BuildItem((Dictionary<string, object>)ret["item"]);
@@ -447,9 +427,7 @@ namespace OpenSim.Services.Connectors
447 { "ID", folder.ID.ToString() } 427 { "ID", folder.ID.ToString() }
448 }); 428 });
449 429
450 if (ret == null) 430 if (!CheckReturn(ret))
451 return null;
452 if (ret.Count == 0)
453 return null; 431 return null;
454 432
455 return BuildFolder((Dictionary<string, object>)ret["folder"]); 433 return BuildFolder((Dictionary<string, object>)ret["folder"]);
@@ -469,7 +447,7 @@ namespace OpenSim.Services.Connectors
469 { "PRINCIPAL", principalID.ToString() } 447 { "PRINCIPAL", principalID.ToString() }
470 }); 448 });
471 449
472 if (ret == null) 450 if (!CheckReturn(ret))
473 return null; 451 return null;
474 452
475 List<InventoryItemBase> items = new List<InventoryItemBase>(); 453 List<InventoryItemBase> items = new List<InventoryItemBase>();
@@ -488,10 +466,22 @@ namespace OpenSim.Services.Connectors
488 { "ASSET", assetID.ToString() } 466 { "ASSET", assetID.ToString() }
489 }); 467 });
490 468
469 // We cannot use CheckReturn() here because valid values for RESULT are "false" (in the case of request failure) or an int
491 if (ret == null) 470 if (ret == null)
492 return 0; 471 return 0;
493 472
494 return int.Parse(ret["RESULT"].ToString()); 473 if (ret.ContainsKey("RESULT"))
474 {
475 if (ret["RESULT"] is string)
476 {
477 int intResult;
478
479 if (int.TryParse ((string)ret["RESULT"], out intResult))
480 return intResult;
481 }
482 }
483
484 return 0;
495 } 485 }
496 486
497 public InventoryCollection GetUserInventory(UUID principalID) 487 public InventoryCollection GetUserInventory(UUID principalID)
@@ -508,9 +498,7 @@ namespace OpenSim.Services.Connectors
508 { "PRINCIPAL", principalID.ToString() } 498 { "PRINCIPAL", principalID.ToString() }
509 }); 499 });
510 500
511 if (ret == null) 501 if (!CheckReturn(ret))
512 return null;
513 if (ret.Count == 0)
514 return null; 502 return null;
515 503
516 Dictionary<string, object> folders = 504 Dictionary<string, object> folders =
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index eecf757..410916f 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -115,6 +115,12 @@ namespace OpenSim.Services.HypergridService
115 { 115 {
116 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); 116 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID);
117 117
118 if (suitcase == null)
119 {
120 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for inventory skeleton", principalID);
121 return null;
122 }
123
118 List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID); 124 List<XInventoryFolder> tree = GetFolderTree(principalID, suitcase.folderID);
119 if (tree == null || (tree != null && tree.Count == 0)) 125 if (tree == null || (tree != null && tree.Count == 0))
120 return null; 126 return null;
@@ -134,6 +140,7 @@ namespace OpenSim.Services.HypergridService
134 public override InventoryCollection GetUserInventory(UUID userID) 140 public override InventoryCollection GetUserInventory(UUID userID)
135 { 141 {
136 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Get Suitcase inventory for user {0}", userID); 142 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Get Suitcase inventory for user {0}", userID);
143
137 InventoryCollection userInventory = new InventoryCollection(); 144 InventoryCollection userInventory = new InventoryCollection();
138 userInventory.UserID = userID; 145 userInventory.UserID = userID;
139 userInventory.Folders = new List<InventoryFolderBase>(); 146 userInventory.Folders = new List<InventoryFolderBase>();
@@ -141,6 +148,12 @@ namespace OpenSim.Services.HypergridService
141 148
142 XInventoryFolder suitcase = GetSuitcaseXFolder(userID); 149 XInventoryFolder suitcase = GetSuitcaseXFolder(userID);
143 150
151 if (suitcase == null)
152 {
153 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for user inventory", userID);
154 return null;
155 }
156
144 List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID); 157 List<XInventoryFolder> tree = GetFolderTree(userID, suitcase.folderID);
145 if (tree == null || (tree != null && tree.Count == 0)) 158 if (tree == null || (tree != null && tree.Count == 0))
146 { 159 {
@@ -182,7 +195,8 @@ namespace OpenSim.Services.HypergridService
182 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID); 195 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: GetRootFolder for {0}", principalID);
183 196
184 // Let's find out the local root folder 197 // Let's find out the local root folder
185 XInventoryFolder root = GetRootXFolder(principalID); ; 198 XInventoryFolder root = GetRootXFolder(principalID);
199
186 if (root == null) 200 if (root == null)
187 { 201 {
188 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to retrieve local root folder for user {0}", principalID); 202 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to retrieve local root folder for user {0}", principalID);
@@ -255,6 +269,13 @@ namespace OpenSim.Services.HypergridService
255 { 269 {
256 //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type); 270 //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type);
257 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); 271 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID);
272
273 if (suitcase == null)
274 {
275 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: Found no suitcase folder for user {0} when looking for child type folder {1}", principalID, type);
276 return null;
277 }
278
258 XInventoryFolder[] folders = m_Database.GetFolders( 279 XInventoryFolder[] folders = m_Database.GetFolders(
259 new string[] { "agentID", "type", "parentFolderID" }, 280 new string[] { "agentID", "type", "parentFolderID" },
260 new string[] { principalID.ToString(), ((int)type).ToString(), suitcase.folderID.ToString() }); 281 new string[] { principalID.ToString(), ((int)type).ToString(), suitcase.folderID.ToString() });
@@ -546,6 +567,7 @@ namespace OpenSim.Services.HypergridService
546 private bool IsWithinSuitcaseTree(UUID principalID, UUID folderID) 567 private bool IsWithinSuitcaseTree(UUID principalID, UUID folderID)
547 { 568 {
548 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); 569 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID);
570
549 if (suitcase == null) 571 if (suitcase == null)
550 { 572 {
551 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder", principalID); 573 m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder", principalID);