aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorJeff Ames2009-10-01 01:00:09 +0900
committerJeff Ames2009-10-01 01:17:47 +0900
commitee205e7e812e170f670e690a4e0fa9caa652f226 (patch)
treedf407e66d9aa47a884e39d5d86b877d6ef468a1a /OpenSim/Data
parentadding LandDataSerializer (not connected anywhere, work-in-progress) (diff)
downloadopensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.zip
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.gz
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.bz2
opensim-SC_OLD-ee205e7e812e170f670e690a4e0fa9caa652f226.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserAccountData.cs2
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs2
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs12
-rw-r--r--OpenSim/Data/MySQL/MySQLLegacyRegionData.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs4
-rw-r--r--OpenSim/Data/NHibernate/NHibernateManager.cs2
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs6
-rw-r--r--OpenSim/Data/RegionProfileData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs2
-rw-r--r--OpenSim/Data/Tests/BasicRegionTest.cs36
-rw-r--r--OpenSim/Data/Tests/BasicUserTest.cs22
-rw-r--r--OpenSim/Data/UserDataBase.cs2
16 files changed, 55 insertions, 55 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index d193cf5..25f7cf0 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -175,7 +175,7 @@ namespace OpenSim.Data.MSSQL
175 (@id, @name, @description, @assetType, @local, 175 (@id, @name, @description, @assetType, @local,
176 @temporary, @create_time, @access_time, @data)"; 176 @temporary, @create_time, @access_time, @data)";
177 177
178 string assetName = asset.Name; 178 string assetName = asset.Name;
179 if (asset.Name.Length > 64) 179 if (asset.Name.Length > 64)
180 { 180 {
181 assetName = asset.Name.Substring(0, 64); 181 assetName = asset.Name.Substring(0, 64);
@@ -223,7 +223,7 @@ namespace OpenSim.Data.MSSQL
223 local = @local, temporary = @temporary, data = @data 223 local = @local, temporary = @temporary, data = @data
224 WHERE id = @keyId;"; 224 WHERE id = @keyId;";
225 225
226 string assetName = asset.Name; 226 string assetName = asset.Name;
227 if (asset.Name.Length > 64) 227 if (asset.Name.Length > 64)
228 { 228 {
229 assetName = asset.Name.Substring(0, 64); 229 assetName = asset.Name.Substring(0, 64);
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 27a4e70..1482184 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -428,7 +428,7 @@ namespace OpenSim.Data.MSSQL
428 @inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType, 428 @inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType,
429 @creationDate, @groupID, @groupOwned, @flags)"; 429 @creationDate, @groupID, @groupOwned, @flags)";
430 430
431 string itemName = item.Name; 431 string itemName = item.Name;
432 if (item.Name.Length > 64) 432 if (item.Name.Length > 64)
433 { 433 {
434 itemName = item.Name.Substring(0, 64); 434 itemName = item.Name.Substring(0, 64);
@@ -529,7 +529,7 @@ namespace OpenSim.Data.MSSQL
529 { 529 {
530 itemDesc = item.Description.Substring(0, 128); 530 itemDesc = item.Description.Substring(0, 128);
531 m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length.ToString() + " to " + itemDesc.Length.ToString() + " characters on update"); 531 m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length.ToString() + " to " + itemDesc.Length.ToString() + " characters on update");
532 } 532 }
533 533
534 using (AutoClosingSqlCommand command = database.Query(sql)) 534 using (AutoClosingSqlCommand command = database.Query(sql))
535 { 535 {
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index adedcce..e26a830 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Data.MSSQL
146 sceneObjectPart.Name, sceneObjectPart.UUID, sceneObjectPart.GroupPosition, groupID); 146 sceneObjectPart.Name, sceneObjectPart.UUID, sceneObjectPart.GroupPosition, groupID);
147 147
148 sceneObjectPart.UUID = groupID; 148 sceneObjectPart.UUID = groupID;
149 } 149 }
150 150
151 grp = new SceneObjectGroup(sceneObjectPart); 151 grp = new SceneObjectGroup(sceneObjectPart);
152 } 152 }
diff --git a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs
index e0c0ed6..38be9f4 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Data.MSSQL
52 conn.Open(); 52 conn.Open();
53 Migration m = new Migration(conn, GetType().Assembly, "UserStore"); 53 Migration m = new Migration(conn, GetType().Assembly, "UserStore");
54 m.Update(); 54 m.Update();
55 } 55 }
56 } 56 }
57 57
58 public List<UserAccountData> Query(UUID principalID, UUID scopeID, string query) 58 public List<UserAccountData> Query(UUID principalID, UUID scopeID, string query)
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index 6efb89d..3ef1053 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -1146,7 +1146,7 @@ ELSE
1146 if (reader.IsDBNull(reader.GetOrdinal("homeRegionID"))) 1146 if (reader.IsDBNull(reader.GetOrdinal("homeRegionID")))
1147 retval.HomeRegionID = UUID.Zero; 1147 retval.HomeRegionID = UUID.Zero;
1148 else 1148 else
1149 retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]); 1149 retval.HomeRegionID = new UUID((Guid)reader["homeRegionID"]);
1150 1150
1151 retval.Created = Convert.ToInt32(reader["created"].ToString()); 1151 retval.Created = Convert.ToInt32(reader["created"].ToString());
1152 retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); 1152 retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
@@ -1200,7 +1200,7 @@ ELSE
1200 if (reader.IsDBNull(reader.GetOrdinal("partner"))) 1200 if (reader.IsDBNull(reader.GetOrdinal("partner")))
1201 retval.Partner = UUID.Zero; 1201 retval.Partner = UUID.Zero;
1202 else 1202 else
1203 retval.Partner = new UUID((Guid)reader["partner"]); 1203 retval.Partner = new UUID((Guid)reader["partner"]);
1204 } 1204 }
1205 else 1205 else
1206 { 1206 {
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 66c34fe..0502b2b 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -204,7 +204,7 @@ namespace OpenSim.Data.MySQL
204 "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)", 204 "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?data)",
205 _dbConnection.Connection); 205 _dbConnection.Connection);
206 206
207 string assetName = asset.Name; 207 string assetName = asset.Name;
208 if (asset.Name.Length > 64) 208 if (asset.Name.Length > 64)
209 { 209 {
210 assetName = asset.Name.Substring(0, 64); 210 assetName = asset.Name.Substring(0, 64);
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 4521a0f..0eecf06 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -325,10 +325,10 @@ namespace OpenSim.Data.MySQL
325 UUID GroupID = UUID.Zero; 325 UUID GroupID = UUID.Zero;
326 UUID.TryParse((string)reader["avatarID"], out Owner); 326 UUID.TryParse((string)reader["avatarID"], out Owner);
327 UUID.TryParse((string)reader["groupID"], out GroupID); 327 UUID.TryParse((string)reader["groupID"], out GroupID);
328 item.Owner = Owner; 328 item.Owner = Owner;
329 item.GroupID = GroupID; 329 item.GroupID = GroupID;
330 330
331 // Rest of the parsing. If these UUID's fail, we're dead anyway 331 // Rest of the parsing. If these UUID's fail, we're dead anyway
332 item.ID = new UUID((string) reader["inventoryID"]); 332 item.ID = new UUID((string) reader["inventoryID"]);
333 item.AssetID = new UUID((string) reader["assetID"]); 333 item.AssetID = new UUID((string) reader["assetID"]);
334 item.AssetType = (int) reader["assetType"]; 334 item.AssetType = (int) reader["assetType"];
@@ -472,7 +472,7 @@ namespace OpenSim.Data.MySQL
472 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate" 472 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate"
473 + ", ?groupID, ?groupOwned, ?flags)"; 473 + ", ?groupID, ?groupOwned, ?flags)";
474 474
475 string itemName = item.Name; 475 string itemName = item.Name;
476 if (item.Name.Length > 64) 476 if (item.Name.Length > 64)
477 { 477 {
478 itemName = item.Name.Substring(0, 64); 478 itemName = item.Name.Substring(0, 64);
@@ -484,7 +484,7 @@ namespace OpenSim.Data.MySQL
484 { 484 {
485 itemDesc = item.Description.Substring(0, 128); 485 itemDesc = item.Description.Substring(0, 128);
486 m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length + " to " + itemDesc.Length + " characters on add item"); 486 m_log.Warn("[INVENTORY DB]: Description field truncated from " + item.Description.Length + " to " + itemDesc.Length + " characters on add item");
487 } 487 }
488 488
489 try 489 try
490 { 490 {
@@ -590,12 +590,12 @@ namespace OpenSim.Data.MySQL
590 "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) VALUES "; 590 "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) VALUES ";
591 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; 591 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)";
592 592
593 string folderName = folder.Name; 593 string folderName = folder.Name;
594 if (folderName.Length > 64) 594 if (folderName.Length > 64)
595 { 595 {
596 folderName = folderName.Substring(0, 64); 596 folderName = folderName.Substring(0, 64);
597 m_log.Warn("[INVENTORY DB]: Name field truncated from " + folder.Name.Length + " to " + folderName.Length + " characters on add folder"); 597 m_log.Warn("[INVENTORY DB]: Name field truncated from " + folder.Name.Length + " to " + folderName.Length + " characters on add folder");
598 } 598 }
599 599
600 database.CheckConnection(); 600 database.CheckConnection();
601 601
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
index ed62172..c2dd788 100644
--- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
@@ -464,7 +464,7 @@ namespace OpenSim.Data.MySQL
464 prim.Name, prim.UUID, prim.GroupPosition, groupID); 464 prim.Name, prim.UUID, prim.GroupPosition, groupID);
465 465
466 prim.UUID = groupID; 466 prim.UUID = groupID;
467 } 467 }
468 468
469 grp = new SceneObjectGroup(prim); 469 grp = new SceneObjectGroup(prim);
470 } 470 }
@@ -533,7 +533,7 @@ namespace OpenSim.Data.MySQL
533 /// <summary> 533 /// <summary>
534 /// Load in a prim's persisted inventory. 534 /// Load in a prim's persisted inventory.
535 /// </summary> 535 /// </summary>
536 /// <param name="prim">The prim</param> 536 /// <param name="prim">The prim</param>
537 private void LoadItems(SceneObjectPart prim) 537 private void LoadItems(SceneObjectPart prim)
538 { 538 {
539 lock (m_Connection) 539 lock (m_Connection)
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 537ef6c..04f872f 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -632,7 +632,7 @@ namespace OpenSim.Data.MySQL
632 UUID zero = UUID.Zero; 632 UUID zero = UUID.Zero;
633 if (user.ID == zero) 633 if (user.ID == zero)
634 { 634 {
635 return; 635 return;
636 } 636 }
637 MySQLSuperManager dbm = GetLockedConnection("AddNewUserProfile"); 637 MySQLSuperManager dbm = GetLockedConnection("AddNewUserProfile");
638 638
@@ -666,7 +666,7 @@ namespace OpenSim.Data.MySQL
666 { 666 {
667 UUID zero = UUID.Zero; 667 UUID zero = UUID.Zero;
668 if (agent.ProfileID == zero || agent.SessionID == zero) 668 if (agent.ProfileID == zero || agent.SessionID == zero)
669 return; 669 return;
670 670
671 MySQLSuperManager dbm = GetLockedConnection("AddNewUserAgent"); 671 MySQLSuperManager dbm = GetLockedConnection("AddNewUserAgent");
672 try 672 try
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs
index 7c5cf33..2e7081e 100644
--- a/OpenSim/Data/NHibernate/NHibernateManager.cs
+++ b/OpenSim/Data/NHibernate/NHibernateManager.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Data.NHibernate
155 m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id); 155 m_log.ErrorFormat("[NHIBERNATE] {0} of id {1} loading threw exception: " + e.ToString(), type.Name, id);
156 } 156 }
157 return obj; 157 return obj;
158 } 158 }
159 } 159 }
160 160
161 /// <summary> 161 /// <summary>
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 73b630f..1b0c4c9 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Data.NHibernate
86 m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid); 86 m_log.InfoFormat("[NHIBERNATE] GetUserByUUID: {0} ", uuid);
87 87
88 user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid); 88 user = (UserProfileData)manager.Get(typeof(UserProfileData), uuid);
89 if (user != null) 89 if (user != null)
90 { 90 {
91 UserAgentData agent = GetAgentByUUID(uuid); 91 UserAgentData agent = GetAgentByUUID(uuid);
92 if (agent != null) 92 if (agent != null)
@@ -245,7 +245,7 @@ namespace OpenSim.Data.NHibernate
245 UserProfileData user=GetUserByUUID(agentID); 245 UserProfileData user=GetUserByUUID(agentID);
246 user.WebLoginKey = webLoginKey; 246 user.WebLoginKey = webLoginKey;
247 UpdateUserProfile(user); 247 UpdateUserProfile(user);
248 return; 248 return;
249 } 249 }
250 250
251 public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms) 251 public override void AddNewUserFriend(UUID ownerId, UUID friendId, uint perms)
@@ -258,7 +258,7 @@ namespace OpenSim.Data.NHibernate
258 { 258 {
259 manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms)); 259 manager.Insert(new UserFriend(UUID.Random(), friendId, ownerId, perms));
260 } 260 }
261 return; 261 return;
262 } 262 }
263 263
264 private bool FriendRelationExists(UUID ownerId, UUID friendId) 264 private bool FriendRelationExists(UUID ownerId, UUID friendId)
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs
index 1d96631..86d7f6b 100644
--- a/OpenSim/Data/RegionProfileData.cs
+++ b/OpenSim/Data/RegionProfileData.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Data
137 public uint maturity; 137 public uint maturity;
138 138
139 139
140 //Data Wrappers 140 //Data Wrappers
141 public string RegionName 141 public string RegionName
142 { 142 {
143 get { return regionName; } 143 get { return regionName; }
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index ea076fe..d22a3ec 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -496,7 +496,7 @@ namespace OpenSim.Data.SQLite
496 { 496 {
497 //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID); 497 //m_log.DebugFormat("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID);
498 498
499 DataTable dbItems = ds.Tables["primitems"]; 499 DataTable dbItems = ds.Tables["primitems"];
500 String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); 500 String sql = String.Format("primID = '{0}'", prim.UUID.ToString());
501 DataRow[] dbItemRows = dbItems.Select(sql); 501 DataRow[] dbItemRows = dbItems.Select(sql);
502 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); 502 IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>();
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs
index c66ab7c..ca1fcfa 100644
--- a/OpenSim/Data/Tests/BasicRegionTest.cs
+++ b/OpenSim/Data/Tests/BasicRegionTest.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Data.Tests
60 public UUID item2; 60 public UUID item2;
61 public UUID item3; 61 public UUID item3;
62 62
63 public static Random random; 63 public static Random random;
64 64
65 public string itemname1 = "item1"; 65 public string itemname1 = "item1";
66 66
@@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests
173 UUID tmp0 = UUID.Random(); 173 UUID tmp0 = UUID.Random();
174 UUID tmp1 = UUID.Random(); 174 UUID tmp1 = UUID.Random();
175 UUID tmp2 = UUID.Random(); 175 UUID tmp2 = UUID.Random();
176 UUID tmp3 = UUID.Random(); 176 UUID tmp3 = UUID.Random();
177 UUID newregion = UUID.Random(); 177 UUID newregion = UUID.Random();
178 SceneObjectPart p1 = NewSOP("SoP 1",tmp1); 178 SceneObjectPart p1 = NewSOP("SoP 1",tmp1);
179 SceneObjectPart p2 = NewSOP("SoP 2",tmp2); 179 SceneObjectPart p2 = NewSOP("SoP 2",tmp2);
@@ -224,7 +224,7 @@ namespace OpenSim.Data.Tests
224 random.NextBytes(partsys); 224 random.NextBytes(partsys);
225 DateTime expires = new DateTime(2008, 12, 20); 225 DateTime expires = new DateTime(2008, 12, 20);
226 DateTime rezzed = new DateTime(2009, 07, 15); 226 DateTime rezzed = new DateTime(2009, 07, 15);
227 Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); 227 Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
228 Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); 228 Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
229 Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); 229 Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
230 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); 230 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
@@ -261,7 +261,7 @@ namespace OpenSim.Data.Tests
261 sop.Shape = pbshap; 261 sop.Shape = pbshap;
262 sop.GroupPosition = groupos; 262 sop.GroupPosition = groupos;
263 sop.RotationOffset = rotoff; 263 sop.RotationOffset = rotoff;
264 sop.CreatorID = creator; 264 sop.CreatorID = creator;
265 sop.InventorySerial = iserial; 265 sop.InventorySerial = iserial;
266 sop.TaskInventory = dic; 266 sop.TaskInventory = dic;
267 sop.ObjectFlags = objf; 267 sop.ObjectFlags = objf;
@@ -306,7 +306,7 @@ namespace OpenSim.Data.Tests
306 Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))"); 306 Assert.That(expires,Is.EqualTo(sop.Expires), "Assert.That(expires,Is.EqualTo(sop.Expires))");
307 Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))"); 307 Assert.That(rezzed,Is.EqualTo(sop.Rezzed), "Assert.That(rezzed,Is.EqualTo(sop.Rezzed))");
308 Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))"); 308 Assert.That(offset,Is.EqualTo(sop.OffsetPosition), "Assert.That(offset,Is.EqualTo(sop.OffsetPosition))");
309 Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))"); 309 Assert.That(velocity,Is.EqualTo(sop.Velocity), "Assert.That(velocity,Is.EqualTo(sop.Velocity))");
310 Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))"); 310 Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity), "Assert.That(angvelo,Is.EqualTo(sop.AngularVelocity))");
311 Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))"); 311 Assert.That(accel,Is.EqualTo(sop.Acceleration), "Assert.That(accel,Is.EqualTo(sop.Acceleration))");
312 Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))"); 312 Assert.That(description,Is.EqualTo(sop.Description), "Assert.That(description,Is.EqualTo(sop.Description))");
@@ -319,7 +319,7 @@ namespace OpenSim.Data.Tests
319 Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))"); 319 Assert.That(scale,Is.EqualTo(sop.Scale), "Assert.That(scale,Is.EqualTo(sop.Scale))");
320 Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))"); 320 Assert.That(updatef,Is.EqualTo(sop.UpdateFlag), "Assert.That(updatef,Is.EqualTo(sop.UpdateFlag))");
321 321
322 // This is necessary or object will not be inserted in DB 322 // This is necessary or object will not be inserted in DB
323 sop.ObjectFlags = 0; 323 sop.ObjectFlags = 0;
324 324
325 SceneObjectGroup sog = new SceneObjectGroup(sop); 325 SceneObjectGroup sog = new SceneObjectGroup(sop);
@@ -332,11 +332,11 @@ namespace OpenSim.Data.Tests
332 // Makes sure there are no double insertions: 332 // Makes sure there are no double insertions:
333 db.StoreObject(sog,region3); 333 db.StoreObject(sog,region3);
334 sogs = db.LoadObjects(region3); 334 sogs = db.LoadObjects(region3);
335 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))"); 335 Assert.That(sogs.Count, Is.EqualTo(1), "Assert.That(sogs.Count, Is.EqualTo(1))");
336 336
337 337
338 // Tests if the parameters were inserted correctly 338 // Tests if the parameters were inserted correctly
339 SceneObjectPart p = sogs[0].RootPart; 339 SceneObjectPart p = sogs[0].RootPart;
340 Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))"); 340 Assert.That(regionh,Is.EqualTo(p.RegionHandle), "Assert.That(regionh,Is.EqualTo(p.RegionHandle))");
341 //Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))"); 341 //Assert.That(localid,Is.EqualTo(p.LocalId), "Assert.That(localid,Is.EqualTo(p.LocalId))");
342 Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))"); 342 Assert.That(groupos,Is.EqualTo(p.GroupPosition), "Assert.That(groupos,Is.EqualTo(p.GroupPosition))");
@@ -402,7 +402,7 @@ namespace OpenSim.Data.Tests
402 random.NextBytes(partsys); 402 random.NextBytes(partsys);
403 DateTime expires = new DateTime(2010, 12, 20); 403 DateTime expires = new DateTime(2010, 12, 20);
404 DateTime rezzed = new DateTime(2005, 07, 15); 404 DateTime rezzed = new DateTime(2005, 07, 15);
405 Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); 405 Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
406 Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); 406 Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
407 Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); 407 Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
408 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); 408 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
@@ -418,7 +418,7 @@ namespace OpenSim.Data.Tests
418 PrimitiveBaseShape pbshap = new PrimitiveBaseShape(); 418 PrimitiveBaseShape pbshap = new PrimitiveBaseShape();
419 pbshap = PrimitiveBaseShape.Default; 419 pbshap = PrimitiveBaseShape.Default;
420 Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next()); 420 Vector3 scale = new Vector3(random.Next(),random.Next(),random.Next());
421 byte updatef = (byte) random.Next(127); 421 byte updatef = (byte) random.Next(127);
422 422
423 // Updates the region with new values 423 // Updates the region with new values
424 SceneObjectGroup sog2 = FindSOG("Adam West", region3); 424 SceneObjectGroup sog2 = FindSOG("Adam West", region3);
@@ -427,7 +427,7 @@ namespace OpenSim.Data.Tests
427 sog2.RootPart.Shape = pbshap; 427 sog2.RootPart.Shape = pbshap;
428 sog2.RootPart.GroupPosition = groupos; 428 sog2.RootPart.GroupPosition = groupos;
429 sog2.RootPart.RotationOffset = rotoff; 429 sog2.RootPart.RotationOffset = rotoff;
430 sog2.RootPart.CreatorID = creator; 430 sog2.RootPart.CreatorID = creator;
431 sog2.RootPart.TaskInventory = dic; 431 sog2.RootPart.TaskInventory = dic;
432 sog2.RootPart.Name = name; 432 sog2.RootPart.Name = name;
433 sog2.RootPart.Material = material; 433 sog2.RootPart.Material = material;
@@ -492,7 +492,7 @@ namespace OpenSim.Data.Tests
492 { 492 {
493 UUID tmp = UUID.Random(); 493 UUID tmp = UUID.Random();
494 SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp); 494 SceneObjectPart sop = NewSOP(("Test SOP " + i.ToString()),tmp);
495 Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next()); 495 Vector3 groupos = new Vector3(random.Next(),random.Next(),random.Next());
496 Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next()); 496 Vector3 offset = new Vector3(random.Next(),random.Next(),random.Next());
497 Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next()); 497 Quaternion rotoff = new Quaternion(random.Next(),random.Next(),random.Next(),random.Next());
498 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next()); 498 Vector3 velocity = new Vector3(random.Next(),random.Next(),random.Next());
@@ -648,7 +648,7 @@ namespace OpenSim.Data.Tests
648 { 648 {
649 InventoryItemBase i = new InventoryItemBase(); 649 InventoryItemBase i = new InventoryItemBase();
650 UUID id = UUID.Random(); 650 UUID id = UUID.Random();
651 i.ID = id; 651 i.ID = id;
652 UUID folder = UUID.Random(); 652 UUID folder = UUID.Random();
653 i.Folder = folder; 653 i.Folder = folder;
654 UUID owner = UUID.Random(); 654 UUID owner = UUID.Random();
@@ -666,13 +666,13 @@ namespace OpenSim.Data.Tests
666 i.NextPermissions = nextperm; 666 i.NextPermissions = nextperm;
667 uint curperm = (uint) random.Next(); 667 uint curperm = (uint) random.Next();
668 i.CurrentPermissions = curperm; 668 i.CurrentPermissions = curperm;
669 uint baseperm = (uint) random.Next(); 669 uint baseperm = (uint) random.Next();
670 i.BasePermissions = baseperm; 670 i.BasePermissions = baseperm;
671 uint eoperm = (uint) random.Next(); 671 uint eoperm = (uint) random.Next();
672 i.EveryOnePermissions = eoperm; 672 i.EveryOnePermissions = eoperm;
673 int assettype = random.Next(); 673 int assettype = random.Next();
674 i.AssetType = assettype; 674 i.AssetType = assettype;
675 UUID groupid = UUID.Random(); 675 UUID groupid = UUID.Random();
676 i.GroupID = groupid; 676 i.GroupID = groupid;
677 bool groupown = true; 677 bool groupown = true;
678 i.GroupOwned = groupown; 678 i.GroupOwned = groupown;
@@ -1010,7 +1010,7 @@ namespace OpenSim.Data.Tests
1010 1010
1011 private SceneObjectPart NewSOP(string name, UUID uuid) 1011 private SceneObjectPart NewSOP(string name, UUID uuid)
1012 { 1012 {
1013 SceneObjectPart sop = new SceneObjectPart(); 1013 SceneObjectPart sop = new SceneObjectPart();
1014 sop.Name = name; 1014 sop.Name = name;
1015 sop.Description = name; 1015 sop.Description = name;
1016 sop.Text = RandomName(); 1016 sop.Text = RandomName();
@@ -1042,12 +1042,12 @@ namespace OpenSim.Data.Tests
1042 int size = random.Next(5,12); 1042 int size = random.Next(5,12);
1043 char ch ; 1043 char ch ;
1044 for (int i=0; i<size; i++) 1044 for (int i=0; i<size; i++)
1045 { 1045 {
1046 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; 1046 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
1047 name.Append(ch); 1047 name.Append(ch);
1048 } 1048 }
1049 return name.ToString(); 1049 return name.ToString();
1050 } 1050 }
1051// private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name) 1051// private InventoryFolderBase NewFolder(UUID id, UUID parent, UUID owner, string name)
1052// { 1052// {
1053// InventoryFolderBase f = new InventoryFolderBase(); 1053// InventoryFolderBase f = new InventoryFolderBase();
diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs
index f9feb9b..1f472a5 100644
--- a/OpenSim/Data/Tests/BasicUserTest.cs
+++ b/OpenSim/Data/Tests/BasicUserTest.cs
@@ -152,7 +152,7 @@ namespace OpenSim.Data.Tests
152 u1.FirstName = "Ugly"; 152 u1.FirstName = "Ugly";
153 153
154 db.UpdateUserProfile(u1); 154 db.UpdateUserProfile(u1);
155 Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))"); 155 Assert.That("Ugly",Is.EqualTo(u1.FirstName), "Assert.That(\"Ugly\",Is.EqualTo(u1.FirstName))");
156 } 156 }
157 157
158 [Test] 158 [Test]
@@ -174,7 +174,7 @@ namespace OpenSim.Data.Tests
174 db.AddNewUserProfile(u4); 174 db.AddNewUserProfile(u4);
175 Assert.That(db.GetUserByUUID(zero),Is.Null); 175 Assert.That(db.GetUserByUUID(zero),Is.Null);
176 Assert.That(db.GetUserByUUID(user4),Is.Null); 176 Assert.That(db.GetUserByUUID(user4),Is.Null);
177 } 177 }
178 178
179 [Test] 179 [Test]
180 public void T015_UserPersistency() 180 public void T015_UserPersistency()
@@ -218,7 +218,7 @@ namespace OpenSim.Data.Tests
218 218
219 //HomeRegionX and HomeRegionY must only use 24 bits 219 //HomeRegionX and HomeRegionY must only use 24 bits
220 homeregx = ((homeregx << 8) >> 8); 220 homeregx = ((homeregx << 8) >> 8);
221 homeregy = ((homeregy << 8) >> 8); 221 homeregy = ((homeregy << 8) >> 8);
222 222
223 u.ID = id; 223 u.ID = id;
224 u.WebLoginKey = webloginkey; 224 u.WebLoginKey = webloginkey;
@@ -299,7 +299,7 @@ namespace OpenSim.Data.Tests
299 uint homeregx = (uint) random.Next(); 299 uint homeregx = (uint) random.Next();
300 uint homeregy = (uint) random.Next(); 300 uint homeregy = (uint) random.Next();
301 Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5)); 301 Vector3 homeloc = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
302 Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5)); 302 Vector3 homelookat = new Vector3((float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5),(float)Math.Round(random.NextDouble(),5));
303 int created = random.Next(); 303 int created = random.Next();
304 int lastlogin = random.Next(); 304 int lastlogin = random.Next();
305 string userinvuri = RandomName(); 305 string userinvuri = RandomName();
@@ -359,7 +359,7 @@ namespace OpenSim.Data.Tests
359 Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))"); 359 Assert.That(email,Is.EqualTo(u1a.Email), "Assert.That(email,Is.EqualTo(u1a.Email))");
360 Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))"); 360 Assert.That(passhash,Is.EqualTo(u1a.PasswordHash), "Assert.That(passhash,Is.EqualTo(u1a.PasswordHash))");
361 Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))"); 361 Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt), "Assert.That(passsalt,Is.EqualTo(u1a.PasswordSalt))");
362 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))"); 362 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
363 Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))"); 363 Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX), "Assert.That(homeregx,Is.EqualTo(u1a.HomeRegionX))");
364 Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))"); 364 Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY), "Assert.That(homeregy,Is.EqualTo(u1a.HomeRegionY))");
365 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))"); 365 Assert.That(homereg,Is.EqualTo(u1a.HomeRegion), "Assert.That(homereg,Is.EqualTo(u1a.HomeRegion))");
@@ -426,7 +426,7 @@ namespace OpenSim.Data.Tests
426 UserAgentData a2 = db.GetAgentByName(fname2,lname2); 426 UserAgentData a2 = db.GetAgentByName(fname2,lname2);
427 UserAgentData a3 = db.GetAgentByName(name3); 427 UserAgentData a3 = db.GetAgentByName(name3);
428 Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))"); 428 Assert.That(user2,Is.EqualTo(a2.ProfileID), "Assert.That(user2,Is.EqualTo(a2.ProfileID))");
429 Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))"); 429 Assert.That(user3,Is.EqualTo(a3.ProfileID), "Assert.That(user3,Is.EqualTo(a3.ProfileID))");
430 } 430 }
431 431
432 [Test] 432 [Test]
@@ -501,11 +501,11 @@ namespace OpenSim.Data.Tests
501 db.AddNewUserFriend(user1,user3, 2); 501 db.AddNewUserFriend(user1,user3, 2);
502 db.AddNewUserFriend(user1,user2, 4); 502 db.AddNewUserFriend(user1,user2, 4);
503 List<FriendListItem> fl1 = db.GetUserFriendList(user1); 503 List<FriendListItem> fl1 = db.GetUserFriendList(user1);
504 Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))"); 504 Assert.That(fl1.Count,Is.EqualTo(2), "Assert.That(fl1.Count,Is.EqualTo(2))");
505 perms.Add(user2,1); 505 perms.Add(user2,1);
506 perms.Add(user3,2); 506 perms.Add(user3,2);
507 for (int i = 0; i < fl1.Count; i++) 507 for (int i = 0; i < fl1.Count; i++)
508 { 508 {
509 Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))"); 509 Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner), "Assert.That(user1,Is.EqualTo(fl1[i].FriendListOwner))");
510 friends.Add(fl1[i].Friend,1); 510 friends.Add(fl1[i].Friend,1);
511 temp = perms[fl1[i].Friend]; 511 temp = perms[fl1[i].Friend];
@@ -544,7 +544,7 @@ namespace OpenSim.Data.Tests
544 db.UpdateUserFriendPerms(user1, user3, 4); 544 db.UpdateUserFriendPerms(user1, user3, 4);
545 545
546 fl1 = db.GetUserFriendList(user1); 546 fl1 = db.GetUserFriendList(user1);
547 Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))"); 547 Assert.That(fl1[0].FriendPerms,Is.EqualTo(4), "Assert.That(fl1[0].FriendPerms,Is.EqualTo(4))");
548 } 548 }
549 549
550 [Test] 550 [Test]
@@ -560,7 +560,7 @@ namespace OpenSim.Data.Tests
560 [Test] 560 [Test]
561 public void T041_UserAppearancePersistency() 561 public void T041_UserAppearancePersistency()
562 { 562 {
563 AvatarAppearance appear = new AvatarAppearance(); 563 AvatarAppearance appear = new AvatarAppearance();
564 UUID owner = UUID.Random(); 564 UUID owner = UUID.Random();
565 int serial = random.Next(); 565 int serial = random.Next();
566 byte[] visualp = new byte[218]; 566 byte[] visualp = new byte[218];
@@ -698,7 +698,7 @@ namespace OpenSim.Data.Tests
698 int size = random.Next(5,12); 698 int size = random.Next(5,12);
699 char ch ; 699 char ch ;
700 for (int i=0; i<size; i++) 700 for (int i=0; i<size; i++)
701 { 701 {
702 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ; 702 ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
703 name.Append(ch); 703 name.Append(ch);
704 } 704 }
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index 84926f2..3d370da 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Data
43 public abstract UserAgentData GetAgentByUUID(UUID user); 43 public abstract UserAgentData GetAgentByUUID(UUID user);
44 public abstract UserAgentData GetAgentByName(string name); 44 public abstract UserAgentData GetAgentByName(string name);
45 public abstract UserAgentData GetAgentByName(string fname, string lname); 45 public abstract UserAgentData GetAgentByName(string fname, string lname);
46 public UserProfileData GetUserByUri(Uri uri) { return null; } 46 public UserProfileData GetUserByUri(Uri uri) { return null; }
47 public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey); 47 public abstract void StoreWebLoginKey(UUID agentID, UUID webLoginKey);
48 public abstract void AddNewUserProfile(UserProfileData user); 48 public abstract void AddNewUserProfile(UserProfileData user);
49 49