From f8a89a79eb8ae8cc2bfdcbbf2cb498e5293162c3 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 25 Aug 2012 01:09:12 +0100
Subject: Allow multiple calling card type inventory folders to be created.

Modern viewers want to create Friends and All folders of this type inside the root Calling Cards folder.
---
 OpenSim/Services/InventoryService/XInventoryService.cs | 1 +
 1 file changed, 1 insertion(+)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 7518b86..e10e0be 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -311,6 +311,7 @@ namespace OpenSim.Services.InventoryService
             if (folder.Type == (short)AssetType.Folder
                 || folder.Type == (short)AssetType.Unknown
                 || folder.Type == (short)AssetType.OutfitFolder
+                || folder.Type == (short)AssetType.CallingCard
                 || GetFolderForType(folder.Owner, (AssetType)(folder.Type)) == null)
             {
                 XInventoryFolder xFolder = ConvertFromOpenSim(folder);
-- 
cgit v1.1


From a0d178b284050df64d0eb5b9728565fd72615c22 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 25 Aug 2012 02:00:17 +0100
Subject: Following on from f8a89a79, do not allow more than one 'type' folder
 (e.g. calling cards) to be created in the base "My Inventory" user folder.

This is to accomodate situations where viewers will create more than one 'type' subfolder (e.g. calling cards)
But at the same time to prevent multiple such 'system' folders (those in the base "My Inventory" user folder).
This also makes GetFolderForType() only return a folder in the base "My Inventory" folder, if such a type folder exists
---
 .../Services/InventoryService/XInventoryService.cs | 65 ++++++++++++++++------
 1 file changed, 49 insertions(+), 16 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index e10e0be..deacd5a 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -229,10 +229,28 @@ namespace OpenSim.Services.InventoryService
         public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type)
         {
 //            m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID);
+
+            InventoryFolderBase rootFolder = GetRootFolder(principalID);
+
+            if (rootFolder == null)
+            {
+                m_log.WarnFormat(
+                    "[XINVENTORY]: Found no root folder for {0} in GetFolderForType() when looking for {1}",
+                    principalID, type);
+
+                return null;
+            }
+            
+            return GetSystemFolderForType(rootFolder, type);
+        }
+
+        private InventoryFolderBase GetSystemFolderForType(InventoryFolderBase rootFolder, AssetType type)
+        {
+//            m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID);
             
             XInventoryFolder[] folders = m_Database.GetFolders(
-                    new string[] { "agentID", "type"},
-                    new string[] { principalID.ToString(), ((int)type).ToString() });
+                    new string[] { "agentID", "parentFolderID", "type"},
+                    new string[] { rootFolder.Owner.ToString(), rootFolder.ID.ToString(), ((int)type).ToString() });
 
             if (folders.Length == 0)
             {
@@ -308,23 +326,38 @@ namespace OpenSim.Services.InventoryService
             if (check != null)
                 return false;
 
-            if (folder.Type == (short)AssetType.Folder
-                || folder.Type == (short)AssetType.Unknown
-                || folder.Type == (short)AssetType.OutfitFolder
-                || folder.Type == (short)AssetType.CallingCard
-                || GetFolderForType(folder.Owner, (AssetType)(folder.Type)) == null)
-            {
-                XInventoryFolder xFolder = ConvertFromOpenSim(folder);
-                return m_Database.StoreFolder(xFolder);
-            }
-            else
+            if (folder.Type != (short)AssetType.Folder || folder.Type != (short)AssetType.Unknown)
             {
-                m_log.WarnFormat(
-                    "[XINVENTORY]: Folder of type {0} already exists when tried to add {1} to {2} for {3}",
-                    folder.Type, folder.Name, folder.ParentID, folder.Owner);
+                InventoryFolderBase rootFolder = GetRootFolder(folder.Owner);
+
+                if (rootFolder == null)
+                {
+                    m_log.WarnFormat(
+                        "[XINVENTORY]: Found no root folder for {0} in AddFolder() when looking for {1}",
+                        folder.Owner, folder.Type);
+
+                    return false;
+                }
+
+                // Check we're not trying to add this as a system folder.
+                if (folder.ParentID == rootFolder.ID)
+                {
+                    InventoryFolderBase existingSystemFolder
+                        = GetSystemFolderForType(rootFolder, (AssetType)folder.Type);
+
+                    if (existingSystemFolder != null)
+                    {
+                        m_log.WarnFormat(
+                            "[XINVENTORY]: System folder of type {0} already exists when tried to add {1} to {2} for {3}",
+                            folder.Type, folder.Name, folder.ParentID, folder.Owner);
+    
+                        return false;
+                    }
+                }
             }
 
-            return false;
+            XInventoryFolder xFolder = ConvertFromOpenSim(folder);
+            return m_Database.StoreFolder(xFolder);
         }
 
         public virtual bool UpdateFolder(InventoryFolderBase folder)
-- 
cgit v1.1


From 6ea95a329451c803048f179abb4b4ea5014dd7b1 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 25 Aug 2012 17:32:00 +0100
Subject: Fix and refactor region registration. Reorder checks to short-curcuit
 expensive and destructive ones. Properly fix region reservation and
 authentication. Make region moves and flags preservation work again as
 intended. Prevent failes reservation take-over from damging reservation data.

---
 OpenSim/Services/GridService/GridService.cs | 53 +++++++++++++++--------------
 1 file changed, 28 insertions(+), 25 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index aab403a..5bdea06 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -137,9 +137,14 @@ namespace OpenSim.Services.GridService
             if (regionInfos.RegionID == UUID.Zero)
                 return "Invalid RegionID - cannot be zero UUID";
 
-            // This needs better sanity testing. What if regionInfo is registering in
-            // overlapping coords?
             RegionData region = m_Database.Get(regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID);
+            if ((region != null) && (region.RegionID != regionInfos.RegionID))
+            {
+                m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register in coordinates {1}, {2} which are already in use in scope {3}.", 
+                    regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID);
+                return "Region overlaps another region";
+            }
+
             if (region != null)
             {
                 // There is a preexisting record
@@ -176,19 +181,36 @@ namespace OpenSim.Services.GridService
                 }
             }
 
-            if ((region != null) && (region.RegionID != regionInfos.RegionID))
+            // If we get here, the destination is clear. Now for the real check.
+
+            if (!m_AllowDuplicateNames)
             {
-                m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register in coordinates {1}, {2} which are already in use in scope {3}.", 
-                    regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY, scopeID);
-                return "Region overlaps another region";
+                List<RegionData> dupe = m_Database.Get(regionInfos.RegionName, scopeID);
+                if (dupe != null && dupe.Count > 0)
+                {
+                    foreach (RegionData d in dupe)
+                    {
+                        if (d.RegionID != regionInfos.RegionID)
+                        {
+                            m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register duplicate name with ID {1}.", 
+                                regionInfos.RegionName, regionInfos.RegionID);
+                            return "Duplicate region name";
+                        }
+                    }
+                }
             }
 
+            // If there is an old record for us, delete it if it is elsewhere.
+            region = m_Database.Get(regionInfos.RegionID, scopeID);
             if ((region != null) && (region.RegionID == regionInfos.RegionID) && 
                 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
             {
                 if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Data.RegionFlags.NoMove) != 0)
                     return "Can't move this region";
 
+                if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Data.RegionFlags.LockedOut) != 0)
+                    return "Region locked out";
+
                 // Region reregistering in other coordinates. Delete the old entry
                 m_log.DebugFormat("[GRID SERVICE]: Region {0} ({1}) was previously registered at {2}-{3}. Deleting old entry.",
                     regionInfos.RegionName, regionInfos.RegionID, regionInfos.RegionLocX, regionInfos.RegionLocY);
@@ -203,23 +225,6 @@ namespace OpenSim.Services.GridService
                 }
             }
 
-            if (!m_AllowDuplicateNames)
-            {
-                List<RegionData> dupe = m_Database.Get(regionInfos.RegionName, scopeID);
-                if (dupe != null && dupe.Count > 0)
-                {
-                    foreach (RegionData d in dupe)
-                    {
-                        if (d.RegionID != regionInfos.RegionID)
-                        {
-                            m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register duplicate name with ID {1}.", 
-                                regionInfos.RegionName, regionInfos.RegionID);
-                            return "Duplicate region name";
-                        }
-                    }
-                }
-            }
-
             // Everything is ok, let's register
             RegionData rdata = RegionInfo2RegionData(regionInfos);
             rdata.ScopeID = scopeID;
@@ -227,8 +232,6 @@ namespace OpenSim.Services.GridService
             if (region != null)
             {
                 int oldFlags = Convert.ToInt32(region.Data["flags"]);
-                if ((oldFlags & (int)OpenSim.Data.RegionFlags.LockedOut) != 0)
-                    return "Region locked out";
 
                 oldFlags &= ~(int)OpenSim.Data.RegionFlags.Reservation;
 
-- 
cgit v1.1


From 7ea832d47c827ad9ef8eb0ce24702fbee585b1ee Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 29 Aug 2012 02:01:43 +0100
Subject: Fix regression introduced in a0d178b2 (Sat Aug 25 02:00:17 2012)
 where folders with asset type of 'Folder' and 'Unknown' were accidentally
 treated as system folders.

This prevented more than one additional ordinary folder from being created in the base "My Inventory" user folder.
Added regression test for this case.
Switched tests to use XInventoryService with mostly implemented TestXInventoryDataPlugin rather than InventoryService
Disabled TestLoadIarV0_1SameNameCreator() since this has not been working for a very long time (ever since XInventoryService) started being used
since it doesnt' preserve creator data in the same way as InventoryService did and so effectively lost the OSPAs.
However, nobody noticed/complained about this issue and OSPAs have been superseded by HG like creator information via the --home save oar/iar switch.
---
 OpenSim/Services/InventoryService/XInventoryService.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index deacd5a..309dab4 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -94,6 +94,7 @@ namespace OpenSim.Services.InventoryService
 
             m_Database = LoadPlugin<IXInventoryData>(dllName,
                     new Object[] {connString, String.Empty});
+
             if (m_Database == null)
                 throw new Exception("Could not find a storage interface in the given module");
         }
@@ -326,7 +327,7 @@ namespace OpenSim.Services.InventoryService
             if (check != null)
                 return false;
 
-            if (folder.Type != (short)AssetType.Folder || folder.Type != (short)AssetType.Unknown)
+            if (folder.Type != (short)AssetType.Folder && folder.Type != (short)AssetType.Unknown)
             {
                 InventoryFolderBase rootFolder = GetRootFolder(folder.Owner);
 
-- 
cgit v1.1


From 874bde366aa3f834957f757aa56a7634becb4415 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Thu, 6 Sep 2012 10:54:45 +0100
Subject: 4096 is used in various places as the maximum height of a region,
 refactoring to be a constant

---
 OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 67a65ff..35cb408 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
         public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
         {
             Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
-            Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0);
+            Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
 
             OSDMap extraData = new OSDMap
             {
@@ -286,7 +286,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
             List<GridRegion> foundRegions = new List<GridRegion>();
 
             Vector3d minPosition = new Vector3d(xmin, ymin, 0.0);
-            Vector3d maxPosition = new Vector3d(xmax, ymax, 4096.0);
+            Vector3d maxPosition = new Vector3d(xmax, ymax, Constants.RegionHeight);
 
             NameValueCollection requestArgs = new NameValueCollection
             {
-- 
cgit v1.1


From 190f9c258b6cd1efda214b2e188903f571e1c6e4 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 13 Sep 2012 10:00:29 -0700
Subject: Restarting to work on HGSuitcaseInventoryService: added the ability
 for the outside world to retrieve appearance items. Not ACLed yet.

---
 .../HypergridService/HGSuitcaseInventoryService.cs | 60 ++++++++++++++++++++--
 1 file changed, 56 insertions(+), 4 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 6e4b68c..91cc6eb 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -56,10 +56,12 @@ namespace OpenSim.Services.HypergridService
 
         private string m_HomeURL;
         private IUserAccountService m_UserAccountService;
+        private IAvatarService m_AvatarService;
 
 //        private UserAccountCache m_Cache;
 
         private ExpiringCache<UUID, List<XInventoryFolder>> m_SuitcaseTrees = new ExpiringCache<UUID, List<XInventoryFolder>>();
+        private ExpiringCache<UUID, AvatarAppearance> m_Appearances = new ExpiringCache<UUID, AvatarAppearance>();
 
         public HGSuitcaseInventoryService(IConfigSource config, string configName)
             : base(config, configName)
@@ -77,7 +79,6 @@ namespace OpenSim.Services.HypergridService
             IConfig invConfig = config.Configs[m_ConfigName];
             if (invConfig != null)
             {
-                // realm = authConfig.GetString("Realm", realm);
                 string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty);
                 if (userAccountsDll == string.Empty)
                     throw new Exception("Please specify UserAccountsService in HGInventoryService configuration");
@@ -87,8 +88,14 @@ namespace OpenSim.Services.HypergridService
                 if (m_UserAccountService == null)
                     throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
 
-                // legacy configuration [obsolete]
-                m_HomeURL = invConfig.GetString("ProfileServerURI", string.Empty);
+                string avatarDll = invConfig.GetString("AvatarService", string.Empty);
+                if (avatarDll == string.Empty)
+                    throw new Exception("Please specify AvatarService in HGInventoryService configuration");
+
+                m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarDll, args);
+                if (m_AvatarService == null)
+                    throw new Exception(String.Format("Unable to create m_AvatarService from {0}", avatarDll));
+
                 // Preferred
                 m_HomeURL = invConfig.GetString("HomeURI", m_HomeURL);
 
@@ -394,7 +401,7 @@ namespace OpenSim.Services.HypergridService
                 return null;
             }
 
-            if (!IsWithinSuitcaseTree(it.Owner, it.Folder))
+            if (!IsWithinSuitcaseTree(it.Owner, it.Folder) && !IsPartOfAppearance(it.Owner, it.ID))
             {
                 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Item {0} (folder {1}) is not within Suitcase",
                     it.Name, it.Folder);
@@ -549,6 +556,51 @@ namespace OpenSim.Services.HypergridService
             else return true;
         }
         #endregion
+
+        #region Avatar Appearance
+
+        private AvatarAppearance GetAppearance(UUID principalID)
+        {
+            AvatarAppearance a = null;
+            if (m_Appearances.TryGetValue(principalID, out a))
+                return a;
+
+            a = m_AvatarService.GetAppearance(principalID);
+            m_Appearances.AddOrUpdate(principalID, a, 5 * 60); // 5minutes
+            return a;
+        }
+
+        private bool IsPartOfAppearance(UUID principalID, UUID itemID)
+        {
+            AvatarAppearance a = GetAppearance(principalID);
+            if (a == null)
+                return false;
+
+            // Check wearables (body parts and clothes)
+            for (int i = 0; i < a.Wearables.Length; i++)
+            {
+                for (int j = 0; j < a.Wearables[i].Count; j++)
+                {
+                    if (a.Wearables[i][j].ItemID == itemID)
+                    {
+                        m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID); 
+                        return true;
+                    }
+                }
+            }
+
+            // Check attachments
+            if (a.GetAttachmentForItem(itemID) != null)
+            {
+                m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID); 
+                return true;
+            }
+
+            return false;
+        }
+
+        #endregion
+
     }
 
 }
-- 
cgit v1.1


From 1ec84ac8b160c1a6ee903b832c75635d1219fe5a Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 15 Sep 2012 02:12:26 +0100
Subject: Add basic asset connector tests to check behaviour for normal, local
 and temporary assets.

Make AssetServiceConnector return more useful data on failure, such as what DLL it was trying to load
Allow LocalAssetServiceConnector.GetData() to work without a cache present, as works for the other lasc Get* methods.
---
 OpenSim/Services/AssetService/AssetServiceBase.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/AssetService/AssetServiceBase.cs b/OpenSim/Services/AssetService/AssetServiceBase.cs
index 177c565..58ab052 100644
--- a/OpenSim/Services/AssetService/AssetServiceBase.cs
+++ b/OpenSim/Services/AssetService/AssetServiceBase.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Services.AssetService
 
             m_Database = LoadPlugin<IAssetDataPlugin>(dllName);
             if (m_Database == null)
-                throw new Exception("Could not find a storage interface in the given module");
+                throw new Exception(string.Format("Could not find a storage interface in the module {0}", dllName));
 
             m_Database.Initialise(connString);
 
@@ -96,7 +96,7 @@ namespace OpenSim.Services.AssetService
                 m_AssetLoader = LoadPlugin<IAssetLoader>(loaderName);
 
                 if (m_AssetLoader == null)
-                    throw new Exception("Asset loader could not be loaded");
+                    throw new Exception(string.Format("Asset loader could not be loaded from {0}", loaderName));
             }
         }
     }
-- 
cgit v1.1


From de69a24574786f7517e8dc3be62e413f9e0fae22 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 15 Sep 2012 19:33:51 -0700
Subject: More on HG2.0: added the possibility of controlling the appearance
 that avies use to visit other grids. Not as good as I wanted, but good
 enough. Unfortunately we can't switch the appearance from under the avie
 without getting into a lot of weirdnesses because appearance is
 viewer-controlled. So instead, when this control is on, I'm disallowing HG-TP
 unless the user is wearing an allowed HG appearance -- the user gets a
 warning and needs to switch appearance. WARNING: I'm still not committing the
 config vars because this is still not ready for ppl to test.

---
 OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | 1 +
 1 file changed, 1 insertion(+)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 91cc6eb..556a0da 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -573,6 +573,7 @@ namespace OpenSim.Services.HypergridService
         private bool IsPartOfAppearance(UUID principalID, UUID itemID)
         {
             AvatarAppearance a = GetAppearance(principalID);
+
             if (a == null)
                 return false;
 
-- 
cgit v1.1


From 3089b6d824f1d4eb25ba12c5fd037153fdc92e1e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 20 Sep 2012 15:49:22 -0700
Subject: More HG2.0: Added permission policies in HGAsset Service based on
 asset types. The policies are given in the config. This is only half of the
 story. The other half, pertaining to exports/imports made by the sim, will be
 done next.

---
 .../Services/HypergridService/HGAssetService.cs    | 79 +++++++++++++++++++++-
 1 file changed, 76 insertions(+), 3 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index db98166..d6541c4 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -58,6 +58,9 @@ namespace OpenSim.Services.HypergridService
 
         private UserAccountCache m_Cache;
 
+        private bool[] m_DisallowGET, m_DisallowPOST;
+        private string[] m_AssetTypeNames;
+
         public HGAssetService(IConfigSource config, string configName) : base(config, configName)
         {
             m_log.Debug("[HGAsset Service]: Starting");
@@ -80,6 +83,34 @@ namespace OpenSim.Services.HypergridService
             m_HomeURL = assetConfig.GetString("HomeURI", m_HomeURL);
 
             m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
+
+            // Permissions
+            Type enumType = typeof(AssetType);
+            m_AssetTypeNames = Enum.GetNames(enumType);
+            for (int i = 0; i < m_AssetTypeNames.Length; i++)
+                m_AssetTypeNames[i] = m_AssetTypeNames[i].ToLower();
+            int n = Enum.GetValues(enumType).Length;
+            m_DisallowGET = new bool[n];
+            m_DisallowPOST = new bool[n];
+
+            LoadPermsFromConfig(assetConfig, "DisallowGET", m_DisallowGET);
+            LoadPermsFromConfig(assetConfig, "DisallowPOST", m_DisallowPOST);
+
+        }
+
+        private void LoadPermsFromConfig(IConfig assetConfig, string variable, bool[] bitArray)
+        {
+            string perms = assetConfig.GetString(variable, String.Empty);
+            string[] parts = perms.Split(new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
+            foreach (string s in parts)
+            {
+                int index = Array.IndexOf(m_AssetTypeNames, s.Trim().ToLower());
+                if (index >= 0)
+                    bitArray[index] = true;
+                else
+                    m_log.WarnFormat("[HGAsset Service]: Invalid AssetType {0}", s);
+            }
+
         }
 
         #region IAssetService overrides
@@ -90,6 +121,9 @@ namespace OpenSim.Services.HypergridService
             if (asset == null)
                 return null;
 
+            if (!AllowedGet(asset.Type))
+                return null;
+
             if (asset.Metadata.Type == (sbyte)AssetType.Object)
                 asset.Data = AdjustIdentifiers(asset.Data); ;
 
@@ -112,16 +146,27 @@ namespace OpenSim.Services.HypergridService
 
         public override byte[] GetData(string id)
         {
-            byte[] data = base.GetData(id);
+            AssetBase asset = Get(id);
 
-            if (data == null)
+            if (asset == null)
                 return null;
 
-            return AdjustIdentifiers(data);
+            if (!AllowedGet(asset.Type))
+                return null;
+
+            return asset.Data;
         }
 
         //public virtual bool Get(string id, Object sender, AssetRetrieved handler)
 
+        public override string Store(AssetBase asset)
+        {
+            if (!AllowedPost(asset.Type))
+                return UUID.Zero.ToString();
+
+            return base.Store(asset);
+        }
+
         public override bool Delete(string id)
         {
             // NOGO
@@ -130,6 +175,34 @@ namespace OpenSim.Services.HypergridService
 
         #endregion 
 
+        protected bool AllowedGet(sbyte type)
+        {
+            string assetTypeName = ((AssetType)type).ToString();
+
+            int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
+            if (index >= 0 && m_DisallowGET[index])
+            {
+                m_log.DebugFormat("[HGAsset Service]: GET denied: service does not allow export of AssetType {0}", assetTypeName);
+                return false;
+            }
+
+            return true;
+        }
+
+        protected bool AllowedPost(sbyte type)
+        {
+            string assetTypeName = ((AssetType)type).ToString();
+
+            int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
+            if (index >= 0 && m_DisallowPOST[index])
+            {
+                m_log.DebugFormat("[HGAsset Service]: POST denied: service does not allow import of AssetType {0}", assetTypeName);
+                return false;
+            }
+
+            return true;
+        }
+
         protected void AdjustIdentifiers(AssetMetadata meta)
         {
             if (meta == null || m_Cache == null)
-- 
cgit v1.1


From e379566e6e3bed0d7001f099a5ea8dfd648d76cf Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 20 Sep 2012 19:50:57 -0700
Subject: Improvement over last commit: refactor the asset permissions code, so
 that it can be used by both the HG Asset Service and the simulator. Also
 renamed the config vars to something more intuitive

---
 .../Services/HypergridService/HGAssetService.cs    | 63 ++--------------------
 1 file changed, 5 insertions(+), 58 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index d6541c4..f1275a0 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -58,8 +58,7 @@ namespace OpenSim.Services.HypergridService
 
         private UserAccountCache m_Cache;
 
-        private bool[] m_DisallowGET, m_DisallowPOST;
-        private string[] m_AssetTypeNames;
+        private AssetPermissions m_AssetPerms;
 
         public HGAssetService(IConfigSource config, string configName) : base(config, configName)
         {
@@ -85,31 +84,7 @@ namespace OpenSim.Services.HypergridService
             m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);
 
             // Permissions
-            Type enumType = typeof(AssetType);
-            m_AssetTypeNames = Enum.GetNames(enumType);
-            for (int i = 0; i < m_AssetTypeNames.Length; i++)
-                m_AssetTypeNames[i] = m_AssetTypeNames[i].ToLower();
-            int n = Enum.GetValues(enumType).Length;
-            m_DisallowGET = new bool[n];
-            m_DisallowPOST = new bool[n];
-
-            LoadPermsFromConfig(assetConfig, "DisallowGET", m_DisallowGET);
-            LoadPermsFromConfig(assetConfig, "DisallowPOST", m_DisallowPOST);
-
-        }
-
-        private void LoadPermsFromConfig(IConfig assetConfig, string variable, bool[] bitArray)
-        {
-            string perms = assetConfig.GetString(variable, String.Empty);
-            string[] parts = perms.Split(new char[] {','}, StringSplitOptions.RemoveEmptyEntries);
-            foreach (string s in parts)
-            {
-                int index = Array.IndexOf(m_AssetTypeNames, s.Trim().ToLower());
-                if (index >= 0)
-                    bitArray[index] = true;
-                else
-                    m_log.WarnFormat("[HGAsset Service]: Invalid AssetType {0}", s);
-            }
+            m_AssetPerms = new AssetPermissions(assetConfig);
 
         }
 
@@ -121,7 +96,7 @@ namespace OpenSim.Services.HypergridService
             if (asset == null)
                 return null;
 
-            if (!AllowedGet(asset.Type))
+            if (!m_AssetPerms.AllowedExport(asset.Type))
                 return null;
 
             if (asset.Metadata.Type == (sbyte)AssetType.Object)
@@ -151,7 +126,7 @@ namespace OpenSim.Services.HypergridService
             if (asset == null)
                 return null;
 
-            if (!AllowedGet(asset.Type))
+            if (!m_AssetPerms.AllowedExport(asset.Type))
                 return null;
 
             return asset.Data;
@@ -161,7 +136,7 @@ namespace OpenSim.Services.HypergridService
 
         public override string Store(AssetBase asset)
         {
-            if (!AllowedPost(asset.Type))
+            if (!m_AssetPerms.AllowedImport(asset.Type))
                 return UUID.Zero.ToString();
 
             return base.Store(asset);
@@ -175,34 +150,6 @@ namespace OpenSim.Services.HypergridService
 
         #endregion 
 
-        protected bool AllowedGet(sbyte type)
-        {
-            string assetTypeName = ((AssetType)type).ToString();
-
-            int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
-            if (index >= 0 && m_DisallowGET[index])
-            {
-                m_log.DebugFormat("[HGAsset Service]: GET denied: service does not allow export of AssetType {0}", assetTypeName);
-                return false;
-            }
-
-            return true;
-        }
-
-        protected bool AllowedPost(sbyte type)
-        {
-            string assetTypeName = ((AssetType)type).ToString();
-
-            int index = Array.IndexOf(m_AssetTypeNames, assetTypeName.ToLower());
-            if (index >= 0 && m_DisallowPOST[index])
-            {
-                m_log.DebugFormat("[HGAsset Service]: POST denied: service does not allow import of AssetType {0}", assetTypeName);
-                return false;
-            }
-
-            return true;
-        }
-
         protected void AdjustIdentifiers(AssetMetadata meta)
         {
             if (meta == null || m_Cache == null)
-- 
cgit v1.1


From 5f97b3e1d9775a88c1d952f1d599254969a262d2 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 21 Sep 2012 06:41:32 -0700
Subject: Minor: change the return value of unsuccessful posts to string.Empty.

---
 OpenSim/Services/HypergridService/HGAssetService.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index f1275a0..84dec8d 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -137,7 +137,7 @@ namespace OpenSim.Services.HypergridService
         public override string Store(AssetBase asset)
         {
             if (!m_AssetPerms.AllowedImport(asset.Type))
-                return UUID.Zero.ToString();
+                return string.Empty;
 
             return base.Store(asset);
         }
-- 
cgit v1.1


From 48f4b32d7f23c2d7a52db355017c8b2bb57b55fa Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 21 Sep 2012 21:03:14 -0700
Subject: More HG 2.0: access control at the Gatekeeper. \o/

---
 .../Services/HypergridService/GatekeeperService.cs | 62 +++++++++++++++++++---
 1 file changed, 54 insertions(+), 8 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 47d22b9..0f7d7c6 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -58,9 +58,11 @@ namespace OpenSim.Services.HypergridService
         private static IUserAgentService m_UserAgentService;
         private static ISimulationService m_SimulationService;
 
-        protected string m_AllowedClients = string.Empty;
-        protected string m_DeniedClients = string.Empty;
+        private static string m_AllowedClients = string.Empty;
+        private static string m_DeniedClients = string.Empty;
         private static bool m_ForeignAgentsAllowed = true;
+        private static List<string> m_ForeignsAllowedExceptions = new List<string>();
+        private static List<string> m_ForeignsDisallowedExceptions = new List<string>();
 
         private static UUID m_ScopeID;
         private static bool m_AllowTeleportsToAnyRegion;
@@ -113,6 +115,9 @@ namespace OpenSim.Services.HypergridService
                 m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty);
                 m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
 
+                LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_ForeignsAllowedExceptions);
+                LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_ForeignsDisallowedExceptions);
+
                 if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
                     throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
 
@@ -125,6 +130,15 @@ namespace OpenSim.Services.HypergridService
         {
         }
 
+        protected void LoadDomainExceptionsFromConfig(IConfig config, string variable, List<string> exceptions)
+        {
+            string value = config.GetString(variable, string.Empty);
+            string[] parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+
+            foreach (string s in parts)
+                exceptions.Add(s.Trim());
+        }
+
         public bool LinkRegion(string regionName, out UUID regionID, out ulong regionHandle, out string externalName, out string imageURL, out string reason)
         {
             regionID = UUID.Zero;
@@ -260,14 +274,25 @@ namespace OpenSim.Services.HypergridService
             m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok");
 
             //
-            // Foreign agents allowed
+            // Foreign agents allowed? Exceptions?
             //
-            if (account == null && !m_ForeignAgentsAllowed)
+            if (account == null) 
             {
-                reason = "Unauthorized";
-                m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1}. Refusing service.",
-                    aCircuit.firstname, aCircuit.lastname);
-                return false;
+                bool allowed = m_ForeignAgentsAllowed;
+
+                if (m_ForeignAgentsAllowed && IsException(aCircuit, m_ForeignsAllowedExceptions))
+                        allowed = false;
+
+                if (!m_ForeignAgentsAllowed && IsException(aCircuit, m_ForeignsDisallowedExceptions))
+                    allowed = true;
+
+                if (!allowed)
+                {
+                    reason = "Destination does not allow visitors from your world";
+                    m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1} @ {2}. Refusing service.",
+                        aCircuit.firstname, aCircuit.lastname, aCircuit.ServiceURLs["HomeURI"]);
+                    return false;
+                }
             }
 
             // May want to authorize
@@ -393,6 +418,27 @@ namespace OpenSim.Services.HypergridService
 
         #region Misc
 
+        private bool IsException(AgentCircuitData aCircuit, List<string> exceptions)
+        {
+            bool exception = false;
+            if (exceptions.Count > 0) // we have exceptions
+            {
+                // Retrieve the visitor's origin
+                string userURL = aCircuit.ServiceURLs["HomeURI"].ToString();
+                if (!userURL.EndsWith("/"))
+                    userURL += "/";
+
+                if (exceptions.Find(delegate(string s)
+                {
+                    if (!s.EndsWith("/"))
+                        s += "/";
+                    return s == userURL;
+                }) != null)
+                    exception = true;
+            }
+
+            return exception;
+        }
 
         #endregion
     }
-- 
cgit v1.1


From fb6d6e5cca8e283025ef80cfd29a97bc5882550d Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 22 Sep 2012 11:11:48 -0700
Subject: HG 2.0: User Agent Service now can also control where the local users
 can go. Domain-name and user-level based. \o/

---
 .../Services/HypergridService/UserAgentService.cs  | 103 ++++++++++++++++++++-
 1 file changed, 100 insertions(+), 3 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 49c7f89..a6fc731 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -77,6 +77,10 @@ namespace OpenSim.Services.HypergridService
 
         protected static bool m_BypassClientVerification;
 
+        private static Dictionary<int, bool> m_ForeignTripsAllowed = new Dictionary<int, bool>();
+        private static Dictionary<int, List<string>> m_TripsAllowedExceptions = new Dictionary<int, List<string>>();
+        private static Dictionary<int, List<string>> m_TripsDisallowedExceptions = new Dictionary<int, List<string>>();
+
         public UserAgentService(IConfigSource config) : this(config, null)
         {
         }
@@ -121,6 +125,12 @@ namespace OpenSim.Services.HypergridService
                 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
                 m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountService, args);
 
+                m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0);
+
+                LoadTripPermissionsFromConfig(serverConfig, "ForeignTripsAllowed");
+                LoadDomainExceptionsFromConfig(serverConfig, "AllowExcept", m_TripsAllowedExceptions);
+                LoadDomainExceptionsFromConfig(serverConfig, "DisallowExcept", m_TripsDisallowedExceptions);
+
                 m_GridName = serverConfig.GetString("ExternalName", string.Empty);
                 if (m_GridName == string.Empty)
                 {
@@ -130,10 +140,43 @@ namespace OpenSim.Services.HypergridService
                 if (!m_GridName.EndsWith("/"))
                     m_GridName = m_GridName + "/";
 
-                m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0);
             }
         }
 
+        protected void LoadTripPermissionsFromConfig(IConfig config, string variable)
+        {
+            foreach (string keyName in config.GetKeys())
+            {
+                if (keyName.StartsWith(variable + "_Level_"))
+                {
+                    int level = 0;
+                    if (Int32.TryParse(keyName.Replace(variable + "_Level_", ""), out level))
+                        m_ForeignTripsAllowed.Add(level, config.GetBoolean(keyName, true));
+                }
+            }
+        }
+
+        protected void LoadDomainExceptionsFromConfig(IConfig config, string variable, Dictionary<int, List<string>> exceptions)
+        {
+            foreach (string keyName in config.GetKeys())
+            {
+                if (keyName.StartsWith(variable + "_Level_"))
+                {
+                    int level = 0;
+                    if (Int32.TryParse(keyName.Replace(variable + "_Level_", ""), out level) && !exceptions.ContainsKey(level))
+                    {
+                        exceptions.Add(level, new List<string>());
+                        string value = config.GetString(keyName, string.Empty);
+                        string[] parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
+
+                        foreach (string s in parts)
+                            exceptions[level].Add(s.Trim());
+                    }
+                }
+            }
+        }
+
+
         public GridRegion GetHomeRegion(UUID userID, out Vector3 position, out Vector3 lookAt)
         {
             position = new Vector3(128, 128, 0); lookAt = Vector3.UnitY;
@@ -166,13 +209,39 @@ namespace OpenSim.Services.HypergridService
             m_log.DebugFormat("[USER AGENT SERVICE]: Request to login user {0} {1} (@{2}) to grid {3}", 
                 agentCircuit.firstname, agentCircuit.lastname, ((clientIP == null) ? "stored IP" : clientIP.Address.ToString()), gatekeeper.ServerURI);
 
-            if (m_UserAccountService.GetUserAccount(UUID.Zero, agentCircuit.AgentID) == null)
+            string gridName = gatekeeper.ServerURI;
+
+            UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, agentCircuit.AgentID);
+            if (account == null)
             {
                 m_log.WarnFormat("[USER AGENT SERVICE]: Someone attempted to lauch a foreign user from here {0} {1}", agentCircuit.firstname, agentCircuit.lastname);
                 reason = "Forbidden to launch your agents from here";
                 return false;
             }
 
+            // Is this user allowed to go there?
+            if (m_GridName != gridName)
+            {
+                if (m_ForeignTripsAllowed.ContainsKey(account.UserLevel))
+                {
+                    bool allowed = m_ForeignTripsAllowed[account.UserLevel];
+
+                    if (m_ForeignTripsAllowed[account.UserLevel] && IsException(gridName, account.UserLevel, m_TripsAllowedExceptions))
+                        allowed = false;
+
+                    if (!m_ForeignTripsAllowed[account.UserLevel] && IsException(gridName, account.UserLevel, m_TripsDisallowedExceptions))
+                        allowed = true;
+
+                    if (!allowed)
+                    {
+                        reason = "Your world does not allow you to visit the destination";
+                        m_log.InfoFormat("[USER AGENT SERVICE]: Agents not permitted to visit {0}. Refusing service.", gridName);
+                        return false;
+                    }
+                }
+            }
+
+
             // Take the IP address + port of the gatekeeper (reg) plus the info of finalDestination
             GridRegion region = new GridRegion(gatekeeper);
             region.ServerURI = gatekeeper.ServerURI;
@@ -189,7 +258,6 @@ namespace OpenSim.Services.HypergridService
             
             bool success = false;
             string myExternalIP = string.Empty;
-            string gridName = gatekeeper.ServerURI;
 
             m_log.DebugFormat("[USER AGENT SERVICE]: this grid: {0}, desired grid: {1}", m_GridName, gridName);
 
@@ -588,6 +656,35 @@ namespace OpenSim.Services.HypergridService
             else
                 return UUID.Zero;
         }
+
+        #region Misc
+
+        private bool IsException(string dest, int level, Dictionary<int, List<string>> exceptions)
+        {
+            if (!exceptions.ContainsKey(level))
+                return false;
+
+            bool exception = false;
+            if (exceptions[level].Count > 0) // we have exceptions
+            {
+                string destination = dest;
+                if (!destination.EndsWith("/"))
+                    destination += "/";
+
+                if (exceptions[level].Find(delegate(string s)
+                {
+                    if (!s.EndsWith("/"))
+                        s += "/";
+                    return s == destination;
+                }) != null)
+                    exception = true;
+            }
+
+            return exception;
+        }
+
+        #endregion
+
     }
 
     class TravelingAgentInfo
-- 
cgit v1.1


From ae58cf42242433c786162b53a2724962f4a8380b Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Tue, 25 Sep 2012 20:03:49 -0700
Subject: TOS module. WARNING: migration in GridUser table.

---
 OpenSim/Services/Interfaces/IGridUserService.cs        | 8 ++++++++
 OpenSim/Services/UserAccountService/GridUserService.cs | 2 ++
 2 files changed, 10 insertions(+)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index 0a52bfa..620ed3a 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -50,6 +50,8 @@ namespace OpenSim.Services.Interfaces
         public DateTime Login;
         public DateTime Logout;
 
+        public string TOS = string.Empty;
+
         public GridUserInfo() {}
         
         public GridUserInfo(Dictionary<string, object> kvp)
@@ -78,6 +80,11 @@ namespace OpenSim.Services.Interfaces
             if (kvp.ContainsKey("Online"))
                 Boolean.TryParse(kvp["Online"].ToString(), out Online);
 
+            if (kvp.ContainsKey("TOS"))
+                TOS = kvp["TOS"].ToString();
+            else
+                TOS = string.Empty;
+
         }
 
         public Dictionary<string, object> ToKeyValuePairs()
@@ -97,6 +104,7 @@ namespace OpenSim.Services.Interfaces
             result["Login"] = Login.ToString();
             result["Logout"] = Logout.ToString();
 
+            result["TOS"] = TOS;
             
             return result;
         }
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index ac3d8fd..8eae859 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -70,6 +70,8 @@ namespace OpenSim.Services.UserAccountService
             info.Login = Util.ToDateTime(Convert.ToInt32(d.Data["Login"]));
             info.Logout = Util.ToDateTime(Convert.ToInt32(d.Data["Logout"]));
 
+            info.TOS = d.Data["TOS"];
+
             return info;
         }
 
-- 
cgit v1.1


From 3c77b8f463a852aecf3cb29fe4e5f4614f474dbf Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 26 Sep 2012 12:40:41 -0700
Subject: Use GridUser properly for foreign users.

---
 .../Services/HypergridService/GatekeeperService.cs | 31 +++++++++++++++++++---
 1 file changed, 27 insertions(+), 4 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 0f7d7c6..004311f 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -57,6 +57,7 @@ namespace OpenSim.Services.HypergridService
         private static IUserAccountService m_UserAccountService;
         private static IUserAgentService m_UserAgentService;
         private static ISimulationService m_SimulationService;
+        private static IGridUserService m_GridUserService;
 
         private static string m_AllowedClients = string.Empty;
         private static string m_DeniedClients = string.Empty;
@@ -84,8 +85,9 @@ namespace OpenSim.Services.HypergridService
                 string gridService = serverConfig.GetString("GridService", String.Empty);
                 string presenceService = serverConfig.GetString("PresenceService", String.Empty);
                 string simulationService = serverConfig.GetString("SimulationService", String.Empty);
+                string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
 
-                // These 3 are mandatory, the others aren't
+                // These are mandatory, the others aren't
                 if (gridService == string.Empty || presenceService == string.Empty)
                     throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
                 
@@ -105,6 +107,8 @@ namespace OpenSim.Services.HypergridService
                     m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
                 if (homeUsersService != string.Empty)
                     m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args);
+                if (gridUserService != string.Empty)
+                    m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
 
                 if (simService != null)
                     m_SimulationService = simService;
@@ -295,8 +299,6 @@ namespace OpenSim.Services.HypergridService
                 }
             }
 
-            // May want to authorize
-
             bool isFirstLogin = false;
             //
             // Login the presence, if it's not there yet (by the login service)
@@ -305,7 +307,8 @@ namespace OpenSim.Services.HypergridService
             if (presence != null) // it has been placed there by the login service
                 isFirstLogin = true;
 
-            else 
+            else
+            {
                 if (!m_PresenceService.LoginAgent(aCircuit.AgentID.ToString(), aCircuit.SessionID, aCircuit.SecureSessionID))
                 {
                     reason = "Unable to login presence";
@@ -315,6 +318,26 @@ namespace OpenSim.Services.HypergridService
                 }
                 m_log.DebugFormat("[GATEKEEPER SERVICE]: Login presence ok");
 
+                // Also login foreigners with GridUser service
+                if (m_GridUserService != null && account == null)
+                {
+                    string userId = aCircuit.AgentID.ToString();
+                    string first = aCircuit.firstname, last = aCircuit.lastname;
+                    if (last.StartsWith("@"))
+                    {
+                        string[] parts = aCircuit.firstname.Split('.');
+                        if (parts.Length >= 2)
+                        {
+                            first = parts[0];
+                            last = parts[1];
+                        }
+                    }
+
+                    userId += ";" + aCircuit.ServiceURLs["HomeURI"] + ";" + first + " " + last;
+                    m_GridUserService.LoggedIn(userId);
+                }
+            }
+
             //
             // Get the region
             //
-- 
cgit v1.1


From 7a5070518833a29252fc638f9dd216040bcfad7a Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 27 Sep 2012 16:43:18 -0700
Subject: Removed the bits about the TOSModule. That module doesn't go into
 core. WARNING: migration on GridUser withdrawn too, but left the migration
 number there.

---
 OpenSim/Services/Interfaces/IGridUserService.cs        | 9 ---------
 OpenSim/Services/UserAccountService/GridUserService.cs | 2 --
 2 files changed, 11 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index 620ed3a..8b738ab 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -50,8 +50,6 @@ namespace OpenSim.Services.Interfaces
         public DateTime Login;
         public DateTime Logout;
 
-        public string TOS = string.Empty;
-
         public GridUserInfo() {}
         
         public GridUserInfo(Dictionary<string, object> kvp)
@@ -80,11 +78,6 @@ namespace OpenSim.Services.Interfaces
             if (kvp.ContainsKey("Online"))
                 Boolean.TryParse(kvp["Online"].ToString(), out Online);
 
-            if (kvp.ContainsKey("TOS"))
-                TOS = kvp["TOS"].ToString();
-            else
-                TOS = string.Empty;
-
         }
 
         public Dictionary<string, object> ToKeyValuePairs()
@@ -103,8 +96,6 @@ namespace OpenSim.Services.Interfaces
             result["Online"] = Online.ToString();
             result["Login"] = Login.ToString();
             result["Logout"] = Logout.ToString();
-
-            result["TOS"] = TOS;
             
             return result;
         }
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index 8eae859..ac3d8fd 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -70,8 +70,6 @@ namespace OpenSim.Services.UserAccountService
             info.Login = Util.ToDateTime(Convert.ToInt32(d.Data["Login"]));
             info.Logout = Util.ToDateTime(Convert.ToInt32(d.Data["Logout"]));
 
-            info.TOS = d.Data["TOS"];
-
             return info;
         }
 
-- 
cgit v1.1


From 5b69872655792bd75f7caa528c773efe5923a6e5 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 30 Sep 2012 06:51:49 -0700
Subject: Made a method of GridUserService virtual so it can be overridden.

---
 OpenSim/Services/UserAccountService/GridUserService.cs | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index ac3d8fd..43fa04b 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Services.UserAccountService
             m_log.Debug("[USER GRID SERVICE]: Starting user grid service");
         }
 
-        public GridUserInfo GetGridUserInfo(string userID)
+        public virtual GridUserInfo GetGridUserInfo(string userID)
         {
             GridUserData d = m_Database.Get(userID);
 
@@ -122,17 +122,6 @@ namespace OpenSim.Services.UserAccountService
             return m_Database.Store(d);
         }
 
-        protected bool StoreGridUserInfo(GridUserInfo info)
-        {
-            GridUserData d = new GridUserData();
-
-            d.Data["HomeRegionID"] = info.HomeRegionID.ToString();
-            d.Data["HomePosition"] = info.HomePosition.ToString();
-            d.Data["HomeLookAt"] = info.HomeLookAt.ToString();
-
-            return m_Database.Store(d);
-        }
-
         public bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt)
         {
             GridUserData d = m_Database.Get(userID);
-- 
cgit v1.1


From 531edd51d82ecd6a842a2611c99e9919634491ef Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 30 Sep 2012 07:22:55 -0700
Subject: Added request.Proxy=null everywhere, as discussed in
 http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow.
 Thanks R.Gunther (rigun@rigutech.nl)
 https://lists.berlios.de/pipermail/opensim-users/2012-September/010986.html

---
 OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs      | 1 +
 OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs  | 1 +
 OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 1 +
 .../Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs   | 6 +++++-
 OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs   | 1 +
 5 files changed, 9 insertions(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
index 5c50936..089e878 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
@@ -77,6 +77,7 @@ namespace OpenSim.Services.Connectors
         public virtual string Helo()
         {
             HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
+            req.Proxy = null;
             // Eventually we need to switch to HEAD
             /* req.Method = "HEAD"; */
 
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 2f263ae..8cd2daa 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -125,6 +125,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
             AgentCreateRequest.Method = "POST";
             AgentCreateRequest.ContentType = "application/json";
             AgentCreateRequest.Timeout = 10000;
+            AgentCreateRequest.Proxy = null;
             //AgentCreateRequest.KeepAlive = false;
             //AgentCreateRequest.Headers.Add("Authorization", authKey);
 
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
index 7429293..07142bf 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
@@ -107,6 +107,7 @@ namespace OpenSim.Services.Connectors
             helloNeighbourRequest.Method = "POST";
             helloNeighbourRequest.ContentType = "application/json";
             helloNeighbourRequest.Timeout = 10000;
+            helloNeighbourRequest.Proxy = null;
 
             // Fill it in
             OSDMap args = null;
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 6bfc5cc..2b00b4d 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -184,6 +184,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
             {
                 HttpWebRequest request = UntrustedHttpWebRequest.Create(url);
                 request.Method = "HEAD";
+                request.Proxy = null;
 
                 using (WebResponse response = request.GetResponse())
                 {
@@ -339,7 +340,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
                 // Simian does not require the asset ID to be in the URL because it's in the post data.
                 // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs
                 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString());
-                
+                request.Proxy = null;
+
                 HttpWebResponse response = MultipartForm.Post(request, postParameters);
                 using (Stream responseStream = response.GetResponseStream())
                 {
@@ -427,6 +429,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
             {
                 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
                 request.Method = "DELETE";
+                request.Proxy = null;
 
                 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                 {
@@ -460,6 +463,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
             try
             {
                 HttpWebRequest request = UntrustedHttpWebRequest.Create(url);
+                request.Proxy = null;
 
                 using (WebResponse response = request.GetResponse())
                 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
index 93fdae3..730d1da 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
@@ -212,6 +212,7 @@ namespace OpenSim.Region.OptionalModules.Simian
                 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl);
                 request.Timeout = 20000;
                 request.ReadWriteTimeout = 5000;
+                request.Proxy = null;
 
                 using (HttpWebResponse response = MultipartForm.Post(request, postParameters))
                 {
-- 
cgit v1.1


From 91a5c602e313b96ffaf1d50b7f0d2923a2e141ba Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sun, 30 Sep 2012 07:48:03 -0700
Subject: Revert "Added request.Proxy=null everywhere, as discussed in
 http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow."
 But the patch is here, in case anyone wants to try it.

This reverts commit 531edd51d82ecd6a842a2611c99e9919634491ef.
---
 OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs      | 1 -
 OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs  | 1 -
 OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs | 1 -
 .../Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs   | 6 +-----
 OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs   | 1 -
 5 files changed, 1 insertion(+), 9 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
index 089e878..5c50936 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
@@ -77,7 +77,6 @@ namespace OpenSim.Services.Connectors
         public virtual string Helo()
         {
             HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI);
-            req.Proxy = null;
             // Eventually we need to switch to HEAD
             /* req.Method = "HEAD"; */
 
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 8cd2daa..2f263ae 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -125,7 +125,6 @@ namespace OpenSim.Services.Connectors.Hypergrid
             AgentCreateRequest.Method = "POST";
             AgentCreateRequest.ContentType = "application/json";
             AgentCreateRequest.Timeout = 10000;
-            AgentCreateRequest.Proxy = null;
             //AgentCreateRequest.KeepAlive = false;
             //AgentCreateRequest.Headers.Add("Authorization", authKey);
 
diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
index 07142bf..7429293 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
@@ -107,7 +107,6 @@ namespace OpenSim.Services.Connectors
             helloNeighbourRequest.Method = "POST";
             helloNeighbourRequest.ContentType = "application/json";
             helloNeighbourRequest.Timeout = 10000;
-            helloNeighbourRequest.Proxy = null;
 
             // Fill it in
             OSDMap args = null;
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 2b00b4d..6bfc5cc 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -184,7 +184,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
             {
                 HttpWebRequest request = UntrustedHttpWebRequest.Create(url);
                 request.Method = "HEAD";
-                request.Proxy = null;
 
                 using (WebResponse response = request.GetResponse())
                 {
@@ -340,8 +339,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
                 // Simian does not require the asset ID to be in the URL because it's in the post data.
                 // By appending it to the URL also, we allow caching proxies (squid) to invalidate asset URLs
                 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl + asset.FullID.ToString());
-                request.Proxy = null;
-
+                
                 HttpWebResponse response = MultipartForm.Post(request, postParameters);
                 using (Stream responseStream = response.GetResponseStream())
                 {
@@ -429,7 +427,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
             {
                 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url);
                 request.Method = "DELETE";
-                request.Proxy = null;
 
                 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                 {
@@ -463,7 +460,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
             try
             {
                 HttpWebRequest request = UntrustedHttpWebRequest.Create(url);
-                request.Proxy = null;
 
                 using (WebResponse response = request.GetResponse())
                 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
index 730d1da..93fdae3 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs
@@ -212,7 +212,6 @@ namespace OpenSim.Region.OptionalModules.Simian
                 HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_serverUrl);
                 request.Timeout = 20000;
                 request.ReadWriteTimeout = 5000;
-                request.Proxy = null;
 
                 using (HttpWebResponse response = MultipartForm.Post(request, postParameters))
                 {
-- 
cgit v1.1


From 060d6fe8f4eba0c1b1c0cb4f52acd2fd59725c66 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 14 Sep 2012 00:11:23 +0200
Subject: Allow setting max connections for an endpoint

---
 OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index e4c3eaf..086b5ad 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Services.Connectors
             if (asset == null)
             {
                 asset = SynchronousRestObjectRequester.
-                        MakeRequest<int, AssetBase>("GET", uri, 0);
+                        MakeRequest<int, AssetBase>("GET", uri, 0, 30);
 
                 if (m_Cache != null)
                     m_Cache.Cache(asset);
@@ -221,7 +221,7 @@ namespace OpenSim.Services.Connectors
                                 m_AssetHandlers.Remove(id);
                             }
                             handlers.Invoke(a);
-                        });
+                        }, 30);
                     
                     success = true;
                 }
@@ -326,4 +326,4 @@ namespace OpenSim.Services.Connectors
             return false;
         }
     }
-}
\ No newline at end of file
+}
-- 
cgit v1.1


From 0b9bf236dd336c66542215bbc8f4a1eb85c646ee Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 1 Oct 2012 15:55:24 -0700
Subject: On more virtual method

---
 OpenSim/Services/Interfaces/IGridUserService.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index 8b738ab..2e7237e 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Services.Interfaces
 
         }
 
-        public Dictionary<string, object> ToKeyValuePairs()
+        public virtual Dictionary<string, object> ToKeyValuePairs()
         {
             Dictionary<string, object> result = new Dictionary<string, object>();
             result["UserID"] = UserID;
-- 
cgit v1.1


From e81e19a3b41be25aea49d9ccd16dad5c4cfe6dc8 Mon Sep 17 00:00:00 2001
From: SignpostMarv
Date: Mon, 1 Oct 2012 11:26:11 +0100
Subject: string format arguments in wrong order

---
 OpenSim/Services/LLLoginService/LLLoginService.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 495dc52..59fb559 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -293,7 +293,7 @@ namespace OpenSim.Services.LLLoginService
                 {
                     m_log.InfoFormat(
                         "[LLOGIN SERVICE]: Login failed for {0} {1}, reason: user level is {2} but minimum login level is {3}",
-                        firstName, lastName, m_MinLoginLevel, account.UserLevel);
+                        firstName, lastName, account.UserLevel, m_MinLoginLevel);
                     return LLFailedLoginResponse.LoginBlockedProblem;
                 }
 
-- 
cgit v1.1


From d98af79f7727fd5d3cd94537b5b4d514f54f5250 Mon Sep 17 00:00:00 2001
From: Mic Bowman
Date: Thu, 4 Oct 2012 08:41:06 -0700
Subject: Make the asset retrieval concurrency a config switch. The current
 value of 30 is still hanging badly on some mono versions. The switch defaults
 to 30 to preserve current behavior.

---
 OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 086b5ad..2b2f11f 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -47,7 +47,8 @@ namespace OpenSim.Services.Connectors
 
         private string m_ServerURI = String.Empty;
         private IImprovedAssetCache m_Cache = null;
-
+        private int m_maxAssetRequestConcurrency = 30;
+        
         private delegate void AssetRetrievedEx(AssetBase asset);
 
         // Keeps track of concurrent requests for the same asset, so that it's only loaded once.
@@ -71,6 +72,10 @@ namespace OpenSim.Services.Connectors
 
         public virtual void Initialise(IConfigSource source)
         {
+            IConfig netconfig = source.Configs["Network"];
+            if (netconfig != null)
+                m_maxAssetRequestConcurrency = netconfig.GetInt("MaxRequestConcurrency",m_maxAssetRequestConcurrency);
+
             IConfig assetConfig = source.Configs["AssetService"];
             if (assetConfig == null)
             {
@@ -108,7 +113,7 @@ namespace OpenSim.Services.Connectors
             if (asset == null)
             {
                 asset = SynchronousRestObjectRequester.
-                        MakeRequest<int, AssetBase>("GET", uri, 0, 30);
+                        MakeRequest<int, AssetBase>("GET", uri, 0, m_maxAssetRequestConcurrency);
 
                 if (m_Cache != null)
                     m_Cache.Cache(asset);
@@ -221,7 +226,7 @@ namespace OpenSim.Services.Connectors
                                 m_AssetHandlers.Remove(id);
                             }
                             handlers.Invoke(a);
-                        }, 30);
+                        }, m_maxAssetRequestConcurrency);
                     
                     success = true;
                 }
-- 
cgit v1.1


From 5b90f5bb17b1bb73f670e6c2f90cca8395a2e9bc Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 4 Oct 2012 15:32:49 -0700
Subject: One more abstraction for GridUser so that it can be overridden in a
 sub-class.

---
 .../Services/Connectors/GridUser/GridUserServicesConnector.cs    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs
index 20d7eaf..94bda82 100644
--- a/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs
+++ b/OpenSim/Services/Connectors/GridUser/GridUserServicesConnector.cs
@@ -207,7 +207,7 @@ namespace OpenSim.Services.Connectors
                     if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null))
                     {
                         if (replyData["result"] is Dictionary<string, object>)
-                            guinfo = new GridUserInfo((Dictionary<string, object>)replyData["result"]);
+                            guinfo = Create((Dictionary<string, object>)replyData["result"]);
                     }
 
                     return guinfo;
@@ -273,7 +273,7 @@ namespace OpenSim.Services.Connectors
                 {
                     if (griduser is Dictionary<string, object>)
                     {
-                        GridUserInfo pinfo = new GridUserInfo((Dictionary<string, object>)griduser);
+                        GridUserInfo pinfo = Create((Dictionary<string, object>)griduser);
                         rinfos.Add(pinfo);
                     }
                     else
@@ -286,5 +286,10 @@ namespace OpenSim.Services.Connectors
 
             return rinfos.ToArray();
         }
+
+        protected virtual GridUserInfo Create(Dictionary<string, object> griduser)
+        {
+            return new GridUserInfo(griduser);
+        }
     }
 }
-- 
cgit v1.1


From 73c9abf5f2e2017bf924d6183502e337d28a7232 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 9 Oct 2012 01:35:27 +0100
Subject: Move OpenSim.Data.RegionFlags -> OpenSim.Framework.RegionFlags to
 make it easier for other code to use (e.g. LSL_Api) without having to
 reference OpenSim.Data just for this.

---
 .../SimianGrid/SimianGridServiceConnector.cs       |  4 +-
 OpenSim/Services/GridService/GridService.cs        | 48 +++++++++++-----------
 OpenSim/Services/GridService/HypergridLinker.cs    |  6 +--
 3 files changed, 29 insertions(+), 29 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 35cb408..038a4bf 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -384,8 +384,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
             if (response["Success"].AsBoolean())
             {
                 OSDMap extraData = response["ExtraData"] as OSDMap;
-                int enabled = response["Enabled"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.RegionOnline : 0;
-                int hypergrid = extraData["HyperGrid"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.Hyperlink : 0;
+                int enabled = response["Enabled"].AsBoolean() ? (int)OpenSim.Framework.RegionFlags.RegionOnline : 0;
+                int hypergrid = extraData["HyperGrid"].AsBoolean() ? (int)OpenSim.Framework.RegionFlags.Hyperlink : 0;
                 int flags =  enabled | hypergrid;
                 m_log.DebugFormat("[SGGC] enabled - {0} hg - {1} flags - {2}", enabled, hypergrid, flags);
                 return flags;
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 5bdea06..ee3b858 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -151,11 +151,11 @@ namespace OpenSim.Services.GridService
                 //
                 // Get it's flags
                 //
-                OpenSim.Data.RegionFlags rflags = (OpenSim.Data.RegionFlags)Convert.ToInt32(region.Data["flags"]);
+                OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(region.Data["flags"]);
 
                 // Is this a reservation?
                 //
-                if ((rflags & OpenSim.Data.RegionFlags.Reservation) != 0)
+                if ((rflags & OpenSim.Framework.RegionFlags.Reservation) != 0)
                 {
                     // Regions reserved for the null key cannot be taken.
                     if ((string)region.Data["PrincipalID"] == UUID.Zero.ToString())
@@ -166,10 +166,10 @@ namespace OpenSim.Services.GridService
                     // NOTE: Fudging the flags value here, so these flags
                     //       should not be used elsewhere. Don't optimize
                     //       this with the later retrieval of the same flags!
-                    rflags |= OpenSim.Data.RegionFlags.Authenticate;
+                    rflags |= OpenSim.Framework.RegionFlags.Authenticate;
                 }
 
-                if ((rflags & OpenSim.Data.RegionFlags.Authenticate) != 0)
+                if ((rflags & OpenSim.Framework.RegionFlags.Authenticate) != 0)
                 {
                     // Can we authenticate at all?
                     //
@@ -205,10 +205,10 @@ namespace OpenSim.Services.GridService
             if ((region != null) && (region.RegionID == regionInfos.RegionID) && 
                 ((region.posX != regionInfos.RegionLocX) || (region.posY != regionInfos.RegionLocY)))
             {
-                if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Data.RegionFlags.NoMove) != 0)
+                if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.NoMove) != 0)
                     return "Can't move this region";
 
-                if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Data.RegionFlags.LockedOut) != 0)
+                if ((Convert.ToInt32(region.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.LockedOut) != 0)
                     return "Region locked out";
 
                 // Region reregistering in other coordinates. Delete the old entry
@@ -233,7 +233,7 @@ namespace OpenSim.Services.GridService
             {
                 int oldFlags = Convert.ToInt32(region.Data["flags"]);
 
-                oldFlags &= ~(int)OpenSim.Data.RegionFlags.Reservation;
+                oldFlags &= ~(int)OpenSim.Framework.RegionFlags.Reservation;
 
                 rdata.Data["flags"] = oldFlags.ToString(); // Preserve flags
             }
@@ -252,7 +252,7 @@ namespace OpenSim.Services.GridService
             }
 
             int flags = Convert.ToInt32(rdata.Data["flags"]);
-            flags |= (int)OpenSim.Data.RegionFlags.RegionOnline;
+            flags |= (int)OpenSim.Framework.RegionFlags.RegionOnline;
             rdata.Data["flags"] = flags.ToString();
 
             try
@@ -283,9 +283,9 @@ namespace OpenSim.Services.GridService
 
             int flags = Convert.ToInt32(region.Data["flags"]);
 
-            if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Data.RegionFlags.Persistent) != 0)
+            if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Framework.RegionFlags.Persistent) != 0)
             {
-                flags &= ~(int)OpenSim.Data.RegionFlags.RegionOnline;
+                flags &= ~(int)OpenSim.Framework.RegionFlags.RegionOnline;
                 region.Data["flags"] = flags.ToString();
                 region.Data["last_seen"] = Util.UnixTimeSinceEpoch();
                 try
@@ -320,7 +320,7 @@ namespace OpenSim.Services.GridService
                     if (rdata.RegionID != regionID)
                     {
                         int flags = Convert.ToInt32(rdata.Data["flags"]);
-                        if ((flags & (int)Data.RegionFlags.Hyperlink) == 0) // no hyperlinks as neighbours
+                        if ((flags & (int)Framework.RegionFlags.Hyperlink) == 0) // no hyperlinks as neighbours
                             rinfos.Add(RegionData2RegionInfo(rdata));
                     }
                 }
@@ -470,7 +470,7 @@ namespace OpenSim.Services.GridService
 
             foreach (RegionData r in regions)
             {
-                if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Data.RegionFlags.RegionOnline) != 0)
+                if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.RegionOnline) != 0)
                     ret.Add(RegionData2RegionInfo(r));
             }
 
@@ -486,7 +486,7 @@ namespace OpenSim.Services.GridService
 
             foreach (RegionData r in regions)
             {
-                if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Data.RegionFlags.RegionOnline) != 0)
+                if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.RegionOnline) != 0)
                     ret.Add(RegionData2RegionInfo(r));
             }
 
@@ -502,7 +502,7 @@ namespace OpenSim.Services.GridService
 
             foreach (RegionData r in regions)
             {
-                if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Data.RegionFlags.RegionOnline) != 0)
+                if ((Convert.ToInt32(r.Data["flags"]) & (int)OpenSim.Framework.RegionFlags.RegionOnline) != 0)
                     ret.Add(RegionData2RegionInfo(r));
             }
 
@@ -629,7 +629,7 @@ namespace OpenSim.Services.GridService
 
         private void OutputRegionToConsole(RegionData r)
         {
-            OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
+            OpenSim.Framework.RegionFlags flags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(r.Data["flags"]);
 
             ConsoleDisplayList dispList = new ConsoleDisplayList();
             dispList.AddRow("Region Name", r.RegionName);
@@ -659,7 +659,7 @@ namespace OpenSim.Services.GridService
 
             foreach (RegionData r in regions)
             {
-                OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]);
+                OpenSim.Framework.RegionFlags flags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(r.Data["flags"]);
                 dispTable.AddRow(
                     r.RegionName,
                     r.RegionID.ToString(),
@@ -673,7 +673,7 @@ namespace OpenSim.Services.GridService
 
         private int ParseFlags(int prev, string flags)
         {
-            OpenSim.Data.RegionFlags f = (OpenSim.Data.RegionFlags)prev;
+            OpenSim.Framework.RegionFlags f = (OpenSim.Framework.RegionFlags)prev;
 
             string[] parts = flags.Split(new char[] {',', ' '}, StringSplitOptions.RemoveEmptyEntries);
 
@@ -685,18 +685,18 @@ namespace OpenSim.Services.GridService
                 {
                     if (p.StartsWith("+"))
                     {
-                        val = (int)Enum.Parse(typeof(OpenSim.Data.RegionFlags), p.Substring(1));
-                        f |= (OpenSim.Data.RegionFlags)val;
+                        val = (int)Enum.Parse(typeof(OpenSim.Framework.RegionFlags), p.Substring(1));
+                        f |= (OpenSim.Framework.RegionFlags)val;
                     }
                     else if (p.StartsWith("-"))
                     {
-                        val = (int)Enum.Parse(typeof(OpenSim.Data.RegionFlags), p.Substring(1));
-                        f &= ~(OpenSim.Data.RegionFlags)val;
+                        val = (int)Enum.Parse(typeof(OpenSim.Framework.RegionFlags), p.Substring(1));
+                        f &= ~(OpenSim.Framework.RegionFlags)val;
                     }
                     else
                     {
-                        val = (int)Enum.Parse(typeof(OpenSim.Data.RegionFlags), p);
-                        f |= (OpenSim.Data.RegionFlags)val;
+                        val = (int)Enum.Parse(typeof(OpenSim.Framework.RegionFlags), p);
+                        f |= (OpenSim.Framework.RegionFlags)val;
                     }
                 }
                 catch (Exception)
@@ -728,7 +728,7 @@ namespace OpenSim.Services.GridService
                 int flags = Convert.ToInt32(r.Data["flags"]);
                 flags = ParseFlags(flags, cmd[4]);
                 r.Data["flags"] = flags.ToString();
-                OpenSim.Data.RegionFlags f = (OpenSim.Data.RegionFlags)flags;
+                OpenSim.Framework.RegionFlags f = (OpenSim.Framework.RegionFlags)flags;
 
                 MainConsole.Instance.Output(String.Format("Set region {0} to {1}", r.RegionName, f));
                 m_Database.Store(r);
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 78eab3d..743d089 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -390,8 +390,8 @@ namespace OpenSim.Services.GridService
             List<RegionData> regions = m_Database.Get(mapName, m_ScopeID);
             if (regions != null && regions.Count > 0)
             {
-                OpenSim.Data.RegionFlags rflags = (OpenSim.Data.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]);
-                if ((rflags & OpenSim.Data.RegionFlags.Hyperlink) != 0)
+                OpenSim.Framework.RegionFlags rflags = (OpenSim.Framework.RegionFlags)Convert.ToInt32(regions[0].Data["flags"]);
+                if ((rflags & OpenSim.Framework.RegionFlags.Hyperlink) != 0)
                 {
                     regInfo = new GridRegion(); 
                     regInfo.RegionID = regions[0].RegionID;
@@ -460,7 +460,7 @@ namespace OpenSim.Services.GridService
         private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle)
         {
             RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo);
-            int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline;
+            int flags = (int)OpenSim.Framework.RegionFlags.Hyperlink + (int)OpenSim.Framework.RegionFlags.NoDirectLogin + (int)OpenSim.Framework.RegionFlags.RegionOnline;
             rdata.Data["flags"] = flags.ToString();
 
             m_Database.Store(rdata);
-- 
cgit v1.1


From ef3cc2e507a545bfcffc804015ee3ec5b8a260e0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 9 Oct 2012 01:40:40 +0100
Subject: minor: Add documentation to IGridService.GetRegionFlags()

---
 OpenSim/Services/Interfaces/IGridService.cs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index d809996..d7da056 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -100,6 +100,19 @@ namespace OpenSim.Services.Interfaces
         List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y);
         List<GridRegion> GetHyperlinks(UUID scopeID);
 
+        /// <summary>
+        /// Get internal OpenSimulator region flags.
+        /// </summary>
+        /// <remarks>
+        /// See OpenSimulator.Framework.RegionFlags.  These are not returned in the GridRegion structure -
+        /// they currently need to be requested separately.  Possibly this should change to avoid multiple service calls
+        /// in some situations.
+        /// </remarks>
+        /// <returns>
+        /// The region flags.
+        /// </returns>
+        /// <param name='scopeID'></param>
+        /// <param name='regionID'></param>
         int GetRegionFlags(UUID scopeID, UUID regionID);
     }
 
-- 
cgit v1.1


From 8459b98f68d4c9c473e1d5e9f74bfba2aa5f50b8 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 16 Oct 2012 01:39:39 +0100
Subject: minor: Comment out log message on every FRIENDS SIM CONNECTOR request
 for now.

---
 OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
index 3fd0c53..e235733 100644
--- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
+++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
@@ -153,7 +153,7 @@ namespace OpenSim.Services.Connectors.Friends
             if (!region.ServerURI.EndsWith("/"))
                 path = "/" + path;
             string uri = region.ServerURI + path;
-            m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri);
+//            m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri);
 
             try
             {
-- 
cgit v1.1


From da2b23f18d232230ac4d967f8d3b256aebd4741e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 20 Oct 2012 02:02:13 +0100
Subject: Improve efficiency of friends notification by only make one
 PresenceService call for all friends rather than one for each friend.

However, large groups could still take a very long time since we still need to message each avatar on different simulators.
---
 OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | 4 ++--
 OpenSim/Services/HypergridService/HGFriendsService.cs      | 2 +-
 OpenSim/Services/HypergridService/UserAgentService.cs      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
index e235733..6d5ce4b 100644
--- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
+++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Services.Connectors.Friends
             return Call(region, sendData);
         }
 
-        public bool StatusNotify(GridRegion region, UUID userID, UUID friendID, bool online)
+        public bool StatusNotify(GridRegion region, UUID userID, string friendID, bool online)
         {
             Dictionary<string, object> sendData = new Dictionary<string, object>();
             //sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
@@ -136,7 +136,7 @@ namespace OpenSim.Services.Connectors.Friends
             sendData["METHOD"] = "status";
 
             sendData["FromID"] = userID.ToString();
-            sendData["ToID"] = friendID.ToString();
+            sendData["ToID"] = friendID;
             sendData["Online"] = online.ToString();
 
             return Call(region, sendData);
diff --git a/OpenSim/Services/HypergridService/HGFriendsService.cs b/OpenSim/Services/HypergridService/HGFriendsService.cs
index 98423d7..a8bcfb2 100644
--- a/OpenSim/Services/HypergridService/HGFriendsService.cs
+++ b/OpenSim/Services/HypergridService/HGFriendsService.cs
@@ -397,7 +397,7 @@ namespace OpenSim.Services.HypergridService
                     if (region != null)
                     {
                         m_log.DebugFormat("[HGFRIENDS SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline"));
-                        m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online);
+                        m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online);
                     }
                 }
             }
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index a6fc731..a26a922 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -504,7 +504,7 @@ namespace OpenSim.Services.HypergridService
                     if (region != null)
                     {
                         m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline"));
-                        m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online);
+                        m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online);
                     }
                 }
             }
-- 
cgit v1.1


From ac037dfe210f416e6355bd7c1210f25d6cb90f63 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 20 Oct 2012 02:26:08 +0100
Subject: Add method doc for IPresenceService

---
 OpenSim/Services/Interfaces/IPresenceService.cs | 38 ++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs
index 8d583ff..90f9842 100644
--- a/OpenSim/Services/Interfaces/IPresenceService.cs
+++ b/OpenSim/Services/Interfaces/IPresenceService.cs
@@ -61,13 +61,49 @@ namespace OpenSim.Services.Interfaces
 
     public interface IPresenceService
     {
+        /// <summary>
+        /// Store session information.
+        /// </summary>
+        /// <returns>/returns>
+        /// <param name='userID'></param>
+        /// <param name='sessionID'></param>
+        /// <param name='secureSessionID'></param>
         bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID);
+
+        /// <summary>
+        /// Remove session information.
+        /// </summary>
+        /// <returns></returns>
+        /// <param name='sessionID'></param>
         bool LogoutAgent(UUID sessionID);
+
+        /// <summary>
+        /// Remove session information for all agents in the given region.
+        /// </summary>
+        /// <returns></returns>
+        /// <param name='regionID'></param>
         bool LogoutRegionAgents(UUID regionID);
 
+        /// <summary>
+        /// Update data for an existing session.
+        /// </summary>
+        /// <returns></returns>
+        /// <param name='sessionID'></param>
+        /// <param name='regionID'></param>
         bool ReportAgent(UUID sessionID, UUID regionID);
 
+        /// <summary>
+        /// Get session information for a given session ID.
+        /// </summary>
+        /// <returns></returns>
+        /// <param name='sessionID'></param>
         PresenceInfo GetAgent(UUID sessionID);
+
+        /// <summary>
+        /// Get session information for a collection of users.
+        /// </summary>
+        /// <returns>Session information for the users.</returns>
+        /// <param name='userIDs'></param>
         PresenceInfo[] GetAgents(string[] userIDs);
     }
-}
+}
\ No newline at end of file
-- 
cgit v1.1


From 9bc4dc6c5f7c8d1430db31a657399d0bf794a7f7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 30 Oct 2012 01:19:32 +0000
Subject: Add method doc to IAssetService.Get(string, object, AssetRetrieved)
 outlining the situations in which AssetRetrieved may be called back with a
 null AssetBase.

These situations include asset not found and remote service not responding.
---
 OpenSim/Services/Interfaces/IAssetService.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Interfaces/IAssetService.cs b/OpenSim/Services/Interfaces/IAssetService.cs
index 80494f1..3c469c6 100644
--- a/OpenSim/Services/Interfaces/IAssetService.cs
+++ b/OpenSim/Services/Interfaces/IAssetService.cs
@@ -68,7 +68,11 @@ namespace OpenSim.Services.Interfaces
         /// </summary>
         /// <param name="id">The asset id</param>
         /// <param name="sender">Represents the requester.  Passed back via the handler</param>
-        /// <param name="handler">The handler to call back once the asset has been retrieved</param>
+        /// <param name="handler">
+        /// The handler to call back once the asset has been retrieved.  This will be called back with a null AssetBase
+        /// if the asset could not be found for some reason (e.g. if it does not exist, if a remote asset service
+        /// was not contactable, if it is not in the database, etc.).
+        /// </param>
         /// <returns>True if the id was parseable, false otherwise</returns>
         bool Get(string id, Object sender, AssetRetrieved handler);
 
-- 
cgit v1.1


From 462ad336dcd59dfc4325aed9e6d635aa866cd094 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 2 Nov 2012 00:02:10 +0000
Subject: Move check to allow only deletion of maptiles up to
 AssetServerDeleteHandler from AssetService.

This allows us to use a common check for both AssetService and XAssetService.
It also allows future console commands to delete an asset.
As before, deletion of maptile assets is not allowed remotely unless this is explicitly configured.
---
 OpenSim/Services/AssetService/AssetService.cs  | 17 ++---------------
 OpenSim/Services/AssetService/XAssetService.cs | 18 ++----------------
 2 files changed, 4 insertions(+), 31 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index b1f0f7e..e7eb6fe 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Services.AssetService
 
                     if (assetLoaderEnabled)
                     {
-                        m_log.DebugFormat("[ASSET]: Loading default asset set from {0}", loaderArgs);
+                        m_log.DebugFormat("[ASSET SERVICE]: Loading default asset set from {0}", loaderArgs);
 
                         m_AssetLoader.ForEachDefaultXmlAsset(
                             loaderArgs,
@@ -197,20 +197,7 @@ namespace OpenSim.Services.AssetService
             if (!UUID.TryParse(id, out assetID))
                 return false;
 
-            AssetBase asset = m_Database.GetAsset(assetID);
-            if (asset == null)
-                return false;
-
-            if ((int)(asset.Flags & AssetFlags.Maptile) != 0)
-            {
-                return m_Database.Delete(id);
-            }
-            else
-            {
-                m_log.DebugFormat("[ASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id);
-            }
-
-            return false;
+            return m_Database.Delete(id);
         }
     }
 }
\ No newline at end of file
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs
index e62bcb5..a1d10ed 100644
--- a/OpenSim/Services/AssetService/XAssetService.cs
+++ b/OpenSim/Services/AssetService/XAssetService.cs
@@ -194,21 +194,7 @@ namespace OpenSim.Services.AssetService
             if (!UUID.TryParse(id, out assetID))
                 return false;
 
-            AssetBase asset = m_Database.GetAsset(assetID);
-            if (asset == null)
-                return false;
-
-            if ((int)(asset.Flags & AssetFlags.Maptile) != 0)
-            {
-                return m_Database.Delete(id);
-            }
-            else
-            {
-                m_log.DebugFormat("[XASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id);
-            }
-
-            return false;
+            return m_Database.Delete(id);
         }
     }
-}
-
+}
\ No newline at end of file
-- 
cgit v1.1


From 7412795a0bedae060e9f2bce2fa12e0497916f6e Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Fri, 2 Nov 2012 08:05:56 -0700
Subject: HG: flip all configs to HG2.0. PLEASE CHECK YOUR EXISTING HG CONFIGS
 AGAINST THESE.

---
 .../Services/HypergridService/HGSuitcaseInventoryService.cs    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 556a0da..677bd7b 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Services.HypergridService
                 m_ConfigName = configName;
 
             if (m_Database == null)
-                m_log.WarnFormat("[XXX]: m_Database is null!");
+                m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: m_Database is null!");
 
             //
             // Try reading the [InventoryService] section, if it exists
@@ -301,7 +301,7 @@ namespace OpenSim.Services.HypergridService
 
         public override bool AddFolder(InventoryFolderBase folder)
         {
-            m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder {0} {1}", folder.Name, folder.ParentID);
+            //m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder {0} {1}", folder.Name, folder.ParentID);
             // Let's do a bit of sanity checking, more than the base service does
             // make sure the given folder's parent folder exists under the suitcase tree of this user
 
@@ -323,7 +323,7 @@ namespace OpenSim.Services.HypergridService
 
         public override bool UpdateFolder(InventoryFolderBase folder)
         {
-            m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version);
+            //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version);
             if (!IsWithinSuitcaseTree(folder.Owner, folder.ID))
             {
                 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: folder {0} not within Suitcase tree", folder.Name);
@@ -584,7 +584,7 @@ namespace OpenSim.Services.HypergridService
                 {
                     if (a.Wearables[i][j].ItemID == itemID)
                     {
-                        m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID); 
+                        //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID); 
                         return true;
                     }
                 }
@@ -593,7 +593,7 @@ namespace OpenSim.Services.HypergridService
             // Check attachments
             if (a.GetAttachmentForItem(itemID) != null)
             {
-                m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID); 
+                //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID); 
                 return true;
             }
 
-- 
cgit v1.1


From fd2bee8da19c950b4d9abf5af2f66c172dbc2268 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Fri, 2 Nov 2012 16:43:38 +0100
Subject: Squash reporting HelloNeighbor exception - it simply means the other
 sim is down, no need for yellow ink.

---
 .../Services/Connectors/Neighbour/NeighbourServicesConnector.cs   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
index 7429293..7688e0f 100644
--- a/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Neighbour/NeighbourServicesConnector.cs
@@ -153,9 +153,9 @@ namespace OpenSim.Services.Connectors
             }
             catch (Exception e)
             {
-                m_log.WarnFormat(
-                    "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}.  Exception {2}{3}",
-                    thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
+//                m_log.WarnFormat(
+//                    "[NEIGHBOUR SERVICE CONNCTOR]: Unable to send HelloNeighbour from {0} to {1}.  Exception {2}{3}",
+//                    thisRegion.RegionName, region.RegionName, e.Message, e.StackTrace);
 
                 return false;
             }
@@ -202,4 +202,4 @@ namespace OpenSim.Services.Connectors
             return true;
         }
     }
-}
\ No newline at end of file
+}
-- 
cgit v1.1


From 783443705da92c2ebc85c7999d11ef79d014dd73 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 3 Nov 2012 12:03:47 -0700
Subject: HG Suitcase Inventory: if RootFolder type doesn't work, look for any
 folder with parentID=UUID.Zero

---
 OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 677bd7b..784f136 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -460,6 +460,15 @@ namespace OpenSim.Services.HypergridService
 
             if (folders != null && folders.Length > 0)
                 return folders[0];
+
+            // OK, so the RootFolder type didn't work. Let's look for any type with parent UUID.Zero.
+            folders = m_Database.GetFolders(
+                new string[] { "agentID", "folderName", "parentFolderID" },
+                new string[] { principalID.ToString(), "My Inventory", UUID.Zero.ToString() });
+
+            if (folders != null && folders.Length > 0)
+                return folders[0];
+
             return null;
         }
 
-- 
cgit v1.1


From eb273b808ee9723ff386729b0f19e5770ef86af4 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 7 Nov 2012 19:59:54 -0800
Subject: HG: Hopefully this fixes the issues with port 80 once and for all.

---
 .../Hypergrid/GatekeeperServiceConnector.cs        |  2 +-
 .../Services/HypergridService/GatekeeperService.cs | 23 +++++++++++++++++++++-
 2 files changed, 23 insertions(+), 2 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
index 19dffc3..5bcff48 100644
--- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs
@@ -321,7 +321,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
                 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
                 args["teleport_flags"] = OSD.FromString(flags.ToString());
 
-                OSDMap result = WebUtil.PostToService(uri, args, 20000);
+                OSDMap result = WebUtil.PostToService(uri, args, 80000);
                 if (result["Success"].AsBoolean())
                 {
                     OSDMap unpacked = (OSDMap)result["_Result"];
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 004311f..7b84d55 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -68,6 +68,7 @@ namespace OpenSim.Services.HypergridService
         private static UUID m_ScopeID;
         private static bool m_AllowTeleportsToAnyRegion;
         private static string m_ExternalName;
+        private static Uri m_Uri;
         private static GridRegion m_DefaultGatewayRegion;
 
         public GatekeeperService(IConfigSource config, ISimulationService simService)
@@ -99,6 +100,15 @@ namespace OpenSim.Services.HypergridService
                 if (m_ExternalName != string.Empty && !m_ExternalName.EndsWith("/"))
                     m_ExternalName = m_ExternalName + "/";
 
+                try
+                {
+                    m_Uri = new Uri(m_ExternalName);
+                }
+                catch
+                {
+                    m_log.WarnFormat("[GATEKEEPER SERVICE]: Malformed gatekeeper address {0}", m_ExternalName);
+                }
+
                 Object[] args = new Object[] { config };
                 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
                 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
@@ -433,7 +443,18 @@ namespace OpenSim.Services.HypergridService
             string externalname = m_ExternalName.TrimEnd(trailing_slash);
             m_log.DebugFormat("[GATEKEEPER SERVICE]: Verifying {0} against {1}", addressee, externalname);
 
-            return string.Equals(addressee, externalname, StringComparison.OrdinalIgnoreCase);
+            Uri uri;
+            try
+            {
+                uri = new Uri(addressee);
+            }
+            catch
+            {
+                m_log.DebugFormat("[GATEKEEPER SERVICE]: Visitor provided malformed service address {0}", addressee);
+                return false;
+            }
+
+            return string.Equals(uri.GetLeftPart(UriPartial.Authority), m_Uri.GetLeftPart(UriPartial.Authority), StringComparison.OrdinalIgnoreCase) ;
         }
 
         #endregion
-- 
cgit v1.1


From 75c880a6f3631a527b532773a8a493309a96028e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 9 Nov 2012 00:59:18 +0000
Subject: Update parent inventory folder version numbers when folders are
 moved/created/deleted to match version numbers cached by viewers.

This is done in the way that one would expect (e.g. moving a folder increments version number on both source and destination parent folders).
This should hopefully improve viewer reuse of its cached inventory information.
Currently MySQL only but will be implement for SQLite/MSSQL if there are no issues.
---
 OpenSim/Services/InventoryService/XInventoryService.cs | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 309dab4..9abc5e4 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -400,16 +400,7 @@ namespace OpenSim.Services.InventoryService
 
         public virtual bool MoveFolder(InventoryFolderBase folder)
         {
-            XInventoryFolder[] x = m_Database.GetFolders(
-                    new string[] { "folderID" },
-                    new string[] { folder.ID.ToString() });
-
-            if (x.Length == 0)
-                return false;
-
-            x[0].parentFolderID = folder.ParentID;
-
-            return m_Database.StoreFolder(x[0]);
+            return m_Database.MoveFolder(folder.ID.ToString(), folder.ParentID.ToString());
         }
 
         // We don't check the principal's ID here
-- 
cgit v1.1


From 86903f23dd9c0e671fcc9854c031bcc0c6d6cc7f Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Mon, 12 Nov 2012 18:08:02 -0800
Subject: Cleanup on region modules: gave short node id's to all of them.

---
 OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs   | 2 +-
 .../Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs       | 2 +-
 OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs  | 2 +-
 .../Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs   | 2 +-
 .../Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs    | 2 +-
 OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs                | 2 +-
 .../Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
index 6bfc5cc..63a32e7 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// <summary>
     /// Connects to the SimianGrid asset service
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianAssetServiceConnector")]
     public class SimianAssetServiceConnector : IAssetService, ISharedRegionModule
     {
         private static readonly ILog m_log =
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
index 69f6ed2..6603f6e 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAuthenticationServiceConnector.cs
@@ -43,7 +43,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// <summary>
     /// Connects authentication/authorization to the SimianGrid backend
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianAuthenticationServiceConnector")]
     public class SimianAuthenticationServiceConnector : IAuthenticationService, ISharedRegionModule
     {
         private static readonly ILog m_log =
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
index 360f0dd..841bfa0 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// <summary>
     /// Connects avatar appearance data to the SimianGrid backend
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianAvatarServiceConnector")]
     public class SimianAvatarServiceConnector : IAvatarService, ISharedRegionModule
     {
         private static readonly ILog m_log =
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index f828abb..4d7841b 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// <summary>
     /// Connects avatar inventories to the SimianGrid backend
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianInventoryServiceConnector")]
     public class SimianInventoryServiceConnector : IInventoryService, ISharedRegionModule
     {
         private static readonly ILog m_log =
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index ca1b64f..854bea4 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// Connects avatar presence information (for tracking current location and
     /// message routing) to the SimianGrid backend
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianPresenceServiceConnector")]
     public class SimianPresenceServiceConnector : IPresenceService, IGridUserService, ISharedRegionModule
     {
         private static readonly ILog m_log =
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
index 6aefc38..bd8069f 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// Connects avatar profile and classified queries to the SimianGrid
     /// backend
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianProfiles")]
     public class SimianProfiles : INonSharedRegionModule
     {
         private static readonly ILog m_log =
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index 4350749..6e32b3a 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
     /// Connects user account data (creating new users, looking up existing 
     /// users) to the SimianGrid backend
     /// </summary>
-    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
+    [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianUserAccountServiceConnector")]
     public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule
     {
         private const double CACHE_EXPIRATION_SECONDS = 120.0;
-- 
cgit v1.1


From df62d113abf5d9264caca7f2e554d061c260e522 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Wed, 14 Nov 2012 21:18:18 -0800
Subject: The last few AssemblyInfos. Finished!

---
 .../AssetService/Properties/AssemblyInfo.cs        | 33 ++++++++++++++++++++++
 .../Properties/AssemblyInfo.cs                     | 33 ++++++++++++++++++++++
 .../Properties/AssemblyInfo.cs                     | 33 ++++++++++++++++++++++
 .../AvatarService/Properties/AssemblyInfo.cs       | 33 ++++++++++++++++++++++
 OpenSim/Services/Base/Properties/AssemblyInfo.cs   | 33 ++++++++++++++++++++++
 .../Services/Connectors/Properties/AssemblyInfo.cs | 33 ++++++++++++++++++++++
 .../FreeswitchService/Properties/AssemblyInfo.cs   | 33 ++++++++++++++++++++++
 .../Services/Friends/Properties/AssemblyInfo.cs    | 33 ++++++++++++++++++++++
 .../GridService/Properties/AssemblyInfo.cs         | 33 ++++++++++++++++++++++
 .../HypergridService/Properties/AssemblyInfo.cs    | 33 ++++++++++++++++++++++
 .../Services/Interfaces/Properties/AssemblyInfo.cs | 33 ++++++++++++++++++++++
 .../InventoryService/Properties/AssemblyInfo.cs    | 33 ++++++++++++++++++++++
 .../LLLoginService/Properties/AssemblyInfo.cs      | 33 ++++++++++++++++++++++
 .../MapImageService/Properties/AssemblyInfo.cs     | 33 ++++++++++++++++++++++
 .../PresenceService/Properties/AssemblyInfo.cs     | 33 ++++++++++++++++++++++
 .../UserAccountService/Properties/AssemblyInfo.cs  | 33 ++++++++++++++++++++++
 16 files changed, 528 insertions(+)
 create mode 100644 OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/Base/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/Friends/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/GridService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
 create mode 100644 OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1509400
--- /dev/null
+++ b/OpenSim/Services/AssetService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.AssetService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fe57c0df-6101-4c23-ae1a-7b3e937843f9")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..0eb2ba7
--- /dev/null
+++ b/OpenSim/Services/AuthenticationService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.AuthenticationService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("Copyright ©  2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("74497b6f-8844-4ed4-8f0d-2caf7f42b760")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6d6b11e
--- /dev/null
+++ b/OpenSim/Services/AuthorizationService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.AuthorizationService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("822586bb-cf25-4a2a-ac3e-59edaf147be3")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..0944149
--- /dev/null
+++ b/OpenSim/Services/AvatarService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.AvatarService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0c9462ad-a5f3-46d1-ae9e-d6901fa33aa4")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/Base/Properties/AssemblyInfo.cs b/OpenSim/Services/Base/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..306b699
--- /dev/null
+++ b/OpenSim/Services/Base/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.Base")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("db9f6f73-3a56-497f-a465-4bea9cb86062")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..bfb681b
--- /dev/null
+++ b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.Connectors")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3ab0a9a1-3f45-4c07-a892-3848df8c0173")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..58c7283
--- /dev/null
+++ b/OpenSim/Services/FreeswitchService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.FreeswitchService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("af7d2401-cfd9-4ba5-8d6c-8af629984123")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/Friends/Properties/AssemblyInfo.cs b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..dddb091
--- /dev/null
+++ b/OpenSim/Services/Friends/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.FriendsService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a265d071-e152-42cc-9674-3ddd053977f5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/GridService/Properties/AssemblyInfo.cs b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5c0c8f4
--- /dev/null
+++ b/OpenSim/Services/GridService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.GridService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("96526d7b-4943-4b8e-9f0f-5908af621090")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..49f2176
--- /dev/null
+++ b/OpenSim/Services/HypergridService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.HypergridService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8584f3c1-26dd-4d95-86f4-cd8f0110a18f")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..4723553
--- /dev/null
+++ b/OpenSim/Services/Interfaces/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.Interfaces")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("39091de1-1c4c-4ebe-bb01-31551ec1749d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..41ad9f8
--- /dev/null
+++ b/OpenSim/Services/InventoryService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.InventoryService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d96d6d8c-9769-47e7-88dc-dbeb8fe7105a")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..62c6e0f
--- /dev/null
+++ b/OpenSim/Services/LLLoginService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.LLLoginService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("cbeb8f23-3896-4076-97fd-f955b0af6a93")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..23eb664
--- /dev/null
+++ b/OpenSim/Services/MapImageService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.MapImageService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5e679df7-1d2a-401a-8966-b93677bb5839")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8c03dd7
--- /dev/null
+++ b/OpenSim/Services/PresenceService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.PresenceService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a875a0bd-eab0-40a2-b5c4-3afddc3b4d2d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..24e1d16
--- /dev/null
+++ b/OpenSim/Services/UserAccountService/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("OpenSim.Services.UserAccountService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("http://opensimulator.org")]
+[assembly: AssemblyProduct("OpenSim")]
+[assembly: AssemblyCopyright("OpenSimulator developers")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fdb4771d-9928-4db4-aeb5-90cac2976584")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("0.7.5.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
-- 
cgit v1.1


From e25c51330a3d0009f4308bf45cf057e216c17ba9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 17 Nov 2012 00:12:25 +0000
Subject: Add basic XInventoryServicesTests.TestAddItem() regression test.

---
 .../Tests/XInventoryServiceTests.cs                | 87 ++++++++++++++++++++++
 1 file changed, 87 insertions(+)
 create mode 100644 OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
new file mode 100644
index 0000000..d2356c5
--- /dev/null
+++ b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) Contributors, http://opensimulator.org/
+ * See CONTRIBUTORS.TXT for a full list of copyright holders.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of the OpenSimulator Project nor the
+ *       names of its contributors may be used to endorse or promote products
+ *       derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+using System;
+using Nini.Config;
+using NUnit.Framework;
+using OpenMetaverse;
+using OpenSim.Framework;
+using OpenSim.Server.Base;
+using OpenSim.Services.Interfaces;
+using OpenSim.Tests.Common;
+
+namespace OpenSim.Services.InventoryService.Tests
+{
+    /// <summary>
+    /// Tests for the XInventoryService
+    /// </summary>
+    /// <remarks>
+    /// TODO: Fill out more tests.
+    /// </remarks>
+    [TestFixture]
+    public class XInventoryServiceTests
+    {
+        /// <summary>
+        /// Tests add item operation.
+        /// </summary>
+        /// <remarks>
+        /// TODO: Test all operations.
+        /// </remarks>
+        [Test]
+        public void TestAddItem()
+        {
+            string creatorId = TestHelpers.ParseTail(0x1).ToString();
+            UUID ownerId = TestHelpers.ParseTail(0x2);
+            UUID itemId = TestHelpers.ParseTail(0x10);
+            UUID assetId = TestHelpers.ParseTail(0x20);
+            string itemName = "item1";           
+
+            IConfigSource config = new IniConfigSource();            
+            config.AddConfig("InventoryService");
+            config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
+
+            IInventoryService xis 
+                = ServerUtils.LoadPlugin<IInventoryService>(
+                    "OpenSim.Services.InventoryService.dll:XInventoryService", new Object[] { config });
+
+            InventoryItemBase itemToStore 
+                = new InventoryItemBase(itemId, ownerId) 
+                    { CreatorId = creatorId.ToString(), AssetID = assetId, Name = itemName };
+
+            xis.AddItem(itemToStore);
+
+            InventoryItemBase itemRetrieved = new InventoryItemBase(itemId);
+            itemRetrieved = xis.GetItem(itemRetrieved);
+
+            Assert.That(itemRetrieved, Is.Not.Null);
+            Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId));
+            Assert.That(itemRetrieved.Owner, Is.EqualTo(ownerId));
+            Assert.That(itemRetrieved.AssetID, Is.EqualTo(assetId));
+            Assert.That(itemRetrieved.Name, Is.EqualTo(itemName));
+        }
+    }
+}
\ No newline at end of file
-- 
cgit v1.1


From 2aa58c58435e0071da185d32a3f3cb622f699de0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 17 Nov 2012 01:01:14 +0000
Subject: Do not allow invariants to change on calls to
 XInventoryService.UpdateItem()

This is to help track down http://opensimulator.org/mantis/view.php?id=6359 where creator IDs on items and rezzed objects have been reported to sometimes change.
This should never happen - a particular item should never change creators (if an item is given then a new item (with new id) is created).
Invariants are inventory type, asset type, folder (changed only on MoveItems()), CreatorIdentification and Owner.
If caller attempts to change an invariant, warning is logged but other properties are still changed.
If you see this warning, reporting on Mantis 6359 would be very welcome with the exact operation being done at the time.
---
 .../Tests/XInventoryServiceTests.cs                | 110 +++++++++++++++++++--
 .../Services/InventoryService/XInventoryService.cs |  40 ++++++++
 2 files changed, 140 insertions(+), 10 deletions(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
index d2356c5..9e3fa69 100644
--- a/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
+++ b/OpenSim/Services/InventoryService/Tests/XInventoryServiceTests.cs
@@ -43,8 +43,18 @@ namespace OpenSim.Services.InventoryService.Tests
     /// TODO: Fill out more tests.
     /// </remarks>
     [TestFixture]
-    public class XInventoryServiceTests
+    public class XInventoryServiceTests : OpenSimTestCase
     {
+        private IInventoryService CreateXInventoryService()
+        {
+            IConfigSource config = new IniConfigSource();            
+            config.AddConfig("InventoryService");
+            config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
+
+            return ServerUtils.LoadPlugin<IInventoryService>(
+                "OpenSim.Services.InventoryService.dll:XInventoryService", new Object[] { config });
+        }
+
         /// <summary>
         /// Tests add item operation.
         /// </summary>
@@ -54,25 +64,31 @@ namespace OpenSim.Services.InventoryService.Tests
         [Test]
         public void TestAddItem()
         {
+            TestHelpers.InMethod();
+
             string creatorId = TestHelpers.ParseTail(0x1).ToString();
             UUID ownerId = TestHelpers.ParseTail(0x2);
             UUID itemId = TestHelpers.ParseTail(0x10);
             UUID assetId = TestHelpers.ParseTail(0x20);
+            UUID folderId = TestHelpers.ParseTail(0x30);
+            int invType = (int)InventoryType.Animation;
+            int assetType = (int)AssetType.Animation;
             string itemName = "item1";           
 
-            IConfigSource config = new IniConfigSource();            
-            config.AddConfig("InventoryService");
-            config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
-
-            IInventoryService xis 
-                = ServerUtils.LoadPlugin<IInventoryService>(
-                    "OpenSim.Services.InventoryService.dll:XInventoryService", new Object[] { config });
+            IInventoryService xis = CreateXInventoryService();
 
             InventoryItemBase itemToStore 
                 = new InventoryItemBase(itemId, ownerId) 
-                    { CreatorId = creatorId.ToString(), AssetID = assetId, Name = itemName };
+                { 
+                    CreatorIdentification = creatorId.ToString(), 
+                    AssetID = assetId, 
+                    Name = itemName,  
+                    Folder = folderId, 
+                    InvType = invType, 
+                    AssetType = assetType 
+                };
 
-            xis.AddItem(itemToStore);
+            Assert.That(xis.AddItem(itemToStore), Is.True);
 
             InventoryItemBase itemRetrieved = new InventoryItemBase(itemId);
             itemRetrieved = xis.GetItem(itemRetrieved);
@@ -81,7 +97,81 @@ namespace OpenSim.Services.InventoryService.Tests
             Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId));
             Assert.That(itemRetrieved.Owner, Is.EqualTo(ownerId));
             Assert.That(itemRetrieved.AssetID, Is.EqualTo(assetId));
+            Assert.That(itemRetrieved.Folder, Is.EqualTo(folderId));
+            Assert.That(itemRetrieved.InvType, Is.EqualTo(invType));
+            Assert.That(itemRetrieved.AssetType, Is.EqualTo(assetType));
             Assert.That(itemRetrieved.Name, Is.EqualTo(itemName));
         }
+
+        [Test]
+        public void TestUpdateItem()
+        {
+            TestHelpers.InMethod();
+//            TestHelpers.EnableLogging();
+
+            string creatorId = TestHelpers.ParseTail(0x1).ToString();
+            UUID ownerId = TestHelpers.ParseTail(0x2);
+            UUID itemId = TestHelpers.ParseTail(0x10);
+            UUID assetId = TestHelpers.ParseTail(0x20);
+            UUID folderId = TestHelpers.ParseTail(0x30);
+            int invType = (int)InventoryType.Animation;
+            int assetType = (int)AssetType.Animation;
+            string itemName = "item1";           
+            string itemName2 = "item2";
+
+            IInventoryService xis = CreateXInventoryService();
+
+            InventoryItemBase itemToStore 
+                = new InventoryItemBase(itemId, ownerId) 
+                { 
+                    CreatorIdentification = creatorId.ToString(), 
+                    AssetID = assetId, 
+                    Name = itemName,  
+                    Folder = folderId, 
+                    InvType = invType, 
+                    AssetType = assetType 
+                };
+
+            Assert.That(xis.AddItem(itemToStore), Is.True);
+
+            // Normal update
+            itemToStore.Name = itemName2;
+
+            Assert.That(xis.UpdateItem(itemToStore), Is.True);
+
+            InventoryItemBase itemRetrieved = new InventoryItemBase(itemId);
+            itemRetrieved = xis.GetItem(itemRetrieved);
+
+            Assert.That(itemRetrieved, Is.Not.Null);
+            Assert.That(itemRetrieved.Name, Is.EqualTo(itemName2));
+
+            // Attempt to update properties that should never change
+            string creatorId2 = TestHelpers.ParseTail(0x7).ToString();
+            UUID ownerId2 = TestHelpers.ParseTail(0x8);
+            UUID folderId2 = TestHelpers.ParseTail(0x70);
+            int invType2 = (int)InventoryType.CallingCard;
+            int assetType2 = (int)AssetType.CallingCard;
+            string itemName3 = "item3"; 
+
+            itemToStore.CreatorIdentification = creatorId2.ToString();
+            itemToStore.Owner = ownerId2;
+            itemToStore.Folder = folderId2;
+            itemToStore.InvType = invType2;
+            itemToStore.AssetType = assetType2;
+            itemToStore.Name = itemName3;
+
+            Assert.That(xis.UpdateItem(itemToStore), Is.True);
+
+            itemRetrieved = xis.GetItem(itemRetrieved);
+
+            Assert.That(itemRetrieved, Is.Not.Null);
+            Assert.That(itemRetrieved.CreatorId, Is.EqualTo(creatorId));
+            Assert.That(itemRetrieved.Owner, Is.EqualTo(ownerId));
+            Assert.That(itemRetrieved.AssetID, Is.EqualTo(assetId));
+            Assert.That(itemRetrieved.Folder, Is.EqualTo(folderId));
+            Assert.That(itemRetrieved.InvType, Is.EqualTo(invType));
+            Assert.That(itemRetrieved.AssetType, Is.EqualTo(assetType));
+            Assert.That(itemRetrieved.Name, Is.EqualTo(itemName3));
+        }
     }
 }
\ No newline at end of file
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 9abc5e4..00faa44 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -476,6 +476,46 @@ namespace OpenSim.Services.InventoryService
 //            m_log.InfoFormat(
 //                "[XINVENTORY SERVICE]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder);
 
+            InventoryItemBase retrievedItem = GetItem(item);
+
+            if (retrievedItem == null)
+            {
+                m_log.WarnFormat(
+                    "[XINVENTORY SERVICE]: Tried to update item {0} {1}, owner {2} but no existing item found.", 
+                    item.Name, item.ID, item.Owner);
+
+                return false;
+            }
+
+            // Do not allow invariants to change.  Changes to folder ID occur in MoveItems()
+            if (retrievedItem.InvType != item.InvType 
+                || retrievedItem.AssetType != item.AssetType
+                || retrievedItem.Folder != item.Folder 
+                || retrievedItem.CreatorIdentification != item.CreatorIdentification 
+                || retrievedItem.Owner != item.Owner)
+            {
+                m_log.WarnFormat(
+                    "[XINVENTORY SERVICE]: Caller to UpdateItem() for {0} {1} tried to alter property(s) that should be invariant, (InvType, AssetType, Folder, CreatorIdentification, Owner), existing ({2}, {3}, {4}, {5}, {6}), update ({7}, {8}, {9}, {10}, {11})",
+                    retrievedItem.Name, 
+                    retrievedItem.ID, 
+                    retrievedItem.InvType, 
+                    retrievedItem.AssetType, 
+                    retrievedItem.Folder, 
+                    retrievedItem.CreatorIdentification, 
+                    retrievedItem.Owner,
+                    item.InvType,
+                    item.AssetType,
+                    item.Folder,
+                    item.CreatorIdentification,
+                    item.Owner);
+
+                item.InvType = retrievedItem.InvType;
+                item.AssetType = retrievedItem.AssetType;
+                item.Folder = retrievedItem.Folder;
+                item.CreatorIdentification = retrievedItem.CreatorIdentification;
+                item.Owner = retrievedItem.Owner;
+            }
+
             return m_Database.StoreItem(ConvertFromOpenSim(item));
         }
 
-- 
cgit v1.1


From 392e84e55402166f5b4ec708d3338efe70a94c2e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 17 Nov 2012 01:23:29 +0000
Subject: Remove unnecessary ability to directly set
 InventoryItemBase.CreatorIdAsUuid

This was necessary historically but hasn't been for many years.
Can still get CreatorIdAsUuid, which is really just a UUID cached version of the string CreatorId
---
 .../Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs    | 1 -
 1 file changed, 1 deletion(-)

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index 4d7841b..a391275 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -781,7 +781,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
                     invItem.CreationDate = item["CreationDate"].AsInteger();
                     invItem.CreatorId = item["CreatorID"].AsString();
                     invItem.CreatorData = item["CreatorData"].AsString();
-                    invItem.CreatorIdAsUuid = item["CreatorID"].AsUUID();
                     invItem.Description = item["Description"].AsString();
                     invItem.Folder = item["ParentID"].AsUUID();
                     invItem.ID = item["ID"].AsUUID();
-- 
cgit v1.1


From 5b79bfc4dfb757fd06d847ecfcbaf97bc700f03b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 17 Nov 2012 01:32:01 +0000
Subject: Remove old InventoryService, which has for a long time been replaced
 by XInventoryService.

---
 .../Services/InventoryService/InventoryService.cs  | 700 ---------------------
 .../InventoryService/InventoryServiceBase.cs       |  82 ---
 2 files changed, 782 deletions(-)
 delete mode 100644 OpenSim/Services/InventoryService/InventoryService.cs
 delete mode 100644 OpenSim/Services/InventoryService/InventoryServiceBase.cs

(limited to 'OpenSim/Services')

diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs
deleted file mode 100644
index 73dd06a..0000000
--- a/OpenSim/Services/InventoryService/InventoryService.cs
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the OpenSimulator Project nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using log4net;
-using Nini.Config;
-using OpenMetaverse;
-using OpenSim.Data;
-using OpenSim.Framework;
-using OpenSim.Services.Interfaces;
-
-namespace OpenSim.Services.InventoryService
-{
-    /// <summary>
-    /// The Inventory service reference implementation
-    /// </summary>
-    public class InventoryService : InventoryServiceBase, IInventoryService
-    {
-        private static readonly ILog m_log
-            = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
-        public InventoryService(IConfigSource config) : base(config)
-        {
-            m_log.Debug("[INVENTORY SERVICE]: Initialized.");
-        }
-
-        #region IInventoryServices methods
-
-        public string Host
-        {
-            get { return "default"; }
-        }
-
-        public List<InventoryFolderBase> GetInventorySkeleton(UUID userId)
-        {
-            m_log.DebugFormat("[INVENTORY SERVICE]: Getting inventory skeleton for {0}", userId);
-
-            InventoryFolderBase rootFolder = GetRootFolder(userId);
-
-            // Agent has no inventory structure yet.
-            if (null == rootFolder)
-            {
-                m_log.DebugFormat("[INVENTORY SERVICE]: No root folder");
-                return null;
-            }
-
-            List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
-
-            userFolders.Add(rootFolder);
-
-            IList<InventoryFolderBase> folders = m_Database.getFolderHierarchy(rootFolder.ID);
-            userFolders.AddRange(folders);
-
-//            m_log.DebugFormat("[INVENTORY SERVICE]: Got folder {0} {1}", folder.name, folder.folderID);
-
-            return userFolders;
-        }
-
-        public virtual bool HasInventoryForUser(UUID userID)
-        {
-            return false;
-        }
-
-        // See IInventoryServices
-        public virtual InventoryFolderBase GetRootFolder(UUID userID)
-        {
-            //m_log.DebugFormat("[INVENTORY SERVICE]: Getting root folder for {0}", userID);
-            
-            // Retrieve the first root folder we get from the DB.
-            InventoryFolderBase rootFolder = m_Database.getUserRootFolder(userID);
-            if (rootFolder != null)
-                return rootFolder;
-
-            // Return nothing if the plugin was unable to supply a root folder
-            return null;
-        }
-
-        // See IInventoryServices
-        public bool CreateUserInventory(UUID user)
-        {
-            InventoryFolderBase existingRootFolder;
-            try
-            {
-                existingRootFolder = GetRootFolder(user);
-            }
-            catch /*(Exception e)*/
-            {
-                // Munch the exception, it has already been reported
-                //
-                return false;
-            }
-
-            if (null != existingRootFolder)
-            {
-                m_log.WarnFormat(
-                    "[INVENTORY SERVICE]: Did not create a new inventory for user {0} since they already have "
-                    + "a root inventory folder with id {1}",
-                    user, existingRootFolder.ID);
-            }
-            else
-            {
-                UsersInventory inven = new UsersInventory();
-                inven.CreateNewInventorySet(user);
-                AddNewInventorySet(inven);
-
-                return true;
-            }
-
-            return false;
-        }
-
-        // See IInventoryServices
-
-        /// <summary>
-        /// Return a user's entire inventory synchronously
-        /// </summary>
-        /// <param name="rawUserID"></param>
-        /// <returns>The user's inventory.  If an inventory cannot be found then an empty collection is returned.</returns>
-        public InventoryCollection GetUserInventory(UUID userID)
-        {
-            m_log.InfoFormat("[INVENTORY SERVICE]: Processing request for inventory of {0}", userID);
-
-            // Uncomment me to simulate a slow responding inventory server
-            //Thread.Sleep(16000);
-
-            InventoryCollection invCollection = new InventoryCollection();
-
-            List<InventoryFolderBase> allFolders = GetInventorySkeleton(userID);
-
-            if (null == allFolders)
-            {
-                m_log.WarnFormat("[INVENTORY SERVICE]: No inventory found for user {0}", userID);
-
-                return invCollection;
-            }
-
-            List<InventoryItemBase> allItems = new List<InventoryItemBase>();
-
-            foreach (InventoryFolderBase folder in allFolders)
-            {
-                List<InventoryItemBase> items = GetFolderItems(userID, folder.ID);
-
-                if (items != null)
-                {
-                    allItems.InsertRange(0, items);
-                }
-            }
-
-            invCollection.UserID = userID;
-            invCollection.Folders = allFolders;
-            invCollection.Items = allItems;
-
-            //            foreach (InventoryFolderBase folder in invCollection.Folders)
-            //            {
-            //                m_log.DebugFormat("[GRID INVENTORY SERVICE]: Sending back folder {0} {1}", folder.Name, folder.ID);
-            //            }
-            //
-            //            foreach (InventoryItemBase item in invCollection.Items)
-            //            {
-            //                m_log.DebugFormat("[GRID INVENTORY SERVICE]: Sending back item {0} {1}, folder {2}", item.Name, item.ID, item.Folder);
-            //            }
-
-            m_log.InfoFormat(
-                "[INVENTORY SERVICE]: Sending back inventory response to user {0} containing {1} folders and {2} items",
-                invCollection.UserID, invCollection.Folders.Count, invCollection.Items.Count);
-
-            return invCollection;
-        }
-
-        /// <summary>
-        /// Asynchronous inventory fetch.
-        /// </summary>
-        /// <param name="userID"></param>
-        /// <param name="callback"></param>
-        public void GetUserInventory(UUID userID, InventoryReceiptCallback callback)
-        {
-            m_log.InfoFormat("[INVENTORY SERVICE]: Requesting inventory for user {0}", userID);
-
-            List<InventoryFolderImpl> folders = new List<InventoryFolderImpl>();
-            List<InventoryItemBase> items = new List<InventoryItemBase>();
-
-            List<InventoryFolderBase> skeletonFolders = GetInventorySkeleton(userID);
-
-            if (skeletonFolders != null)
-            {
-                InventoryFolderImpl rootFolder = null;
-
-                // Need to retrieve the root folder on the first pass
-                foreach (InventoryFolderBase folder in skeletonFolders)
-                {
-                    if (folder.ParentID == UUID.Zero)
-                    {
-                        rootFolder = new InventoryFolderImpl(folder);
-                        folders.Add(rootFolder);
-                        items.AddRange(GetFolderItems(userID, rootFolder.ID));
-                        break; // Only 1 root folder per user
-                    }
-                }
-
-                if (rootFolder != null)
-                {
-                    foreach (InventoryFolderBase folder in skeletonFolders)
-                    {
-                        if (folder.ID != rootFolder.ID)
-                        {
-                            folders.Add(new InventoryFolderImpl(folder));
-                            items.AddRange(GetFolderItems(userID, folder.ID));
-                        }
-                    }
-                }
-
-                m_log.InfoFormat(
-                    "[INVENTORY SERVICE]: Received inventory response for user {0} containing {1} folders and {2} items",
-                    userID, folders.Count, items.Count);
-            }
-            else
-            {
-                m_log.WarnFormat("[INVENTORY SERVICE]: User {0} inventory not available", userID);
-            }
-
-            Util.FireAndForget(delegate { callback(folders, items); });
-        }
-
-        public InventoryCollection GetFolderContent(UUID userID, UUID folderID)
-        {
-            // Uncomment me to simulate a slow responding inventory server
-            //Thread.Sleep(16000);
-
-            InventoryCollection invCollection = new InventoryCollection();
-
-            List<InventoryItemBase> items = GetFolderItems(userID, folderID);
-            List<InventoryFolderBase> folders = RequestSubFolders(folderID);
-
-            invCollection.UserID = userID;
-            invCollection.Folders = folders;
-            invCollection.Items = items;
-
-            m_log.DebugFormat("[INVENTORY SERVICE]: Found {0} items and {1} folders in folder {2}", items.Count, folders.Count, folderID);
-
-            return invCollection;
-        }
-
-        public InventoryFolderBase GetFolderForType(UUID userID, AssetType type)
-        {
-//            m_log.DebugFormat("[INVENTORY SERVICE]: Looking for folder type {0} for user {1}", type, userID);
-            
-            InventoryFolderBase root = m_Database.getUserRootFolder(userID);
-            if (root != null)
-            {
-                List<InventoryFolderBase> folders = RequestSubFolders(root.ID);
-
-                foreach (InventoryFolderBase folder in folders)
-                {
-                    if (folder.Type == (short)type)
-                    {
-//                        m_log.DebugFormat(
-//                            "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type);
-                        
-                        return folder;
-                    }
-                }
-            }
-
-            // we didn't find any folder of that type. Return the root folder
-            // hopefully the root folder is not null. If it is, too bad
-            return root;
-        }
-
-        public Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID)
-        {
-            InventoryFolderBase root = GetRootFolder(userID);
-            if (root != null)
-            {
-                InventoryCollection content = GetFolderContent(userID, root.ID);
-                if (content != null)
-                {
-                    Dictionary<AssetType, InventoryFolderBase> folders = new Dictionary<AssetType, InventoryFolderBase>();
-                    foreach (InventoryFolderBase folder in content.Folders)
-                    {
-                        if ((folder.Type != (short)AssetType.Folder) && (folder.Type != (short)AssetType.Unknown))
-                            folders[(AssetType)folder.Type] = folder;
-                    }
-                    m_log.DebugFormat("[INVENTORY SERVICE]: Got {0} system folders for {1}", folders.Count, userID);
-                    return folders;
-                }
-            }
-            m_log.WarnFormat("[INVENTORY SERVICE]: System folders for {0} not found", userID);
-            return new Dictionary<AssetType, InventoryFolderBase>();
-        }
-
-        public List<InventoryItemBase> GetActiveGestures(UUID userId)
-        {
-            List<InventoryItemBase> activeGestures = new List<InventoryItemBase>();
-            activeGestures.AddRange(m_Database.fetchActiveGestures(userId));
-            
-            return activeGestures;
-        }
-
-        #endregion
-
-        #region Methods used by GridInventoryService
-
-        public List<InventoryFolderBase> RequestSubFolders(UUID parentFolderID)
-        {
-            List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
-            
-            inventoryList.AddRange(m_Database.getInventoryFolders(parentFolderID));
-            
-            return inventoryList;
-        }
-
-        public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
-        {
-            List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
-            
-            itemsList.AddRange(m_Database.getInventoryInFolder(folderID));
-
-//            m_log.DebugFormat(
-//                "[INVENTORY SERVICE]: Found {0} items in folder {1} for {2}", itemsList.Count, folderID, userID);
-            
-            return itemsList;
-        }
-
-        #endregion
-
-        // See IInventoryServices
-        public virtual bool AddFolder(InventoryFolderBase folder)
-        {
-            m_log.DebugFormat(
-                "[INVENTORY SERVICE]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
-            m_Database.addInventoryFolder(folder);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        // See IInventoryServices
-        public virtual bool UpdateFolder(InventoryFolderBase folder)
-        {
-            m_log.DebugFormat(
-                "[INVENTORY SERVICE]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
-            m_Database.updateInventoryFolder(folder);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        // See IInventoryServices
-        public virtual bool MoveFolder(InventoryFolderBase folder)
-        {
-            m_log.DebugFormat(
-                "[INVENTORY SERVICE]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
-            m_Database.moveInventoryFolder(folder);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        // See IInventoryServices
-        public virtual bool AddItem(InventoryItemBase item)
-        {
-//            m_log.DebugFormat(
-//                "[INVENTORY SERVICE]: Adding item {0} {1} to folder {2} for {3}",
-//                item.Name, item.ID, item.Folder, item.Owner);
-
-            m_Database.addInventoryItem(item);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        // See IInventoryServices
-        public virtual bool UpdateItem(InventoryItemBase item)
-        {
-            m_log.InfoFormat(
-                "[INVENTORY SERVICE]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder);
-
-            m_Database.updateInventoryItem(item);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        public virtual bool MoveItems(UUID ownerID, List<InventoryItemBase> items)
-        {
-            m_log.InfoFormat(
-                "[INVENTORY SERVICE]: Moving {0} items from user {1}", items.Count, ownerID);
-
-            InventoryItemBase itm = null;
-            foreach (InventoryItemBase item in items)
-            {
-                itm = GetInventoryItem(item.ID);
-                itm.Folder = item.Folder;
-                if ((item.Name != null) && !item.Name.Equals(string.Empty))
-                    itm.Name = item.Name;
-                m_Database.updateInventoryItem(itm);
-            }
-
-            return true;
-        }
-
-        // See IInventoryServices
-        public virtual bool DeleteItems(UUID owner, List<UUID> itemIDs)
-        {
-            m_log.InfoFormat(
-                "[INVENTORY SERVICE]: Deleting {0} items from user {1}", itemIDs.Count, owner);
-
-            // uhh.....
-            foreach (UUID uuid in itemIDs)
-                m_Database.deleteInventoryItem(uuid);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        public virtual InventoryItemBase GetItem(InventoryItemBase item)
-        {
-            InventoryItemBase result = m_Database.getInventoryItem(item.ID);
-            if (result != null)
-                return result;
-            m_log.DebugFormat("[INVENTORY SERVICE]: GetItem failed to find item {0}", item.ID);
-            return null;
-        }
-
-        public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder)
-        {
-            InventoryFolderBase result = m_Database.getInventoryFolder(folder.ID);
-            if (result != null)
-                return result;
-
-            m_log.DebugFormat("[INVENTORY SERVICE]: GetFolder failed to find folder {0}", folder.ID);
-            return null;
-        }
-
-        public virtual bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
-        {
-            m_log.InfoFormat("[INVENTORY SERVICE]: Deleting {0} folders from user {1}", folderIDs.Count, ownerID);
-            foreach (UUID id in folderIDs)
-            {
-                InventoryFolderBase folder = new InventoryFolderBase(id, ownerID);
-                PurgeFolder(folder);
-                m_Database.deleteInventoryFolder(id);
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// Purge a folder of all items items and subfolders.
-        ///
-        /// FIXME: Really nasty in a sense, because we have to query the database to get information we may
-        /// already know...  Needs heavy refactoring.
-        /// </summary>
-        /// <param name="folder"></param>
-        public virtual bool PurgeFolder(InventoryFolderBase folder)
-        {
-            m_log.DebugFormat(
-                "[INVENTORY SERVICE]: Purging folder {0} {1} of its contents", folder.Name, folder.ID);
-
-            List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID);
-
-            foreach (InventoryFolderBase subFolder in subFolders)
-            {
-//                m_log.DebugFormat("[INVENTORY SERVICE]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID);
-
-                m_Database.deleteInventoryFolder(subFolder.ID);
-            }
-
-            List<InventoryItemBase> items = GetFolderItems(folder.Owner, folder.ID);
-
-            List<UUID> uuids = new List<UUID>();
-            foreach (InventoryItemBase item in items)
-            {
-                uuids.Add(item.ID);
-            }
-            DeleteItems(folder.Owner, uuids);
-
-            // FIXME: Should return false on failure
-            return true;
-        }
-
-        private void AddNewInventorySet(UsersInventory inventory)
-        {
-            foreach (InventoryFolderBase folder in inventory.Folders.Values)
-            {
-                AddFolder(folder);
-            }
-        }
-
-        public InventoryItemBase GetInventoryItem(UUID itemID)
-        {
-            InventoryItemBase item = m_Database.getInventoryItem(itemID);
-            if (item != null)
-                return item;
-
-            return null;
-        }
-
-        public int GetAssetPermissions(UUID userID, UUID assetID)
-        {
-            InventoryFolderBase parent = GetRootFolder(userID);
-            return FindAssetPerms(parent, assetID);
-        }
-
-        private int FindAssetPerms(InventoryFolderBase folder, UUID assetID)
-        {
-            InventoryCollection contents = GetFolderContent(folder.Owner, folder.ID);
-
-            int perms = 0;
-            foreach (InventoryItemBase item in contents.Items)
-            {
-                if (item.AssetID == assetID)
-                    perms = (int)item.CurrentPermissions | perms;
-            }
-
-            foreach (InventoryFolderBase subfolder in contents.Folders)
-                perms = perms | FindAssetPerms(subfolder, assetID);
-
-            return perms;
-        }
-
-        /// <summary>
-        /// Used to create a new user inventory.
-        /// </summary>
-        private class UsersInventory
-        {
-            public Dictionary<UUID, InventoryFolderBase> Folders = new Dictionary<UUID, InventoryFolderBase>();
-            public Dictionary<UUID, InventoryItemBase> Items = new Dictionary<UUID, InventoryItemBase>();
-
-            public virtual void CreateNewInventorySet(UUID user)
-            {
-                InventoryFolderBase folder = new InventoryFolderBase();
-
-                folder.ParentID = UUID.Zero;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "My Inventory";
-                folder.Type = (short)AssetType.Folder;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                UUID rootFolder = folder.ID;
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Animations";
-                folder.Type = (short)AssetType.Animation;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Body Parts";
-                folder.Type = (short)AssetType.Bodypart;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Calling Cards";
-                folder.Type = (short)AssetType.CallingCard;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Clothing";
-                folder.Type = (short)AssetType.Clothing;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Gestures";
-                folder.Type = (short)AssetType.Gesture;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Landmarks";
-                folder.Type = (short)AssetType.Landmark;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Lost And Found";
-                folder.Type = (short)AssetType.LostAndFoundFolder;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Notecards";
-                folder.Type = (short)AssetType.Notecard;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Objects";
-                folder.Type = (short)AssetType.Object;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Photo Album";
-                folder.Type = (short)AssetType.SnapshotFolder;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Scripts";
-                folder.Type = (short)AssetType.LSLText;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Sounds";
-                folder.Type = (short)AssetType.Sound;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Textures";
-                folder.Type = (short)AssetType.Texture;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-
-                folder = new InventoryFolderBase();
-                folder.ParentID = rootFolder;
-                folder.Owner = user;
-                folder.ID = UUID.Random();
-                folder.Name = "Trash";
-                folder.Type = (short)AssetType.TrashFolder;
-                folder.Version = 1;
-                Folders.Add(folder.ID, folder);
-            }
-        }
-    }
-}
diff --git a/OpenSim/Services/InventoryService/InventoryServiceBase.cs b/OpenSim/Services/InventoryService/InventoryServiceBase.cs
deleted file mode 100644
index 456e455..0000000
--- a/OpenSim/Services/InventoryService/InventoryServiceBase.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) Contributors, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of the OpenSimulator Project nor the
- *       names of its contributors may be used to endorse or promote products
- *       derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using Nini.Config;
-using OpenSim.Framework;
-using OpenSim.Data;
-using OpenSim.Services.Interfaces;
-using OpenSim.Services.Base;
-
-namespace OpenSim.Services.InventoryService
-{
-    public class InventoryServiceBase : ServiceBase
-    {
-        protected IInventoryDataPlugin m_Database = null;
-
-        public InventoryServiceBase(IConfigSource config) : base(config)
-        {
-            string dllName = String.Empty;
-            string connString = String.Empty;
-
-            //
-            // Try reading the [DatabaseService] section first, if it exists
-            //
-            IConfig dbConfig = config.Configs["DatabaseService"];
-            if (dbConfig != null)
-            {
-                dllName = dbConfig.GetString("StorageProvider", String.Empty);
-                connString = dbConfig.GetString("ConnectionString", String.Empty);
-            }
-
-            //
-            // Try reading the more specific [InventoryService] section, if it exists
-            //
-            IConfig inventoryConfig = config.Configs["InventoryService"];
-            if (inventoryConfig != null)
-            {
-                dllName = inventoryConfig.GetString("StorageProvider", dllName);
-                connString = inventoryConfig.GetString("ConnectionString", connString);
-            }
-
-            //
-            // We tried, but this doesn't exist. We can't proceed.
-            //
-            if (dllName.Equals(String.Empty))
-                throw new Exception("No InventoryService configuration");
-
-            m_Database = LoadPlugin<IInventoryDataPlugin>(dllName);
-            if (m_Database == null)
-                throw new Exception("Could not find a storage interface in the given module");
-
-            m_Database.Initialise(connString);
-        }
-
-    }
-}
-- 
cgit v1.1