From 4c61fcfc401cdf08f5027e3bce21c4b465711c60 Mon Sep 17 00:00:00 2001 From: Kunnis Date: Sat, 5 Dec 2009 09:54:33 -0600 Subject: Getting rid of the dead field RootInventoryFolderId on UserProfileData, It's not even stored in mysql. Signed-off-by: Melanie --- OpenSim/Data/SQLite/SQLiteUserData.cs | 7 +++++-- OpenSim/Data/Tests/BasicUserTest.cs | 9 ++------- OpenSim/Framework/Communications/Services/LoginService.cs | 2 -- OpenSim/Framework/Communications/UserManagerBase.cs | 3 --- OpenSim/Framework/UserProfileData.cs | 8 -------- OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | 1 - 6 files changed, 7 insertions(+), 23 deletions(-) diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index b9f3515..caddcf8 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -819,7 +819,10 @@ namespace OpenSim.Data.SQLite SQLiteUtil.createCol(users, "homeLookAtZ", typeof (Double)); SQLiteUtil.createCol(users, "created", typeof (Int32)); SQLiteUtil.createCol(users, "lastLogin", typeof (Int32)); + + //TODO: Please delete this column. It's now a brick SQLiteUtil.createCol(users, "rootInventoryFolderID", typeof (String)); + SQLiteUtil.createCol(users, "userInventoryURI", typeof (String)); SQLiteUtil.createCol(users, "userAssetURI", typeof (String)); SQLiteUtil.createCol(users, "profileCanDoMask", typeof (Int32)); @@ -980,7 +983,6 @@ namespace OpenSim.Data.SQLite user.Created = Convert.ToInt32(row["created"]); user.LastLogin = Convert.ToInt32(row["lastLogin"]); - user.RootInventoryFolderID = new UUID((String) row["rootInventoryFolderID"]); user.UserInventoryURI = (String) row["userInventoryURI"]; user.UserAssetURI = (String) row["userAssetURI"]; user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); @@ -1026,7 +1028,8 @@ namespace OpenSim.Data.SQLite row["created"] = user.Created; row["lastLogin"] = user.LastLogin; - row["rootInventoryFolderID"] = user.RootInventoryFolderID.ToString(); + //TODO: Get rid of rootInventoryFolderID in a safe way. + row["rootInventoryFolderID"] = UUID.Zero.ToString(); row["userInventoryURI"] = user.UserInventoryURI; row["userAssetURI"] = user.UserAssetURI; row["profileCanDoMask"] = user.CanDoMask; diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs index 1f472a5..d3b6041 100644 --- a/OpenSim/Data/Tests/BasicUserTest.cs +++ b/OpenSim/Data/Tests/BasicUserTest.cs @@ -170,8 +170,8 @@ namespace OpenSim.Data.Tests { UserProfileData u0 = NewUser(zero,fname0,lname0); UserProfileData u4 = NewUser(user4,fname2,lname2); - db.AddNewUserProfile(u0); - db.AddNewUserProfile(u4); + db.AddNewUserProfile(u0); //UserID 0 should fail to save. + db.AddNewUserProfile(u4); //The first name and last name are already in use (from T010), so this should fail too Assert.That(db.GetUserByUUID(zero),Is.Null); Assert.That(db.GetUserByUUID(user4),Is.Null); } @@ -267,8 +267,6 @@ namespace OpenSim.Data.Tests Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); - // RootInventoryFolderID is not tested because it is saved in SQLite, - // but not in MySQL Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI), "Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI))"); Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); @@ -367,8 +365,6 @@ namespace OpenSim.Data.Tests Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); - // RootInventoryFolderID is not tested because it is saved in SQLite, - // but not in MySQL Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask), "Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask))"); @@ -395,7 +391,6 @@ namespace OpenSim.Data.Tests Assert.That(u1a, Constraints.PropertyCompareConstraint(u) .IgnoreProperty(x=>x.HomeRegionX) .IgnoreProperty(x=>x.HomeRegionY) - .IgnoreProperty(x=>x.RootInventoryFolderID) ); } diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index b652299..57ca704 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs @@ -244,7 +244,6 @@ namespace OpenSim.Framework.Communications.Services InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); ArrayList InventoryRoot = new ArrayList(); InventoryRoot.Add(InventoryRootHash); - userProfile.RootInventoryFolderID = inventData.RootFolderID; logResponse.InventoryRoot = InventoryRoot; logResponse.InventorySkeleton = AgentInventoryArray; @@ -501,7 +500,6 @@ namespace OpenSim.Framework.Communications.Services InventoryRootHash["folder_id"] = inventData.RootFolderID.ToString(); ArrayList InventoryRoot = new ArrayList(); InventoryRoot.Add(InventoryRootHash); - userProfile.RootInventoryFolderID = inventData.RootFolderID; // Inventory Library Section diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index bf4f331..4f0af06 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -697,9 +697,6 @@ namespace OpenSim.Framework.Communications // local service (standalone) m_log.Debug("[USERSTORAGE]: using IInventoryService to create user's inventory"); m_InventoryService.CreateUserInventory(userProf.ID); - InventoryFolderBase rootfolder = m_InventoryService.GetRootFolder(userProf.ID); - if (rootfolder != null) - userProf.RootInventoryFolderID = rootfolder.ID; } else if (m_commsManager.InterServiceInventoryService != null) { diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 413f152..9bac739 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs @@ -119,8 +119,6 @@ namespace OpenSim.Framework /// private string m_profileUrl; - private UUID m_rootInventoryFolderId; - /// /// The second component of a users account name /// @@ -312,12 +310,6 @@ namespace OpenSim.Framework set { m_lastLogin = value; } } - public UUID RootInventoryFolderID - { - get { return m_rootInventoryFolderId; } - set { m_rootInventoryFolderId = value; } - } - public string UserInventoryURI { get { return m_userInventoryUri; } diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index 62500a2..c727cec 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs @@ -527,7 +527,6 @@ namespace OpenSim.Region.CoreModules.InterGrid userProfile.Partner = UUID.Zero; userProfile.PasswordHash = "$1$"; userProfile.PasswordSalt = ""; - userProfile.RootInventoryFolderID = UUID.Zero; userProfile.SurName = agentData.lastname; userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; userProfile.UserFlags = 0; -- cgit v1.1 From ad2c23d50727c24a64febdeb30f3313622832347 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 7 Dec 2009 14:12:53 +0000 Subject: Stop AuthorizationService from throwing an error if it's not configured. Optional services should not cause red spew when they're not wanted --- .../Services/Connectors/Authorization/AuthorizationServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs index c2ad9db..a1c032e 100644 --- a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs @@ -67,7 +67,7 @@ namespace OpenSim.Services.Connectors IConfig authorizationConfig = source.Configs["AuthorizationService"]; if (authorizationConfig == null) { - m_log.Error("[AUTHORIZATION CONNECTOR]: AuthorizationService missing from OpenSim.ini"); + m_log.Info("[AUTHORIZATION CONNECTOR]: AuthorizationService missing from OpenSim.ini"); throw new Exception("Authorization connector init error"); } -- cgit v1.1