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/Framework/UserManagement/UserManagementModule.cs102
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/Tests/AssetConnectorTests.cs64
-rw-r--r--OpenSim/Region/DataSnapshot/DataRequestHandler.cs4
-rw-r--r--OpenSim/Region/DataSnapshot/SnapshotStore.cs12
-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
18 files changed, 286 insertions, 181 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 5320543..537ec85 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -458,8 +458,6 @@ namespace OpenSim.Data.MySQL
458 if (prim.ParentUUID == UUID.Zero) 458 if (prim.ParentUUID == UUID.Zero)
459 { 459 {
460 objects[prim.UUID] = new SceneObjectGroup(prim); 460 objects[prim.UUID] = new SceneObjectGroup(prim);
461 if (prim.KeyframeMotion != null)
462 prim.KeyframeMotion.UpdateSceneObject(objects[prim.UUID]);
463 } 461 }
464 } 462 }
465 463
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index c8e48fd..a369b2b 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 bf57fd4..312e9a9 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)
@@ -358,6 +395,10 @@ namespace OpenSim.Framework
358 if (data != null) 395 if (data != null)
359 { 396 {
360 queryString = BuildQueryString(data); 397 queryString = BuildQueryString(data);
398
399 if (DebugLevel >= 5)
400 LogOutgoingDetail(queryString);
401
361 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString); 402 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(queryString);
362 403
363 request.ContentLength = buffer.Length; 404 request.ContentLength = buffer.Length;
@@ -769,6 +810,9 @@ namespace OpenSim.Framework
769 int length = (int)buffer.Length; 810 int length = (int)buffer.Length;
770 request.ContentLength = length; 811 request.ContentLength = length;
771 812
813 if (WebUtil.DebugLevel >= 5)
814 WebUtil.LogOutgoingDetail(buffer);
815
772 request.BeginGetRequestStream(delegate(IAsyncResult res) 816 request.BeginGetRequestStream(delegate(IAsyncResult res)
773 { 817 {
774 Stream requestStream = request.EndGetRequestStream(res); 818 Stream requestStream = request.EndGetRequestStream(res);
@@ -966,6 +1010,9 @@ namespace OpenSim.Framework
966 length = (int)obj.Length; 1010 length = (int)obj.Length;
967 request.ContentLength = length; 1011 request.ContentLength = length;
968 1012
1013 if (WebUtil.DebugLevel >= 5)
1014 WebUtil.LogOutgoingDetail(buffer);
1015
969 Stream requestStream = null; 1016 Stream requestStream = null;
970 try 1017 try
971 { 1018 {
@@ -1111,6 +1158,9 @@ namespace OpenSim.Framework
1111 int length = (int)buffer.Length; 1158 int length = (int)buffer.Length;
1112 request.ContentLength = length; 1159 request.ContentLength = length;
1113 1160
1161 if (WebUtil.DebugLevel >= 5)
1162 WebUtil.LogOutgoingDetail(buffer);
1163
1114 Stream requestStream = null; 1164 Stream requestStream = null;
1115 try 1165 try
1116 { 1166 {
@@ -1213,4 +1263,4 @@ namespace OpenSim.Framework
1213 return deserial; 1263 return deserial;
1214 } 1264 }
1215 } 1265 }
1216} 1266} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 1e70b84..864e181 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -476,71 +476,71 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
476 UserData oldUser; 476 UserData oldUser;
477 //lock the whole block - prevent concurrent update 477 //lock the whole block - prevent concurrent update
478 lock (m_UserCache) 478 lock (m_UserCache)
479 m_UserCache.TryGetValue(id, out oldUser);
480
481 if (oldUser != null)
479 { 482 {
480 m_UserCache.TryGetValue (id, out oldUser); 483 if (creatorData == null || creatorData == String.Empty)
481 if (oldUser != null)
482 { 484 {
483 if (creatorData == null || creatorData == String.Empty) 485 //ignore updates without creator data
484 { 486 return;
485 //ignore updates without creator data
486 return;
487 }
488
489 //try update unknown users
490 //and creator's home URL's
491 if ((oldUser.FirstName == "Unknown" && !creatorData.Contains ("Unknown")) || (oldUser.HomeURL != null && !creatorData.StartsWith (oldUser.HomeURL)))
492 {
493 m_UserCache.Remove (id);
494 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData, oldUser.HomeURL);
495 }
496 else
497 {
498 //we have already a valid user within the cache
499 return;
500 }
501 } 487 }
502 488
503 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount (m_Scenes [0].RegionInfo.ScopeID, id); 489 //try update unknown users
504 490 //and creator's home URL's
505 if (account != null) 491 if ((oldUser.FirstName == "Unknown" && !creatorData.Contains("Unknown")) || (oldUser.HomeURL != null && !creatorData.StartsWith(oldUser.HomeURL)))
506 { 492 {
507 AddUser (id, account.FirstName, account.LastName); 493 lock (m_UserCache)
494 m_UserCache.Remove(id);
495 m_log.DebugFormat("[USER MANAGEMENT MODULE]: Re-adding user with id {0}, creatorData [{1}] and old HomeURL {2}", id, creatorData, oldUser.HomeURL);
508 } 496 }
509 else 497 else
510 { 498 {
511 UserData user = new UserData (); 499 //we have already a valid user within the cache
512 user.Id = id; 500 return;
501 }
502 }
513 503
514 if (creatorData != null && creatorData != string.Empty) 504 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, id);
515 { 505
516 //creatorData = <endpoint>;<name> 506 if (account != null)
507 {
508 AddUser(id, account.FirstName, account.LastName);
509 }
510 else
511 {
512 UserData user = new UserData();
513 user.Id = id;
517 514
518 string[] parts = creatorData.Split (';'); 515 if (creatorData != null && creatorData != string.Empty)
519 if (parts.Length >= 1) 516 {
517 //creatorData = <endpoint>;<name>
518
519 string[] parts = creatorData.Split(';');
520 if (parts.Length >= 1)
521 {
522 user.HomeURL = parts[0];
523 try
520 { 524 {
521 user.HomeURL = parts [0]; 525 Uri uri = new Uri(parts[0]);
522 try 526 user.LastName = "@" + uri.Authority;
523 { 527 }
524 Uri uri = new Uri (parts [0]); 528 catch (UriFormatException)
525 user.LastName = "@" + uri.Authority; 529 {
526 } 530 m_log.DebugFormat("[SCENE]: Unable to parse Uri {0}", parts[0]);
527 catch (UriFormatException) 531 user.LastName = "@unknown";
528 {
529 m_log.DebugFormat ("[SCENE]: Unable to parse Uri {0}", parts [0]);
530 user.LastName = "@unknown";
531 }
532 } 532 }
533 if (parts.Length >= 2)
534 user.FirstName = parts [1].Replace (' ', '.');
535 }
536 else
537 {
538 user.FirstName = "Unknown";
539 user.LastName = "UserUMMAU";
540 } 533 }
541 534 if (parts.Length >= 2)
542 AddUserInternal (user); 535 user.FirstName = parts[1].Replace(' ', '.');
543 } 536 }
537 else
538 {
539 user.FirstName = "Unknown";
540 user.LastName = "UserUMMAU";
541 }
542
543 AddUserInternal(user);
544 } 544 }
545 } 545 }
546 546
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/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
index 32e93b4..50276ae 100644
--- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
+++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.DataSnapshot
63 63
64 public Hashtable OnGetSnapshot(Hashtable keysvals) 64 public Hashtable OnGetSnapshot(Hashtable keysvals)
65 { 65 {
66 m_log.Info("[DATASNAPSHOT] Received collection request"); 66 m_log.Debug("[DATASNAPSHOT] Received collection request");
67 Hashtable reply = new Hashtable(); 67 Hashtable reply = new Hashtable();
68 int statuscode = 200; 68 int statuscode = 200;
69 69
@@ -80,7 +80,7 @@ namespace OpenSim.Region.DataSnapshot
80 80
81 public Hashtable OnValidate(Hashtable keysvals) 81 public Hashtable OnValidate(Hashtable keysvals)
82 { 82 {
83 m_log.Info("[DATASNAPSHOT] Received validation request"); 83 m_log.Debug("[DATASNAPSHOT] Received validation request");
84 Hashtable reply = new Hashtable(); 84 Hashtable reply = new Hashtable();
85 int statuscode = 200; 85 int statuscode = 200;
86 86
diff --git a/OpenSim/Region/DataSnapshot/SnapshotStore.cs b/OpenSim/Region/DataSnapshot/SnapshotStore.cs
index aa3d2ff..480aaaf 100644
--- a/OpenSim/Region/DataSnapshot/SnapshotStore.cs
+++ b/OpenSim/Region/DataSnapshot/SnapshotStore.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Region.DataSnapshot
120 provider.Stale = false; 120 provider.Stale = false;
121 m_scenes[provider.GetParentScene] = true; 121 m_scenes[provider.GetParentScene] = true;
122 122
123 m_log.Info("[DATASNAPSHOT]: Generated fragment response for provider type " + provider.Name); 123 m_log.Debug("[DATASNAPSHOT]: Generated fragment response for provider type " + provider.Name);
124 } 124 }
125 else 125 else
126 { 126 {
@@ -134,7 +134,7 @@ namespace OpenSim.Region.DataSnapshot
134 data = factory.ImportNode(node, true); 134 data = factory.ImportNode(node, true);
135 } 135 }
136 136
137 m_log.Info("[DATASNAPSHOT]: Retrieved fragment response for provider type " + provider.Name); 137 m_log.Debug("[DATASNAPSHOT]: Retrieved fragment response for provider type " + provider.Name);
138 } 138 }
139 139
140 return data; 140 return data;
@@ -154,7 +154,7 @@ namespace OpenSim.Region.DataSnapshot
154 154
155 if (!m_scenes[scene]) 155 if (!m_scenes[scene])
156 { 156 {
157 m_log.Info("[DATASNAPSHOT]: Attempting to retrieve snapshot from cache."); 157 m_log.Debug("[DATASNAPSHOT]: Attempting to retrieve snapshot from cache.");
158 //get snapshot from cache 158 //get snapshot from cache
159 String path = DataFileNameScene(scene); 159 String path = DataFileNameScene(scene);
160 160
@@ -168,11 +168,11 @@ namespace OpenSim.Region.DataSnapshot
168 regionElement = factory.ImportNode(node, true); 168 regionElement = factory.ImportNode(node, true);
169 } 169 }
170 170
171 m_log.Info("[DATASNAPSHOT]: Obtained snapshot from cache for " + scene.RegionInfo.RegionName); 171 m_log.Debug("[DATASNAPSHOT]: Obtained snapshot from cache for " + scene.RegionInfo.RegionName);
172 } 172 }
173 else 173 else
174 { 174 {
175 m_log.Info("[DATASNAPSHOT]: Attempting to generate snapshot."); 175 m_log.Debug("[DATASNAPSHOT]: Attempting to generate snapshot.");
176 //make snapshot 176 //make snapshot
177 regionElement = MakeRegionNode(scene, factory); 177 regionElement = MakeRegionNode(scene, factory);
178 178
@@ -211,7 +211,7 @@ namespace OpenSim.Region.DataSnapshot
211 211
212 m_scenes[scene] = false; 212 m_scenes[scene] = false;
213 213
214 m_log.Info("[DATASNAPSHOT]: Generated new snapshot for " + scene.RegionInfo.RegionName); 214 m_log.Debug("[DATASNAPSHOT]: Generated new snapshot for " + scene.RegionInfo.RegionName);
215 } 215 }
216 216
217 return regionElement; 217 return regionElement;
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 eb70eee..5529a25 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -95,6 +95,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
95 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) 95 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
96 { 96 {
97 SendAnimPack(); 97 SendAnimPack();
98 m_scenePresence.TriggerScenePresenceUpdated();
98 } 99 }
99 } 100 }
100 101
@@ -136,6 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
136 if (m_animations.Remove(animID, allowNoDefault)) 137 if (m_animations.Remove(animID, allowNoDefault))
137 { 138 {
138 SendAnimPack(); 139 SendAnimPack();
140 m_scenePresence.TriggerScenePresenceUpdated();
139 } 141 }
140 } 142 }
141 143
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 02a8935..c465138 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1072,6 +1072,11 @@ namespace OpenSim.Region.Framework.Scenes
1072 for (int i = 0; i < parts.Length; i++) 1072 for (int i = 0; i < parts.Length; i++)
1073 { 1073 {
1074 SceneObjectPart part = parts[i]; 1074 SceneObjectPart part = parts[i];
1075 if (part.KeyframeMotion != null)
1076 {
1077 part.KeyframeMotion.UpdateSceneObject(this);
1078 }
1079
1075 if (Object.ReferenceEquals(part, m_rootPart)) 1080 if (Object.ReferenceEquals(part, m_rootPart))
1076 continue; 1081 continue;
1077 1082
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 1859cb1..4ae0eb1 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes
78// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); 78// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
79// } 79// }
80 80
81 private void TriggerScenePresenceUpdated() 81 public void TriggerScenePresenceUpdated()
82 { 82 {
83 if (m_scene != null) 83 if (m_scene != null)
84 m_scene.EventManager.TriggerScenePresenceUpdated(this); 84 m_scene.EventManager.TriggerScenePresenceUpdated(this);
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index a780526..5a0a14c 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
@@ -530,8 +543,7 @@ public class BSShapeMesh : BSShape
530 { 543 {
531 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh. 544 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
532 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing; 545 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
533 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 546 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim={1}", LogHeader, UsefulPrimInfo(physicsScene, prim) );
534 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
535 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey); 547 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
536 } 548 }
537 } 549 }
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);