From 99c7a43ffdb9c3b4dee984f7cd788742c6ee3e53 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 19 Aug 2009 04:39:02 +0100 Subject: Add rest console support to the user server. Will ask new questions at startup. To use, run it normally once, answering the questions, then run again with -console=rest. Also now supports -console=basic for a console that reads stdin --- OpenSim/Framework/UserConfig.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index 31838ad..b9e3665 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs @@ -46,6 +46,8 @@ namespace OpenSim.Framework public bool HttpSSL = ConfigSettings.DefaultUserServerHttpSSL; public uint DefaultUserLevel = 0; public string LibraryXmlfile = ""; + public string ConsoleUser = String.Empty; + public string ConsolePass = String.Empty; private Uri m_inventoryUrl; @@ -155,6 +157,12 @@ namespace OpenSim.Framework m_configMember.addConfigurationOption("default_loginLevel", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Minimum Level a user should have to login [0 default]", "0", false); + m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Remote console access user name [Default: disabled]", "0", false); + + m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Remote console access password [Default: disabled]", "0", false); + } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -209,6 +217,12 @@ namespace OpenSim.Framework case "library_location": LibraryXmlfile = (string)configuration_result; break; + case "console_user": + ConsoleUser = (string)configuration_result; + break; + case "console_pass": + ConsolePass = (string)configuration_result; + break; } return true; -- cgit v1.1 From dd0234f5005127c03760c2b9862ed1672f4a2e91 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 19 Aug 2009 05:15:25 +0100 Subject: Graft the REST console onto the grid server. Same procedure as with the user server. --- OpenSim/Framework/GridConfig.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index a3c1032..87fd3f0 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs @@ -45,6 +45,8 @@ namespace OpenSim.Framework public string SimSendKey = String.Empty; public string UserRecvKey = String.Empty; public string UserSendKey = String.Empty; + public string ConsoleUser = String.Empty; + public string ConsolePass = String.Empty; public GridConfig(string description, string filename) { @@ -95,6 +97,12 @@ namespace OpenSim.Framework "Allow regions to register immediately upon grid server startup? true/false", "True", false); + m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Remote console access user name [Default: disabled]", "0", false); + + m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Remote console access password [Default: disabled]", "0", false); + } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -140,9 +148,15 @@ namespace OpenSim.Framework case "allow_region_registration": AllowRegionRegistration = (bool)configuration_result; break; + case "console_user": + ConsoleUser = (string)configuration_result; + break; + case "console_pass": + ConsolePass = (string)configuration_result; + break; } return true; } } -} \ No newline at end of file +} -- cgit v1.1 From 2111c66f89033b3426ceedba6a3ec6ed8fb3363f Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 19 Aug 2009 05:40:23 +0100 Subject: Graft the REST console onto the message server as well. What a dirty hack! Works the same as the others. --- OpenSim/Framework/MessageServerConfig.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/MessageServerConfig.cs b/OpenSim/Framework/MessageServerConfig.cs index d0ceebc..61e5ea7 100644 --- a/OpenSim/Framework/MessageServerConfig.cs +++ b/OpenSim/Framework/MessageServerConfig.cs @@ -46,6 +46,8 @@ namespace OpenSim.Framework public string UserRecvKey = String.Empty; public string UserSendKey = String.Empty; public string UserServerURL = String.Empty; + public string ConsoleUser = String.Empty; + public string ConsolePass = String.Empty; public MessageServerConfig(string description, string filename) { @@ -88,6 +90,12 @@ namespace OpenSim.Framework "Use SSL? true/false", ConfigSettings.DefaultMessageServerHttpSSL.ToString(), false); m_configMember.addConfigurationOption("published_ip", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "My Published IP Address", "127.0.0.1", false); + m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Remote console access user name [Default: disabled]", "0", false); + + m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, + "Remote console access password [Default: disabled]", "0", false); + } public bool handleIncomingConfiguration(string configuration_key, object configuration_result) @@ -130,9 +138,15 @@ namespace OpenSim.Framework case "published_ip": MessageServerIP = (string) configuration_result; break; + case "console_user": + ConsoleUser = (string)configuration_result; + break; + case "console_pass": + ConsolePass = (string)configuration_result; + break; } return true; } } -} \ No newline at end of file +} -- cgit v1.1 From 124f66bfc25984a01491b8447fa97bea2633281c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 18 Aug 2009 22:17:47 -0700 Subject: jhurliman's patch in http://opensimulator.org/mantis/view.php?id=4024 --- OpenSim/Framework/InventoryFolderBase.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs index 05f11a4..1869d48 100644 --- a/OpenSim/Framework/InventoryFolderBase.cs +++ b/OpenSim/Framework/InventoryFolderBase.cs @@ -78,6 +78,12 @@ namespace OpenSim.Framework ID = id; } + public InventoryFolderBase(UUID id, UUID owner) + { + ID = id; + Owner = owner; + } + public InventoryFolderBase(UUID id, string name, UUID owner, short type, UUID parent, ushort version) { ID = id; -- cgit v1.1 From c5af39239f7f2a1725d9c08bea80522de8835e0f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 19 Aug 2009 00:13:51 -0700 Subject: A better purge of trash folder. --- OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | 4 +++- OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 2 +- OpenSim/Framework/IClientAPI.cs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index ca641d0..238810a 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -653,7 +653,9 @@ namespace OpenSim.Framework.Communications.Cache if (RootFolder.DeleteItem(item.ID)) { - return m_InventoryService.DeleteItem(item); + List uuids = new List(); + uuids.Add(itemID); + return m_InventoryService.DeleteItems(this.UserProfile.ID, uuids); } } else diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 22dcef9..d5d4d1e 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -547,7 +547,7 @@ namespace OpenSim.Framework.Communications.Tests return false; } - public bool DeleteItem(InventoryItemBase item) + public bool DeleteItems(UUID owner, List items) { return false; } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index e451dd8..ca37a5b 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -257,7 +257,7 @@ namespace OpenSim.Framework IClientAPI remoteClient, UUID folderID, UUID itemID, int length, string newName); public delegate void RemoveInventoryItem( - IClientAPI remoteClient, UUID itemID); + IClientAPI remoteClient, List itemIDs); public delegate void RemoveInventoryFolder( IClientAPI remoteClient, UUID folderID); -- cgit v1.1 From d519f1885f587409592cf92bc0f4ba8533a1866f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 19 Aug 2009 10:56:08 -0700 Subject: Added MoveItems, which is most useful upon viewer-delete inventory operation. Moving a batch of items is a 1-time operation. Made it async anyway, so that the viewer doesn't wait in case the DB layer is dumb (which is the case currently). --- OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 5 +++++ OpenSim/Framework/IClientAPI.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index d5d4d1e..6f86704 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -547,6 +547,11 @@ namespace OpenSim.Framework.Communications.Tests return false; } + public bool MoveItems(UUID owner, List items) + { + return false; + } + public bool DeleteItems(UUID owner, List items) { return false; diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ca37a5b..c6cdcaa 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -254,7 +254,7 @@ namespace OpenSim.Framework string newName); public delegate void MoveInventoryItem( - IClientAPI remoteClient, UUID folderID, UUID itemID, int length, string newName); + IClientAPI remoteClient, List items); public delegate void RemoveInventoryItem( IClientAPI remoteClient, List itemIDs); -- cgit v1.1 From f1287cc7af7da26910c5cba456a8c35b6454d815 Mon Sep 17 00:00:00 2001 From: Kunnis Date: Sun, 16 Aug 2009 18:54:20 -0500 Subject: * Switching IAssetData to follow the new naming schema, removing the separate insert and update methods. --- OpenSim/Framework/Servers/GetAssetStreamHandler.cs | 2 +- OpenSim/Framework/Servers/PostAssetStreamHandler.cs | 2 +- OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs index bc046cf..c6958de 100644 --- a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs +++ b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs @@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers protected override AssetBase GetAsset(UUID assetID) { - return m_assetProvider.FetchAsset(assetID); + return m_assetProvider.GetAsset(assetID); } } } diff --git a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs index 419b408..8bf406c 100644 --- a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs +++ b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs @@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers AssetBase asset = (AssetBase) xs.Deserialize(request); m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID); - m_assetProvider.CreateAsset(asset); + m_assetProvider.StoreAsset(asset); return new byte[] {}; } diff --git a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs index 35da73f..be3f518 100644 --- a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs +++ b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs @@ -128,7 +128,7 @@ namespace OpenSim.Framework.Servers.Tests IAssetDataPlugin assetDataPlugin = new TestAssetDataPlugin(); handler = new GetAssetStreamHandler(assetDataPlugin); - assetDataPlugin.CreateAsset(asset); + assetDataPlugin.StoreAsset(asset); return asset; } } -- cgit v1.1 From b1853d9f265fb32cf51d65fdcf2d5b4741911f00 Mon Sep 17 00:00:00 2001 From: Kunnis Date: Sun, 16 Aug 2009 23:25:12 -0500 Subject: Fixing a spot I missed in assets. Switching Grid to the new naming schema with Store/Get --- OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 2 +- .../Communications/Tests/Cache/UserProfileCacheServiceTests.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index c9f5236..7f1c7e9 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -184,7 +184,7 @@ namespace OpenSim.Framework.Communications.Cache // Commented out for now. The implementation needs to be improved by protecting against race conditions, // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via // returning a read only class from the cache). -// public bool UpdateProfile(UserProfileData userProfile) +// public bool StoreProfile(UserProfileData userProfile) // { // lock (m_userProfilesById) // { diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 670c9ff..933fa12 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs @@ -110,14 +110,14 @@ namespace OpenSim.Framework.Communications.Tests IUserDataPlugin userDataPlugin = commsManager.UserDataPlugin; // Check that we can't update info before it exists - Assert.That(userCacheService.UpdateProfile(newProfile), Is.False); + Assert.That(userCacheService.StoreProfile(newProfile), Is.False); Assert.That(userDataPlugin.GetUserByUUID(userId), Is.Null); // Check that we can update a profile once it exists LocalUserServices lus = (LocalUserServices)commsManager.UserService; lus.AddUser(firstName, originalLastName, "pingu", "ted@excellentadventure.com", 1000, 1000, userId); - Assert.That(userCacheService.UpdateProfile(newProfile), Is.True); + Assert.That(userCacheService.StoreProfile(newProfile), Is.True); UserProfileData retrievedProfile = userCacheService.GetUserDetails(userId).UserProfile; Assert.That(retrievedProfile.SurName, Is.EqualTo(newLastName)); Assert.That(userDataPlugin.GetUserByUUID(userId).SurName, Is.EqualTo(newLastName)); -- cgit v1.1 From ae2ceda479a2b223189b5eecedc46798e1152fcd Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 19 Aug 2009 12:41:57 -0700 Subject: * Only update TextureEntry in AvatarAppearance if the incoming XML-RPC has a valid TextureEntry. About half the time update_avatar_appearance calls are made, the TextureEntry is empty --- OpenSim/Framework/AvatarAppearance.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 7270f32..1fb01ba 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -503,7 +503,14 @@ namespace OpenSim.Framework Owner = new UUID((string)h["owner"]); Serial = Convert.ToInt32((string)h["serial"]); VisualParams = (byte[])h["visual_params"]; - Texture = new Primitive.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length); + + if (h.Contains("texture")) + { + byte[] te = h["texture"] as byte[]; + if (te != null && te.Length > 0) + Texture = new Primitive.TextureEntry(te, 0, te.Length); + } + AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]); m_wearables = new AvatarWearable[MAX_WEARABLES]; -- cgit v1.1 From 70c870972a4b534f38eaa3ae1c9b076b472f7d75 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 21 Aug 2009 00:25:50 +0100 Subject: Fix the user and password defaults int he remote console setup --- OpenSim/Framework/GridConfig.cs | 4 ++-- OpenSim/Framework/MessageServerConfig.cs | 4 ++-- OpenSim/Framework/UserConfig.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index 87fd3f0..9aa5d03 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs @@ -98,10 +98,10 @@ namespace OpenSim.Framework "True", false); m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Remote console access user name [Default: disabled]", "0", false); + "Remote console access user name [Default: disabled]", "", false); m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Remote console access password [Default: disabled]", "0", false); + "Remote console access password [Default: disabled]", "", false); } diff --git a/OpenSim/Framework/MessageServerConfig.cs b/OpenSim/Framework/MessageServerConfig.cs index 61e5ea7..884c0ea 100644 --- a/OpenSim/Framework/MessageServerConfig.cs +++ b/OpenSim/Framework/MessageServerConfig.cs @@ -91,10 +91,10 @@ namespace OpenSim.Framework m_configMember.addConfigurationOption("published_ip", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "My Published IP Address", "127.0.0.1", false); m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Remote console access user name [Default: disabled]", "0", false); + "Remote console access user name [Default: disabled]", "", false); m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Remote console access password [Default: disabled]", "0", false); + "Remote console access password [Default: disabled]", "", false); } diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index b9e3665..16f265c 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs @@ -158,10 +158,10 @@ namespace OpenSim.Framework "Minimum Level a user should have to login [0 default]", "0", false); m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Remote console access user name [Default: disabled]", "0", false); + "Remote console access user name [Default: disabled]", "", false); m_configMember.addConfigurationOption("console_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, - "Remote console access password [Default: disabled]", "0", false); + "Remote console access password [Default: disabled]", "", false); } -- cgit v1.1 From 33186527235091f95a7251ea66a713fdaee1c689 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 21 Aug 2009 11:00:45 -0700 Subject: Added a more sane InventoryServerMoveItemsHandler. Changed SynchronousRestObjectRequester so that it also understands PUTs. --- OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs index 09ef95b..ec9bd4f 100644 --- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs +++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs @@ -62,7 +62,7 @@ namespace OpenSim.Framework.Servers.HttpServer WebRequest request = WebRequest.Create(requestUrl); request.Method = verb; - if (verb == "POST") + if ((verb == "POST") || (verb == "PUT")) { request.ContentType = "text/xml"; -- cgit v1.1 From 75021b5309c5e74c08feea5d508b69ce05491375 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 21 Aug 2009 21:31:18 -0700 Subject: Moved AuthedSessionCache to where it is used -- Grid/InventoryServer. --- .../Communications/Cache/AuthedSessionCache.cs | 133 ------ .../Communications/InventoryServiceBase.cs | 517 --------------------- 2 files changed, 650 deletions(-) delete mode 100644 OpenSim/Framework/Communications/Cache/AuthedSessionCache.cs delete mode 100644 OpenSim/Framework/Communications/InventoryServiceBase.cs (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Cache/AuthedSessionCache.cs b/OpenSim/Framework/Communications/Cache/AuthedSessionCache.cs deleted file mode 100644 index d56e48a..0000000 --- a/OpenSim/Framework/Communications/Cache/AuthedSessionCache.cs +++ /dev/null @@ -1,133 +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; - -namespace OpenSim.Framework.Communications.Cache -{ - public class AuthedSessionCache - { - public class CacheData - { - private static readonly DateTime UNIX_EPOCH = new DateTime(1970, 1, 1); - private string m_session_id; - private string m_agent_id; - private int m_expire; - - private int get_current_unix_time() - { - return (int)(DateTime.UtcNow - UNIX_EPOCH).TotalSeconds; - } - - public CacheData(string sid, string aid) - { - m_session_id = sid; - m_agent_id = aid; - m_expire = get_current_unix_time() + DEFAULT_LIFETIME; - } - - public CacheData(string sid, string aid, int time_now) - { - m_session_id = sid; - m_agent_id = aid; - m_expire = time_now + DEFAULT_LIFETIME; - } - - public string SessionID - { - get { return m_session_id; } - set { m_session_id = value; } - } - - public string AgentID - { - get { return m_agent_id; } - set { m_agent_id = value; } - } - - public bool isExpired - { - get { return m_expire < get_current_unix_time(); } - } - - public void Renew() - { - m_expire = get_current_unix_time() + DEFAULT_LIFETIME; - } - } - - private static readonly int DEFAULT_LIFETIME = 30; - private Dictionary m_authed_sessions = new Dictionary(); - // private int m_session_lifetime = DEFAULT_LIFETIME; - - public AuthedSessionCache() - { - // m_session_lifetime = DEFAULT_LIFETIME; - } - - public AuthedSessionCache(int timeout) - { - // m_session_lifetime = timeout; - } - - public CacheData getCachedSession(string session_id, string agent_id) - { - CacheData ret = null; - lock (m_authed_sessions) - { - if (m_authed_sessions.ContainsKey(session_id)) - { - CacheData cached_session = m_authed_sessions[session_id]; - if (!cached_session.isExpired && cached_session.AgentID == agent_id) - { - ret = m_authed_sessions[session_id]; - // auto renew - m_authed_sessions[session_id].Renew(); - } - } - } - return ret; - } - - public void Add(string session_id, string agent_id) - { - CacheData data = new CacheData(session_id, agent_id); - lock (m_authed_sessions) - { - if (m_authed_sessions.ContainsKey(session_id)) - { - m_authed_sessions[session_id] = data; - } - else - { - m_authed_sessions.Add(session_id, data); - } - } - } - } -} diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs deleted file mode 100644 index 309c415..0000000 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ /dev/null @@ -1,517 +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.Collections.Generic; -using System.Reflection; -using log4net; -using OpenMetaverse; -using OpenSim.Data; - -namespace OpenSim.Framework.Communications -{ - /// - /// Abstract base class used by local and grid implementations of an inventory service. - /// - public abstract class InventoryServiceBase : IInterServiceInventoryServices - { - - private static readonly ILog m_log - = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - protected List m_plugins = new List(); - - #region Plugin methods - - /// - /// Add a new inventory data plugin - plugins will be requested in the order they were added. - /// - /// The plugin that will provide data - public void AddPlugin(IInventoryDataPlugin plugin) - { - m_plugins.Add(plugin); - } - - /// - /// Adds a list of inventory data plugins, as described by `provider' - /// and `connect', to `m_plugins'. - /// - /// - /// The filename of the inventory server plugin DLL. - /// - /// - /// The connection string for the storage backend. - /// - public void AddPlugin(string provider, string connect) - { - m_plugins.AddRange(DataPluginFactory.LoadDataPlugins(provider, connect)); - } - - #endregion - - #region IInventoryServices methods - - public string Host - { - get { return "default"; } - } - - public List GetInventorySkeleton(UUID userId) - { -// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); - - InventoryFolderBase rootFolder = RequestRootFolder(userId); - - // Agent has no inventory structure yet. - if (null == rootFolder) - { - return null; - } - - List userFolders = new List(); - - userFolders.Add(rootFolder); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - IList folders = plugin.getFolderHierarchy(rootFolder.ID); - userFolders.AddRange(folders); - } - -// foreach (InventoryFolderBase folder in userFolders) -// { -// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); -// } - - return userFolders; - } - - // See IInventoryServices - public virtual bool HasInventoryForUser(UUID userID) - { - return false; - } - - // See IInventoryServices - public virtual InventoryFolderBase RequestRootFolder(UUID userID) - { - // Retrieve the first root folder we get from the list of plugins. - foreach (IInventoryDataPlugin plugin in m_plugins) - { - InventoryFolderBase rootFolder = plugin.getUserRootFolder(userID); - if (rootFolder != null) - return rootFolder; - } - - // Return nothing if no plugin was able to supply a root folder - return null; - } - - // See IInventoryServices - public bool CreateNewUserInventory(UUID user) - { - InventoryFolderBase existingRootFolder = RequestRootFolder(user); - - if (null != existingRootFolder) - { - m_log.WarnFormat( - "[AGENT INVENTORY]: 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; - } - - public List GetActiveGestures(UUID userId) - { - List activeGestures = new List(); - foreach (IInventoryDataPlugin plugin in m_plugins) - { - activeGestures.AddRange(plugin.fetchActiveGestures(userId)); - } - - return activeGestures; - } - - #endregion - - #region Methods used by GridInventoryService - - public List RequestSubFolders(UUID parentFolderID) - { - List inventoryList = new List(); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - inventoryList.AddRange(plugin.getInventoryFolders(parentFolderID)); - } - - return inventoryList; - } - - public List RequestFolderItems(UUID folderID) - { - List itemsList = new List(); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - itemsList.AddRange(plugin.getInventoryInFolder(folderID)); - } - - return itemsList; - } - - #endregion - - // See IInventoryServices - public virtual bool AddFolder(InventoryFolderBase folder) - { - m_log.DebugFormat( - "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.addInventoryFolder(folder); - } - - // FIXME: Should return false on failure - return true; - } - - // See IInventoryServices - public virtual bool UpdateFolder(InventoryFolderBase folder) - { - m_log.DebugFormat( - "[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.updateInventoryFolder(folder); - } - - // FIXME: Should return false on failure - return true; - } - - // See IInventoryServices - public virtual bool MoveFolder(InventoryFolderBase folder) - { - m_log.DebugFormat( - "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.moveInventoryFolder(folder); - } - - // FIXME: Should return false on failure - return true; - } - - // See IInventoryServices - public virtual bool AddItem(InventoryItemBase item) - { - m_log.DebugFormat( - "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.addInventoryItem(item); - } - - // FIXME: Should return false on failure - return true; - } - - // See IInventoryServices - public virtual bool UpdateItem(InventoryItemBase item) - { - m_log.InfoFormat( - "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.updateInventoryItem(item); - } - - // FIXME: Should return false on failure - return true; - } - - // See IInventoryServices - public virtual bool DeleteItem(InventoryItemBase item) - { - m_log.InfoFormat( - "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.deleteInventoryItem(item.ID); - } - - // FIXME: Should return false on failure - return true; - } - - public virtual InventoryItemBase QueryItem(InventoryItemBase item) - { - foreach (IInventoryDataPlugin plugin in m_plugins) - { - InventoryItemBase result = plugin.queryInventoryItem(item.ID); - if (result != null) - return result; - } - - return null; - } - - public virtual InventoryFolderBase QueryFolder(InventoryFolderBase item) - { - foreach (IInventoryDataPlugin plugin in m_plugins) - { - InventoryFolderBase result = plugin.queryInventoryFolder(item.ID); - if (result != null) - return result; - } - - return null; - } - - /// - /// 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. - /// - /// - public virtual bool PurgeFolder(InventoryFolderBase folder) - { - m_log.DebugFormat( - "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); - - List subFolders = RequestSubFolders(folder.ID); - - foreach (InventoryFolderBase subFolder in subFolders) - { -// m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); - - foreach (IInventoryDataPlugin plugin in m_plugins) - { - plugin.deleteInventoryFolder(subFolder.ID); - } - } - - List items = RequestFolderItems(folder.ID); - - foreach (InventoryItemBase item in items) - { - DeleteItem(item); - } - - // 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) - { - foreach (IInventoryDataPlugin plugin in m_plugins) - { - InventoryItemBase item = plugin.getInventoryItem(itemID); - if (item != null) - return item; - } - - return null; - } - - /// - /// Used to create a new user inventory. - /// - private class UsersInventory - { - public Dictionary Folders = new Dictionary(); - public Dictionary Items = new Dictionary(); - - 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); - } - } - } -} -- cgit v1.1 From b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 22 Aug 2009 10:24:26 -0700 Subject: * Fixes mantis http://opensimulator.org/mantis/view.php?id=4044. Turns out folders were never being removed from trash when they were singled out for purging in trash. They were being removed when Trash was purged as a whole. That behavior is now fixed for the new InventoryService set. * Removed left-overs from AssetInventoryServer. --- OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 5 +++++ OpenSim/Framework/IClientAPI.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 6f86704..57a908e 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -532,6 +532,11 @@ namespace OpenSim.Framework.Communications.Tests return false; } + public bool DeleteFolders(UUID ownerID, List ids) + { + return false; + } + public bool PurgeFolder(InventoryFolderBase folder) { return false; diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index c6cdcaa..444adf9 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -260,7 +260,7 @@ namespace OpenSim.Framework IClientAPI remoteClient, List itemIDs); public delegate void RemoveInventoryFolder( - IClientAPI remoteClient, UUID folderID); + IClientAPI remoteClient, List folderIDs); public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest); -- cgit v1.1 From a22b12ecd4c8e65ae08053f0441e345750c60773 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 22 Aug 2009 20:18:24 +0100 Subject: Change prompt handling in console. No user changes --- OpenSim/Framework/Console/CommandConsole.cs | 4 ++-- OpenSim/Framework/Console/ConsoleBase.cs | 4 ++-- OpenSim/Framework/Console/RemoteConsole.cs | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 3387013..06136ff 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -576,7 +576,7 @@ namespace OpenSim.Framework.Console public void Prompt() { - string line = ReadLine(m_defaultPrompt, true, true); + string line = ReadLine(m_defaultPrompt + "# ", true, true); if (line != String.Empty) { @@ -592,7 +592,7 @@ namespace OpenSim.Framework.Console public override string ReadLine(string p, bool isCommand, bool e) { - System.Console.Write("{0}", prompt); + System.Console.Write("{0}", p); string cmdinput = System.Console.ReadLine(); if (isCommand) diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 5e258ae..0a51266 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -48,7 +48,7 @@ namespace OpenSim.Framework.Console /// public string DefaultPrompt { - set { m_defaultPrompt = value + "# "; } + set { m_defaultPrompt = value; } get { return m_defaultPrompt; } } protected string m_defaultPrompt; @@ -123,7 +123,7 @@ namespace OpenSim.Framework.Console public virtual string ReadLine(string p, bool isCommand, bool e) { - System.Console.Write("{0}", prompt); + System.Console.Write("{0}", p); string cmdinput = System.Console.ReadLine(); return cmdinput; diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index da8556a..1810614 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs @@ -217,6 +217,12 @@ namespace OpenSim.Framework.Console id.AppendChild(xmldoc.CreateTextNode(sessionID.ToString())); rootElement.AppendChild(id); + + XmlElement prompt = xmldoc.CreateElement("", "Prompt", ""); + prompt.AppendChild(xmldoc.CreateTextNode(DefaultPrompt)); + + rootElement.AppendChild(prompt); + rootElement.AppendChild(MainConsole.Instance.Commands.GetXml(xmldoc)); reply["str_response_string"] = xmldoc.InnerXml; -- cgit v1.1 From cfd9cf7b18331a9d2117294f6ba23dd03a9423a1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 25 Aug 2009 06:17:36 -0700 Subject: Closed the web request and stream in SynchronousRestSessionObjectPoster -- maybe this is the cause of some timeouts seen in some monos? --- OpenSim/Framework/Servers/HttpServer/RestSessionService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs index ec2f9ec..2ef4a36 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs @@ -75,6 +75,7 @@ namespace OpenSim.Framework.Servers.HttpServer WebRequest request = WebRequest.Create(requestUrl); request.Method = verb; request.ContentType = "text/xml"; + request.Timeout = 20000; MemoryStream buffer = new MemoryStream(); @@ -98,7 +99,9 @@ namespace OpenSim.Framework.Servers.HttpServer { XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); + resp.Close(); } + requestStream.Close(); return deserial; } } -- cgit v1.1