From 65c5efe43b68700bad94076d4cd421160203c5de Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Fri, 16 May 2008 01:22:11 +0000
Subject: Formatting cleanup.
---
.../Framework/Communications/Cache/AssetCache.cs | 22 +--
.../Communications/Cache/AssetServerBase.cs | 8 +-
.../Communications/Cache/CachedUserInfo.cs | 220 ++++++++++-----------
.../Communications/Cache/GridAssetClient.cs | 8 +-
.../Communications/Cache/InventoryFolderImpl.cs | 46 ++---
.../Communications/Cache/LibraryRootFolder.cs | 72 +++----
.../Cache/UserProfileCacheService.cs | 78 ++++----
.../Framework/Communications/Capabilities/Caps.cs | 130 ++++++------
.../Communications/Capabilities/CapsHandlers.cs | 16 +-
.../Framework/Communications/Capabilities/LLSD.cs | 26 +--
.../Communications/Capabilities/LLSDHelpers.cs | 10 +-
.../Capabilities/LLSDInventoryItem.cs | 2 +-
.../Capabilities/LLSDParcelVoiceInfoResponse.cs | 4 +-
.../Capabilities/LLSDStreamHandler.cs | 2 +-
.../LLSDTaskInventoryUploadComplete.cs | 2 +-
.../Capabilities/LLSDTaskScriptUpdate.cs | 6 +-
.../Capabilities/LLSDVoiceAccountResponse.cs | 4 +-
.../Communications/CommunicationsManager.cs | 2 +-
.../Framework/Communications/GenericAsyncResult.cs | 4 +-
.../Framework/Communications/IInventoryServices.cs | 22 +--
OpenSim/Framework/Communications/IUserService.cs | 8 +-
.../Communications/InventoryServiceBase.cs | 122 ++++++------
.../Communications/Limit/IRequestLimitStrategy.cs | 10 +-
.../Communications/Limit/NullLimitStrategy.cs | 6 +-
.../Communications/Limit/RepeatLimitStrategy.cs | 38 ++--
.../Communications/Limit/TimeLimitStrategy.cs | 50 ++---
OpenSim/Framework/Communications/LoginResponse.cs | 4 +-
OpenSim/Framework/Communications/LoginService.cs | 108 +++++-----
.../Communications/Properties/AssemblyInfo.cs | 10 +-
OpenSim/Framework/Communications/RestClient.cs | 12 +-
.../Framework/Communications/UserManagerBase.cs | 26 +--
31 files changed, 539 insertions(+), 539 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index 1414260..0669ce9 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -40,12 +40,12 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Manages local cache of assets and their sending to viewers.
- ///
+ ///
/// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either
/// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
/// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
/// AssetNotFound(), which means they do share the same asset and texture caches.
- ///
+ ///
/// TODO Assets in this cache are effectively immortal (they are never disposed off through old age).
/// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets
/// but it's something to bear in mind.
@@ -281,8 +281,8 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to
- /// load it into the cache.
- ///
+ /// load it into the cache.
+ ///
/// XXX We'll keep polling the cache until we get the asset or we exceed
/// the allowed number of polls. This isn't a very good way of doing things since a single thread
/// is processing inbound packets, so if the asset server is slow, we could block this for up to
@@ -431,11 +431,11 @@ namespace OpenSim.Framework.Communications.Cache
//making a copy of the list is not ideal
//but the old method of locking around this whole block of code was causing a multi-thread lock
//between this and the TextureDownloadModule
- //while the localAsset thread running this and trying to send a texture to the callback in the
+ //while the localAsset thread running this and trying to send a texture to the callback in the
//texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding
- // the lock in the texturedownload module) was trying to
+ // the lock in the texturedownload module) was trying to
//request a new asset and hitting a lock in here on the RequestLists.
-
+
List theseRequests = new List(reqList.Requests);
reqList.Requests.Clear();
@@ -460,7 +460,7 @@ namespace OpenSim.Framework.Communications.Cache
{
// m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
- // Notify requesters for this asset
+ // Notify requesters for this asset
AssetRequestsList reqList = null;
lock (RequestLists)
{
@@ -552,7 +552,7 @@ namespace OpenSim.Framework.Communications.Cache
}
return;
}
- //it is in our cache
+ //it is in our cache
AssetInfo asset = Assets[requestID];
// add to the AssetRequests list
@@ -679,14 +679,14 @@ namespace OpenSim.Framework.Communications.Cache
public byte AssetRequestSource = 2;
public byte[] Params = null;
//public bool AssetInCache;
- //public int TimeRequested;
+ //public int TimeRequested;
public int DiscardLevel = -1;
public AssetRequest()
{
}
}
-
+
public class AssetInfo : AssetBase
{
public AssetInfo()
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 1a7f872..b16512c 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Cache
{
public abstract class AssetServerBase : IAssetServer
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected IAssetReceiver m_receiver;
@@ -47,12 +47,12 @@ namespace OpenSim.Framework.Communications.Cache
// Temporarily hardcoded - should be a plugin
protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
-
+
protected abstract void StoreAsset(AssetBase asset);
protected abstract void CommitAssets();
///
- /// This method must be implemented by a subclass to retrieve the asset named in the
+ /// This method must be implemented by a subclass to retrieve the asset named in the
/// AssetRequest. If the asset is not found, null should be returned.
///
///
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
protected abstract AssetBase GetAsset(AssetRequest req);
///
- /// Process an asset request. This method will call GetAsset(AssetRequest req)
+ /// Process an asset request. This method will call GetAsset(AssetRequest req)
/// on the subclass.
///
///
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 218fd5a..f40f078 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -36,55 +36,55 @@ using log4net;
namespace OpenSim.Framework.Communications.Cache
{
internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
- internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
+ internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
internal delegate void DeleteItemDelegate(LLUUID itemID);
-
+
internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID);
- internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
+ internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
internal delegate void PurgeFolderDelegate(LLUUID folderID);
internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID);
-
+
internal delegate void SendInventoryDescendentsDelegate(
IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
-
+
///
/// Stores user profile and inventory data received from backend services for a particular user.
///
public class CachedUserInfo
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
///
/// The comms manager holds references to services (user, grid, inventory, etc.)
- ///
+ ///
private readonly CommunicationsManager m_commsManager;
-
+
public UserProfileData UserProfile { get { return m_userProfile; } }
- private readonly UserProfileData m_userProfile;
+ private readonly UserProfileData m_userProfile;
///
/// Has we received the user's inventory from the inventory service?
///
private bool m_hasInventory;
-
+
///
/// Inventory requests waiting for receipt of this user's inventory from the inventory service.
///
- private readonly IList m_pendingRequests = new List();
-
+ private readonly IList m_pendingRequests = new List();
+
///
/// Has this user info object yet received its inventory information from the invetnroy service?
///
public bool HasInventory { get { return m_hasInventory; } }
-
+
private InventoryFolderImpl m_rootFolder;
- public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
-
+ public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
+
///
/// FIXME: This could be contained within a local variable - it doesn't need to be a field
///
- private IDictionary> pendingCategorizationFolders
+ private IDictionary> pendingCategorizationFolders
= new Dictionary>();
///
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Cache
m_commsManager = commsManager;
m_userProfile = userProfile;
}
-
+
///
/// This allows a request to be added to be processed once we receive a user's inventory
/// from the inventory service. If we already have the inventory, the request
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Communications.Cache
}
}
}
-
+
///
/// Store a folder pending arrival of its parent
///
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications.Cache
private void AddPendingFolder(InventoryFolderImpl folder)
{
LLUUID parentFolderId = folder.ParentID;
-
+
if (pendingCategorizationFolders.ContainsKey(parentFolderId))
{
pendingCategorizationFolders[parentFolderId].Add(folder);
@@ -135,11 +135,11 @@ namespace OpenSim.Framework.Communications.Cache
{
IList folders = new List();
folders.Add(folder);
-
+
pendingCategorizationFolders[parentFolderId] = folders;
}
}
-
+
///
/// Add any pending folders which were received before the given folder
///
@@ -155,18 +155,18 @@ namespace OpenSim.Framework.Communications.Cache
// m_log.DebugFormat(
// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}",
// folder.name, folder.folderID, parent.name, parent.folderID);
-
+
lock (newFolder.SubFolders)
{
if (!newFolder.SubFolders.ContainsKey(folder.ID))
{
newFolder.SubFolders.Add(folder.ID, folder);
- }
+ }
}
}
}
}
-
+
///
/// Callback invoked when the inventory is received from an async request to the inventory service
///
@@ -177,12 +177,12 @@ namespace OpenSim.Framework.Communications.Cache
// FIXME: Exceptions thrown upwards never appear on the console. Could fix further up if these
// are simply being swallowed
try
- {
+ {
foreach (InventoryFolderImpl folder in folders)
{
FolderReceive(folder);
}
-
+
foreach (InventoryItemBase item in items)
{
ItemReceive(item);
@@ -191,15 +191,15 @@ namespace OpenSim.Framework.Communications.Cache
catch (Exception e)
{
m_log.ErrorFormat("[INVENTORY CACHE]: Error processing inventory received from inventory service, {0}", e);
- }
-
+ }
+
// Deal with pending requests
lock (m_pendingRequests)
{
// We're going to change inventory status within the lock to avoid a race condition
// where requests are processed after the AddRequest() method has been called.
m_hasInventory = true;
-
+
foreach (IInventoryRequest request in m_pendingRequests)
{
request.Execute();
@@ -215,7 +215,7 @@ namespace OpenSim.Framework.Communications.Cache
private void FolderReceive(InventoryFolderImpl newFolder)
{
// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
+// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
// folderInfo.Name, folderInfo.ID, userID);
if (RootFolder == null)
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache
else
{
InventoryFolderImpl parentFolder = RootFolder.FindFolder(newFolder.ParentID);
-
+
if (parentFolder != null)
{
lock (parentFolder.SubFolders)
@@ -252,44 +252,44 @@ namespace OpenSim.Framework.Communications.Cache
else
{
AddPendingFolder(newFolder);
- }
+ }
}
-
+
ResolvePendingFolders(newFolder);
}
///
/// Callback invoked when an item is received from an async request to the inventory service.
- ///
+ ///
/// We're assuming here that items are always received after all the folders
/// received.
///
- ///
+ ///
private void ItemReceive(InventoryItemBase itemInfo)
{
// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
+// "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
// itemInfo.Name, itemInfo.ID, userID);
InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder);
-
+
if (null == folder)
{
m_log.WarnFormat(
- "Received item {0} {1} but its folder {2} does not exist",
+ "Received item {0} {1} but its folder {2} does not exist",
itemInfo.Name, itemInfo.ID, itemInfo.Folder);
-
+
return;
}
-
+
lock (folder.Items)
{
folder.Items[itemInfo.ID] = itemInfo;
}
}
-
+
///
- /// Create a folder in this agent's inventory.
- ///
+ /// Create a folder in this agent's inventory.
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
@@ -299,20 +299,20 @@ namespace OpenSim.Framework.Communications.Cache
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
-
+
if (HasInventory)
{
InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID);
-
+
if (null == parentFolder)
{
m_log.WarnFormat(
"[AGENT INVENTORY]: Tried to create folder {0} {1} but the parent {2} does not exist",
folderName, folderID, parentID);
-
+
return false;
}
-
+
InventoryFolderImpl createdFolder = parentFolder.CreateChildFolder(folderID, folderName, folderType);
if (createdFolder != null)
@@ -324,17 +324,17 @@ namespace OpenSim.Framework.Communications.Cache
createdBaseFolder.ParentID = createdFolder.ParentID;
createdBaseFolder.Type = createdFolder.Type;
createdBaseFolder.Version = createdFolder.Version;
-
+
m_commsManager.InventoryService.AddFolder(createdBaseFolder);
-
+
return true;
}
else
{
m_log.WarnFormat(
- "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists",
+ "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists",
folderName, folderID);
-
+
return false;
}
}
@@ -344,22 +344,22 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(CreateFolderDelegate), this, "CreateFolder"),
new object[] { folderName, folderID, folderType, parentID }));
-
+
return true;
- }
+ }
}
-
+
///
/// Handle a client request to update the inventory folder
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
- ///
+ ///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed.
///
- ///
+ ///
///
///
///
@@ -367,7 +367,7 @@ namespace OpenSim.Framework.Communications.Cache
public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID)
{
// m_log.DebugFormat(
-// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
+// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
if (HasInventory)
{
@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Cache
baseFolder.ParentID = parentID;
baseFolder.Type = (short) type;
baseFolder.Version = RootFolder.Version;
-
+
m_commsManager.InventoryService.AddFolder(baseFolder);
}
else
@@ -387,18 +387,18 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(UpdateFolderDelegate), this, "UpdateFolder"),
new object[] { name, folderID, type, parentID }));
- }
-
+ }
+
return true;
- }
-
+ }
+
///
/// Handle an inventory folder move request from the client.
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
- ///
+ ///
///
///
public bool MoveFolder(LLUUID folderID, LLUUID parentID)
@@ -413,9 +413,9 @@ namespace OpenSim.Framework.Communications.Cache
baseFolder.Owner = m_userProfile.ID;
baseFolder.ID = folderID;
baseFolder.ParentID = parentID;
-
+
m_commsManager.InventoryService.MoveFolder(baseFolder);
-
+
return true;
}
else
@@ -424,30 +424,30 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(MoveFolderDelegate), this, "MoveFolder"),
new object[] { folderID, parentID }));
-
+
return true;
- }
- }
-
+ }
+ }
+
///
/// This method will delete all the items and folders in the given folder.
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
- ///
+ ///
///
public bool PurgeFolder(LLUUID folderID)
{
-// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
+// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
// folderID, remoteClient.Name, remoteClient.AgentId);
-
+
if (HasInventory)
{
InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID);
-
+
if (purgedFolder != null)
- {
+ {
// XXX Nasty - have to create a new object to hold details we already have
InventoryFolderBase purgedBaseFolder = new InventoryFolderBase();
purgedBaseFolder.Owner = purgedFolder.Owner;
@@ -455,12 +455,12 @@ namespace OpenSim.Framework.Communications.Cache
purgedBaseFolder.Name = purgedFolder.Name;
purgedBaseFolder.ParentID = purgedFolder.ParentID;
purgedBaseFolder.Type = purgedFolder.Type;
- purgedBaseFolder.Version = purgedFolder.Version;
-
- m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
-
+ purgedBaseFolder.Version = purgedFolder.Version;
+
+ m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
+
purgedFolder.Purge();
-
+
return true;
}
}
@@ -470,12 +470,12 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"),
new object[] { folderID }));
-
+
return true;
- }
-
+ }
+
return false;
- }
+ }
///
/// Add an item to the user's inventory
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"),
new object[] { item }));
- }
+ }
}
///
@@ -514,18 +514,18 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"),
new object[] { item }));
- }
+ }
}
///
/// Delete an item from the user's inventory
- ///
+ ///
/// If the inventory service has not yet delievered the inventory
/// for this user then the request will be queued.
///
///
///
- /// true on a successful delete or a if the request is queued.
+ /// true on a successful delete or a if the request is queued.
/// Returns false on an immediate failure
///
public bool DeleteItem(LLUUID itemID)
@@ -535,14 +535,14 @@ namespace OpenSim.Framework.Communications.Cache
// XXX For historical reasons (grid comms), we need to retrieve the whole item in order to delete, even though
// really only the item id is required.
InventoryItemBase item = RootFolder.FindItem(itemID);
-
+
if (null == item)
{
m_log.WarnFormat("[AGENT INVENTORY]: Tried to delete item {0} which does not exist", itemID);
-
+
return false;
}
-
+
if (RootFolder.DeleteItem(item.ID))
{
return m_commsManager.InventoryService.DeleteItem(item);
@@ -554,13 +554,13 @@ namespace OpenSim.Framework.Communications.Cache
new InventoryRequest(
Delegate.CreateDelegate(typeof(DeleteItemDelegate), this, "DeleteItem"),
new object[] { itemID }));
-
+
return true;
- }
-
+ }
+
return false;
}
-
+
///
/// Send details of the inventory items and/or folders in a given folder to the client.
///
@@ -574,13 +574,13 @@ namespace OpenSim.Framework.Communications.Cache
if (HasInventory)
{
InventoryFolderImpl folder;
-
+
if ((folder = RootFolder.FindFolder(folderID)) != null)
{
// m_log.DebugFormat(
-// "[AGENT INVENTORY]: Found folder {0} for client {1}",
+// "[AGENT INVENTORY]: Found folder {0} for client {1}",
// folderID, remoteClient.AgentId);
-
+
client.SendInventoryFolderDetails(
client.AgentId, folderID, folder.RequestListOfItems(),
folder.RequestListOfFolders(), fetchFolders, fetchItems);
@@ -592,7 +592,7 @@ namespace OpenSim.Framework.Communications.Cache
m_log.WarnFormat(
"[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}",
folderID, client.Name, client.AgentId);
-
+
return false;
}
}
@@ -604,13 +604,13 @@ namespace OpenSim.Framework.Communications.Cache
new object[] { client, folderID, fetchFolders, fetchItems }));
return true;
- }
+ }
}
}
-
+
///
/// Should be implemented by callers which require a callback when the user's inventory is received
- ///
+ ///
public interface IInventoryRequest
{
///
@@ -618,7 +618,7 @@ namespace OpenSim.Framework.Communications.Cache
///
void Execute();
}
-
+
///
/// Generic inventory request
///
@@ -626,16 +626,16 @@ namespace OpenSim.Framework.Communications.Cache
{
private Delegate m_delegate;
private Object[] m_args;
-
+
internal InventoryRequest(Delegate delegat, Object[] args)
{
- m_delegate = delegat;
+ m_delegate = delegat;
m_args = args;
}
-
+
public void Execute()
{
m_delegate.DynamicInvoke(m_args);
}
- }
+ }
}
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index d5b7fea..4b4ef17 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -95,9 +95,9 @@ namespace OpenSim.Framework.Communications.Cache
// XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
// xs.Serialize(s, asset);
// RestClient rc = new RestClient(_assetServerUrl);
-
- string assetUrl = _assetServerUrl + "/assets/";
-
+
+ string assetUrl = _assetServerUrl + "/assets/";
+
//rc.AddResourcePath("assets");
// rc.RequestMethod = "POST";
@@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications.Cache
//m_log.InfoFormat("[ASSET]: Stored {0}", rc);
m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID);
-
+
RestObjectPoster.BeginPostObject(assetUrl, asset);
}
catch (Exception e)
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index c8cec69..0fbc427 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications.Cache
public class InventoryFolderImpl : InventoryFolderBase
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
// Fields
public Dictionary Items = new Dictionary();
public Dictionary SubFolders = new Dictionary();
@@ -82,14 +82,14 @@ namespace OpenSim.Framework.Communications.Cache
subFold.ParentID = this.ID;
subFold.Owner = Owner;
SubFolders.Add(subFold.ID, subFold);
-
+
return subFold;
}
}
-
+
return null;
}
-
+
///
/// Delete all the folders and items in this folder.
///
@@ -97,9 +97,9 @@ namespace OpenSim.Framework.Communications.Cache
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
- folder.Purge();
+ folder.Purge();
}
-
+
SubFolders.Clear();
Items.Clear();
}
@@ -118,20 +118,20 @@ namespace OpenSim.Framework.Communications.Cache
return Items[itemID];
}
}
-
+
lock (SubFolders)
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
InventoryItemBase item = folder.FindItem(itemID);
-
+
if (item != null)
{
return item;
}
}
}
-
+
return null;
}
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache
public bool DeleteItem(LLUUID itemID)
{
bool found = false;
-
+
lock (Items)
{
if (Items.ContainsKey(itemID))
@@ -152,20 +152,20 @@ namespace OpenSim.Framework.Communications.Cache
return true;
}
}
-
+
lock (SubFolders)
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
found = folder.DeleteItem(itemID);
-
+
if (found == true)
{
break;
}
}
}
-
+
return found;
}
@@ -175,25 +175,25 @@ namespace OpenSim.Framework.Communications.Cache
///
/// The requested folder if it exists, null if it does not.
public InventoryFolderImpl FindFolder(LLUUID folderID)
- {
+ {
if (folderID == ID)
{
return this;
}
-
+
lock (SubFolders)
{
foreach (InventoryFolderImpl folder in SubFolders.Values)
{
InventoryFolderImpl returnFolder = folder.FindFolder(folderID);
-
+
if (returnFolder != null)
{
return returnFolder;
}
}
}
-
+
return null;
}
@@ -203,7 +203,7 @@ namespace OpenSim.Framework.Communications.Cache
public List RequestListOfItems()
{
List itemList = new List();
-
+
lock (Items)
{
foreach (InventoryItemBase item in Items.Values)
@@ -211,9 +211,9 @@ namespace OpenSim.Framework.Communications.Cache
itemList.Add(item);
}
}
-
+
//m_log.DebugFormat("[INVENTORY FOLDER IMPL]: Found {0} items", itemList.Count);
-
+
return itemList;
}
@@ -221,9 +221,9 @@ namespace OpenSim.Framework.Communications.Cache
/// Return the list of immediate child folders in this folder.
///
public List RequestListOfFolders()
- {
+ {
List folderList = new List();
-
+
lock (SubFolders)
{
foreach (InventoryFolderBase folder in SubFolders.Values)
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache
folderList.Add(folder);
}
}
-
+
return folderList;
}
}
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index b3852c0..ca7eb13 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -45,34 +45,34 @@ namespace OpenSim.Framework.Communications.Cache
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000");
-
+
///
/// Holds the root library folder and all its descendents. This is really only used during inventory
/// setup so that we don't have to repeatedly search the tree of library folders.
///
- protected Dictionary libraryFolders
+ protected Dictionary libraryFolders
= new Dictionary();
public LibraryRootFolder()
{
m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
-
+
Owner = libOwner;
ID = new LLUUID("00000112-000f-0000-0000-000100bba000");
Name = "OpenSim Library";
ParentID = LLUUID.Zero;
Type = (short) 8;
Version = (ushort) 1;
-
+
libraryFolders.Add(ID, this);
-
+
LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml"));
// CreateLibraryItems();
}
///
- /// Hardcoded item creation. Please don't add any more items here - future items should be created
+ /// Hardcoded item creation. Please don't add any more items here - future items should be created
/// in the xml in the bin/inventory folder.
///
///
@@ -132,7 +132,7 @@ namespace OpenSim.Framework.Communications.Cache
item.NextPermissions = 0x7FFFFFFF;
return item;
}
-
+
///
/// Use the asset set information at path to load assets
///
@@ -142,49 +142,49 @@ namespace OpenSim.Framework.Communications.Cache
{
m_log.InfoFormat(
"[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath);
-
+
LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
}
-
+
///
/// Read a library set from config
///
///
protected void ReadLibraryFromConfig(IConfig config)
{
- string foldersPath
+ string foldersPath
= Path.Combine(
Util.inventoryDir(), config.GetString("foldersFile", String.Empty));
-
+
LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig);
-
- string itemsPath
+
+ string itemsPath
= Path.Combine(
Util.inventoryDir(), config.GetString("itemsFile", String.Empty));
-
+
LoadFromFile(itemsPath, "Library items", ReadItemFromConfig);
}
-
+
///
/// Read a library inventory folder from a loaded configuration
///
///
private void ReadFolderFromConfig(IConfig config)
- {
+ {
InventoryFolderImpl folderInfo = new InventoryFolderImpl();
-
+
folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString()));
- folderInfo.Name = config.GetString("name", "unknown");
+ folderInfo.Name = config.GetString("name", "unknown");
folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString()));
folderInfo.Type = (short)config.GetInt("type", 8);
-
- folderInfo.Owner = libOwner;
- folderInfo.Version = 1;
-
+
+ folderInfo.Owner = libOwner;
+ folderInfo.Version = 1;
+
if (libraryFolders.ContainsKey(folderInfo.ParentID))
- {
+ {
InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID];
-
+
libraryFolders.Add(folderInfo.ID, folderInfo);
parentFolder.SubFolders.Add(folderInfo.ID, folderInfo);
@@ -201,7 +201,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Read a library inventory item metadata from a loaded configuration
///
- ///
+ ///
private void ReadItemFromConfig(IConfig config)
{
InventoryItemBase item = new InventoryItemBase();
@@ -218,11 +218,11 @@ namespace OpenSim.Framework.Communications.Cache
item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF);
item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF);
item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF);
-
+
if (libraryFolders.ContainsKey(item.Folder))
{
InventoryFolderImpl parentFolder = libraryFolders[item.Folder];
-
+
parentFolder.Items.Add(item.ID, item);
}
else
@@ -230,11 +230,11 @@ namespace OpenSim.Framework.Communications.Cache
m_log.WarnFormat(
"[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
item.Name, item.ID, item.Folder);
- }
+ }
}
-
- private delegate void ConfigAction(IConfig config);
-
+
+ private delegate void ConfigAction(IConfig config);
+
///
/// Load the given configuration at a path and perform an action on each Config contained within it
///
@@ -242,7 +242,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
private static void LoadFromFile(string path, string fileDescription, ConfigAction action)
- {
+ {
if (File.Exists(path))
{
try
@@ -250,21 +250,21 @@ namespace OpenSim.Framework.Communications.Cache
XmlConfigSource source = new XmlConfigSource(path);
for (int i = 0; i < source.Configs.Count; i++)
- {
+ {
action(source.Configs[i]);
}
}
catch (XmlException e)
{
m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e);
- }
+ }
}
else
{
m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path);
- }
+ }
}
-
+
///
/// Looks like a simple getter, but is written like this for some consistency with the other Request
/// methods in the superclass
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 7f911dc..fe61406 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -33,7 +33,7 @@ using libsecondlife;
using log4net;
namespace OpenSim.Framework.Communications.Cache
-{
+{
///
/// Holds user profile information and retrieves it from backend services.
///
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
/// The comms manager holds references to services (user, grid, inventory, etc.)
///
private readonly CommunicationsManager m_commsManager;
-
+
///
/// Each user has a cached profile.
///
@@ -84,8 +84,8 @@ namespace OpenSim.Framework.Communications.Cache
}
}
}
- }
-
+ }
+
///
/// Remove this user's profile cache.
///
@@ -103,9 +103,9 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID);
- }
+ }
}
-
+
return false;
}
@@ -118,14 +118,14 @@ namespace OpenSim.Framework.Communications.Cache
{
CachedUserInfo userInfo = GetUserDetails(userID);
if (userInfo != null)
- {
+ {
m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
}
else
{
m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID);
}
- }
+ }
///
/// Get the details of the given user. A caller should try this method first if it isn't sure that
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Communications.Cache
///
public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType,
string folderName, LLUUID parentID)
- {
+ {
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -159,21 +159,21 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to create folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to create folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
///
/// Handle a client request to update the inventory folder
- ///
+ ///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed.
@@ -188,7 +188,7 @@ namespace OpenSim.Framework.Communications.Cache
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
-
+
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -196,16 +196,16 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.UpdateFolder(name, folderID, type, parentID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
///
@@ -223,16 +223,16 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.MoveFolder(folderID, parentID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to move folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to move folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
///
@@ -267,14 +267,14 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
///
/// Handle the caps inventory descendents fetch.
- ///
+ ///
/// Since the folder structure is sent to the client on login, I believe we only need to handle items.
///
///
@@ -288,20 +288,20 @@ namespace OpenSim.Framework.Communications.Cache
bool fetchFolders, bool fetchItems, int sortOrder)
{
// m_log.DebugFormat(
-// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
+// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
// fetchFolders, fetchItems, folderID, agentID);
-
+
// FIXME MAYBE: We're not handling sortOrder!
InventoryFolderImpl fold;
if ((fold = libraryRoot.FindFolder(folderID)) != null)
{
return fold.RequestListOfItems();
- }
+ }
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(agentID, out userProfile))
- {
+ {
// XXX: When a client crosses into a scene, their entire inventory is fetched
// asynchronously. If the client makes a request before the inventory is received, we need
// to give the inventory a chance to come in.
@@ -315,18 +315,18 @@ namespace OpenSim.Framework.Communications.Cache
while (attempts++ < 30)
{
m_log.DebugFormat(
- "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
+ "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
attempts, folderID, agentID);
-
+
Thread.Sleep(2000);
-
+
if (userProfile.HasInventory)
{
break;
}
}
- }
-
+ }
+
if (userProfile.HasInventory)
{
if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null)
@@ -338,9 +338,9 @@ namespace OpenSim.Framework.Communications.Cache
m_log.WarnFormat(
"[AGENT INVENTORY]: Could not find folder {0} requested by user {1}",
folderID, agentID);
-
+
return null;
- }
+ }
}
else
{
@@ -352,7 +352,7 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID);
-
+
return null;
}
}
@@ -371,16 +371,16 @@ namespace OpenSim.Framework.Communications.Cache
if (!userProfile.PurgeFolder(folderID))
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}",
+ "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
@@ -407,9 +407,9 @@ namespace OpenSim.Framework.Communications.Cache
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
+ "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
remoteClient.Name, remoteClient.AgentId);
- }
+ }
}
}
}
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 705f369..dac2f34 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -64,16 +64,16 @@ namespace OpenSim.Framework.Communications.Capabilities
public class Caps
{
- private static readonly ILog m_log =
+ private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
private string m_httpListenerHostName;
private uint m_httpListenPort;
-
+
///
/// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester.
///
- private string m_capsObjectPath;
+ private string m_capsObjectPath;
public string CapsObjectPath { get { return m_capsObjectPath; } }
private CapsHandlers m_capsHandlers;
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// The following two entries are in a module, however, there also here so that we don't re-assign
// the path to another cap by mistake.
- private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
+ private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
//private string eventQueue = "0100/";
@@ -100,7 +100,7 @@ namespace OpenSim.Framework.Communications.Capabilities
private bool m_dumpAssetsToFile;
private string m_regionName;
- // These are callbacks which will be setup by the scene so that we can update scene data when we
+ // These are callbacks which will be setup by the scene so that we can update scene data when we
// receive capability calls
public NewInventoryItem AddNewInventoryItem = null;
public ItemUpdatedCallback ItemUpdatedCall = null;
@@ -128,46 +128,46 @@ namespace OpenSim.Framework.Communications.Capabilities
public void RegisterHandlers()
{
DeregisterHandlers();
-
- string capsBase = "/CAPS/" + m_capsObjectPath;
-
+
+ string capsBase = "/CAPS/" + m_capsObjectPath;
+
try
{
// the root of all evil
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
- m_capsHandlers["MapLayer"] =
- new LLSDStreamhandler("POST",
- capsBase + m_mapLayerPath,
+ m_capsHandlers["MapLayer"] =
+ new LLSDStreamhandler("POST",
+ capsBase + m_mapLayerPath,
GetMapLayer);
- m_capsHandlers["NewFileAgentInventory"] =
+ m_capsHandlers["NewFileAgentInventory"] =
new LLSDStreamhandler("POST",
capsBase + m_newInventory,
NewAgentInventoryRequest);
- m_capsHandlers["UpdateNotecardAgentInventory"] =
+ m_capsHandlers["UpdateNotecardAgentInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory);
m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"];
- m_capsHandlers["UpdateScriptTaskInventory"] =
+ m_capsHandlers["UpdateScriptTaskInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
-
- // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
- // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
- // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service,
- // but when I went on the Linden grid, the
+
+ // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
+ // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
+ // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service,
+ // but when I went on the Linden grid, the
// simulators I visited (version 1.21) were, surprisingly, no longer supplying this capability. Instead,
// the 1.19.1.4 client appeared to be happily flowing inventory data over UDP
//
- // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid
- // we will be
+ // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid
+ // we will be
// able to get the data we need to implement the necessary part of the protocol to fix the issue above.
-// m_capsHandlers["FetchInventoryDescendents"] =
+// m_capsHandlers["FetchInventoryDescendents"] =
// new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryRequest);
-
- // m_capsHandlers["FetchInventoryDescendents"] =
+
+ // m_capsHandlers["FetchInventoryDescendents"] =
// new LLSDStreamhandler("POST",
// capsBase + m_fetchInventory,
// FetchInventory));
// m_capsHandlers["RequestTextureDownload"] = new RestStreamHandler("POST",
- // capsBase + m_requestTexture,
+ // capsBase + m_requestTexture,
// RequestTexture);
}
catch (Exception e)
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.Communications.Capabilities
///
///
///
- public void RegisterHandler(string capName, IRequestHandler handler)
+ public void RegisterHandler(string capName, IRequestHandler handler)
{
m_capsHandlers[capName] = handler;
m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path);
@@ -189,14 +189,14 @@ namespace OpenSim.Framework.Communications.Capabilities
///
/// Remove all CAPS service handlers.
- ///
+ ///
///
///
///
///
public void DeregisterHandlers()
{
- foreach (string capsName in m_capsHandlers.Caps)
+ foreach (string capsName in m_capsHandlers.Caps)
{
m_capsHandlers.Remove(capsName);
}
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// FIXME: these all should probably go into the respective region
// modules
-
+
///
/// Processes a fetch inventory request and sends the reply
@@ -229,7 +229,7 @@ namespace OpenSim.Framework.Communications.Capabilities
///
///
///
- // Request is like:
+ // Request is like:
//
//
//
//
- // multiple fetch-folder maps are allowed within the larger folders map.
+ // multiple fetch-folder maps are allowed within the larger folders map.
public string FetchInventoryRequest(string request, string path, string param)
{
string unmodifiedRequest = request.ToString();
-
+
//m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest);
m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName);
-
+
Hashtable hash = new Hashtable();
try
{
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities
m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
m_log.Error("Request: " + request.ToString());
}
-
+
ArrayList foldersrequested = (ArrayList)hash["folders"];
string response = "";
@@ -275,15 +275,15 @@ namespace OpenSim.Framework.Communications.Capabilities
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
inventoryitemstr = inventoryitemstr.Replace("", "");
-
+
response += inventoryitemstr;
}
-
+
if (response.Length == 0)
{
// Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
// Therefore, I'm concluding that the client only has so many threads available to do requests
- // and when a thread stalls.. is stays stalled.
+ // and when a thread stalls.. is stays stalled.
// Therefore we need to return something valid
response = "";
}
@@ -291,7 +291,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
response = "";
}
-
+
//m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml");
//m_log.Debug(Util.GetFormattedXml(response));
@@ -310,7 +310,7 @@ namespace OpenSim.Framework.Communications.Capabilities
contents.agent___id = m_agentID;
contents.owner___id = invFetch.owner_id;
contents.folder___id = invFetch.folder_id;
-
+
// The version number being sent back was originally 1.
// Unfortunately, on 1.19.1.4, this means that we see a problem where on subsequent logins
// without clearing client cache, objects in the root folder disappear until the cache is cleared,
@@ -318,8 +318,8 @@ namespace OpenSim.Framework.Communications.Capabilities
//
// Seeing the version to something other than 0 may be the right thing to do, but there is
// a greater subtlety of the second life protocol that needs to be understood first.
- contents.version = 0;
-
+ contents.version = 0;
+
contents.descendents = 0;
reply.folders.Array.Add(contents);
List itemList = null;
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
itemList = CAPSFetchInventoryDescendents(m_agentID, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order);
}
-
+
if (itemList != null)
{
foreach (InventoryItemBase invItem in itemList)
@@ -336,12 +336,12 @@ namespace OpenSim.Framework.Communications.Capabilities
}
}
else
- {
+ {
IClientAPI client = GetClient(m_agentID);
-
- // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response.
+
+ // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response.
// If we don't send back the response,
- // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest())
+ // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest())
if (client != null)
{
client.SendAgentAlertMessage(
@@ -351,11 +351,11 @@ namespace OpenSim.Framework.Communications.Capabilities
else
{
m_log.ErrorFormat(
- "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure",
+ "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure",
m_agentID);
}
}
-
+
contents.descendents = contents.items.Array.Count;
return reply;
}
@@ -375,7 +375,7 @@ namespace OpenSim.Framework.Communications.Capabilities
llsdItem.item_id = invItem.ID;
llsdItem.name = invItem.Name;
llsdItem.parent_id = invItem.Folder;
- llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
+ llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower();
llsdItem.permissions = new LLSDPermissions();
llsdItem.permissions.creator_id = invItem.Creator;
@@ -395,7 +395,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
protected static LLSDMapLayer GetLLSDMapLayerResponse()
@@ -421,7 +421,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -437,7 +437,7 @@ namespace OpenSim.Framework.Communications.Capabilities
#region EventQueue (Currently not enabled)
///
- ///
+ ///
///
///
///
@@ -463,7 +463,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
public string CreateEmptyEventResponse()
@@ -590,7 +590,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -622,7 +622,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -708,7 +708,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// Item to update
/// Prim containing item to update
/// Signals whether the script to update is currently running
- /// New asset data
+ /// New asset data
public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data)
{
if (TaskScriptUpdatedCall != null)
@@ -751,7 +751,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -807,7 +807,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- /// This class is a callback invoked when a client sends asset data to
+ /// This class is a callback invoked when a client sends asset data to
/// an agent inventory notecard update url
///
public class ItemUpdater
@@ -831,7 +831,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -889,7 +889,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- /// This class is a callback invoked when a client sends asset data to
+ /// This class is a callback invoked when a client sends asset data to
/// a task inventory script update url
///
public class TaskInventoryScriptUpdater
@@ -921,7 +921,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -931,7 +931,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
try
{
-// m_log.InfoFormat("[CAPS]: " +
+// m_log.InfoFormat("[CAPS]: " +
// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
// data, path, param));
diff --git a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
index e76a5c5..4a3d00f 100644
--- a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
@@ -64,14 +64,14 @@ namespace OpenSim.Framework.Communications.Capabilities
///
/// name of the capability of the cap
/// handler to be removed
- public void Remove(string capsName)
+ public void Remove(string capsName)
{
// This line must be here, or caps will break!
m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
m_capsHandlers.Remove(capsName);
}
- public bool ContainsCap(string cap)
+ public bool ContainsCap(string cap)
{
return m_capsHandlers.ContainsKey(cap);
}
@@ -85,14 +85,14 @@ namespace OpenSim.Framework.Communications.Capabilities
/// retrieve a cap handler for a cap that is not contained in
/// CapsHandlers.
///
- public IRequestHandler this[string idx]
+ public IRequestHandler this[string idx]
{
- get
+ get
{
return m_capsHandlers[idx];
}
- set
+ set
{
if (m_capsHandlers.ContainsKey(idx))
{
@@ -111,9 +111,9 @@ namespace OpenSim.Framework.Communications.Capabilities
/// Return the list of cap names for which this CapsHandlers
/// object contains cap handlers.
///
- public string[] Caps
+ public string[] Caps
{
- get
+ get
{
string[] __keys = new string[m_capsHandlers.Keys.Count];
m_capsHandlers.Keys.CopyTo(__keys, 0);
@@ -125,7 +125,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// Return an LLSD-serializable Hashtable describing the
/// capabilities and their handler details.
///
- public Hashtable CapsDetails
+ public Hashtable CapsDetails
{
get
{
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSD.cs b/OpenSim/Framework/Communications/Capabilities/LLSD.cs
index e869267..bcf7a88 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSD.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSD.cs
@@ -37,12 +37,12 @@ using libsecondlife;
namespace OpenSim.Framework.Communications.Capabilities
{
///
- /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code.
+ /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code.
///
public static class LLSD
{
///
- ///
+ ///
///
public class LLSDParseException : Exception
{
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
public class LLSDSerializeException : Exception
{
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -116,7 +116,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -217,7 +217,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -360,7 +360,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -441,7 +441,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -453,7 +453,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
///
@@ -661,7 +661,7 @@ namespace OpenSim.Framework.Communications.Capabilities
}
///
- ///
+ ///
///
///
private static void SkipWS(XmlTextReader reader)
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
index 409d2e0..507f12b 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs
@@ -35,9 +35,9 @@ namespace OpenSim.Framework.Communications.Capabilities
{
public class LLSDHelpers
{
-// private static readonly log4net.ILog m_log
+// private static readonly log4net.ILog m_log
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
-
+
public static string SerialiseLLSDReply(object obj)
{
StringWriter sw = new StringWriter();
@@ -47,9 +47,9 @@ namespace OpenSim.Framework.Communications.Capabilities
SerializeLLSDType(writer, obj);
writer.WriteEndElement();
writer.Close();
-
+
//m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString());
-
+
return sw.ToString();
}
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Capabilities
fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
//TODO
// the LLSD map/array types in the array need to be deserialised
- // but first we need to know the right class to deserialise them into.
+ // but first we need to know the right class to deserialise them into.
}
else
{
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
index 31896c2..1a75aba 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public int descendents;
public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
public LLSDArray items = new LLSDArray();
- public LLUUID owner___id; // and of course we can't have field names with "-" in
+ public LLUUID owner___id; // and of course we can't have field names with "-" in
public int version;
}
}
\ No newline at end of file
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs
index fb5eaa8..c045dcf 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs
@@ -23,7 +23,7 @@
* 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;
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
}
- public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds)
+ public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds)
{
region_name = region;
parcel_local_id = localID;
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
index 5e8a08f..8683cea 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Communications.Capabilities
//string requestBody = streamReader.ReadToEnd();
//streamReader.Close();
- // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)
+ // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)
// libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
index ee9ff1b..8bfd20c 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
///
/// The task inventory item that was updated
- ///
+ ///
public LLUUID item_id;
///
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
index df32d1a..e45d9de 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs
@@ -34,17 +34,17 @@ namespace OpenSim.Framework.Communications.Capabilities
{
///
/// The item containing the script to update
- ///
+ ///
public LLUUID item_id;
///
/// The task containing the script
- ///
+ ///
public LLUUID task_id;
///
/// Signals whether the script is currently active
- ///
+ ///
public int is_script_running;
}
}
\ No newline at end of file
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs
index 67064b0..8143233 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs
@@ -23,7 +23,7 @@
* 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.
-*
+*
*/
namespace OpenSim.Framework.Communications.Capabilities
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
}
- public LLSDVoiceAccountResponse(string user, string pass)
+ public LLSDVoiceAccountResponse(string user, string pass)
{
username = user;
password = pass;
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 2813aa0..37020f6 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -236,7 +236,7 @@ namespace OpenSim.Framework.Communications
public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile)
{
- m_userService.UpdateUserProfileProperties(UserProfile);
+ m_userService.UpdateUserProfileProperties(UserProfile);
return;
}
diff --git a/OpenSim/Framework/Communications/GenericAsyncResult.cs b/OpenSim/Framework/Communications/GenericAsyncResult.cs
index 6c5f5f7..48f72a0 100644
--- a/OpenSim/Framework/Communications/GenericAsyncResult.cs
+++ b/OpenSim/Framework/Communications/GenericAsyncResult.cs
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications
public void EndInvoke()
{
- // This method assumes that only 1 thread calls EndInvoke
+ // This method assumes that only 1 thread calls EndInvoke
if (!IsCompleted)
{
// If the operation isn't done, wait for it
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Communications
// Save the asynchronous operation's result
m_result = result;
- // Tell the base class that the operation completed
+ // Tell the base class that the operation completed
// sucessfully (no exception)
base.SetAsCompleted(completedSynchronously);
}
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs
index c8a3c85..f7a8857 100644
--- a/OpenSim/Framework/Communications/IInventoryServices.cs
+++ b/OpenSim/Framework/Communications/IInventoryServices.cs
@@ -43,62 +43,62 @@ namespace OpenSim.Framework.Communications
public interface IInventoryServices
{
///
- /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
+ /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
/// inventory has been received
///
///
///
void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
-
+
///
/// Add a new folder to the user's inventory
///
///
/// true if the folder was successfully added
bool AddFolder(InventoryFolderBase folder);
-
+
///
/// Move an inventory folder to a new location
///
/// A folder containing the details of the new location
/// true if the folder was successfully moved
bool MoveFolder(InventoryFolderBase folder);
-
+
///
/// Purge an inventory folder of all its items and subfolders.
///
///
/// true if the folder was successfully purged
bool PurgeFolder(InventoryFolderBase folder);
-
+
///
/// Add a new item to the user's inventory
///
///
/// true if the item was successfully added
bool AddItem(InventoryItemBase item);
-
+
///
/// Update an item in the user's inventory
///
///
/// true if the item was successfully updated
bool UpdateItem(InventoryItemBase item);
-
+
///
/// Delete an item from the user's inventory
///
///
/// true if the item was successfully deleted
bool DeleteItem(InventoryItemBase item);
-
+
///
/// Create a new inventory for the given user.
///
///
/// true if the inventory was successfully created, false otherwise
bool CreateNewUserInventory(LLUUID user);
-
+
bool HasInventoryForUser(LLUUID userID);
///
@@ -107,12 +107,12 @@ namespace OpenSim.Framework.Communications
///
/// null if no root folder was found
InventoryFolderBase RequestRootFolder(LLUUID userID);
-
+
///
/// Returns a list of all the folders in a given user's inventory.
///
///
- /// A flat list of the user's inventory folder tree,
+ /// A flat list of the user's inventory folder tree,
/// null if there is no inventory for this user
List GetInventorySkeleton(LLUUID userId);
}
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 7d71d02..67a8c78 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Communications
///
/// First name
/// Last name
- /// A user profile. Returns null if no profile is found
+ /// A user profile. Returns null if no profile is found
UserProfileData GetUserProfile(string firstName, string lastName);
//UserProfileData GetUserProfile(string name);
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.Communications
/// Loads a user profile from a database by UUID
///
/// The target UUID
- /// A user profile. Returns null if no user profile is found.
+ /// A user profile. Returns null if no user profile is found.
UserProfileData GetUserProfile(LLUUID userId);
void clearUserAgent(LLUUID avatarID);
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications
UserProfileData SetupMasterUser(LLUUID userId);
///
- ///
+ ///
///
///
LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Communications
List GetUserFriendList(LLUUID friendlistowner);
///
- /// Get's the User Appearance
+ /// Get's the User Appearance
AvatarAppearance GetUserAppearance(LLUUID user);
void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs
index e81d8c4..dffeed3 100644
--- a/OpenSim/Framework/Communications/InventoryServiceBase.cs
+++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs
@@ -40,13 +40,13 @@ namespace OpenSim.Framework.Communications
///
public abstract class InventoryServiceBase : IInventoryServices
{
- private static readonly ILog m_log
+ private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected Dictionary m_plugins = new Dictionary();
#region Plugin methods
-
+
///
/// Adds a new user server plugin - plugins will be requested in the order they were loaded.
///
@@ -76,42 +76,42 @@ namespace OpenSim.Framework.Communications
}
}
}
-
+
#endregion
-
- #region IInventoryServices methods
-
+
+ #region IInventoryServices methods
+
// See IInventoryServices
public List GetInventorySkeleton(LLUUID 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();
-
+ return null;
+ }
+
+ List userFolders = new List();
+
userFolders.Add(rootFolder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
IList folders = plugin.Value.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(LLUUID userID)
{
@@ -133,31 +133,31 @@ namespace OpenSim.Framework.Communications
public bool CreateNewUserInventory(LLUUID 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}",
+ + "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
- public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
-
+ public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
+
#endregion
-
+
#region Methods used by GridInventoryService
public List RequestSubFolders(LLUUID parentFolderID)
@@ -180,21 +180,21 @@ namespace OpenSim.Framework.Communications
}
return itemsList;
}
-
+
#endregion
// See IInventoryServices
public bool AddFolder(InventoryFolderBase folder)
{
m_log.DebugFormat(
- "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
+ "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.addInventoryFolder(folder);
}
-
- // FIXME: Should return false on failure
+
+ // FIXME: Should return false on failure
return true;
}
@@ -203,14 +203,14 @@ namespace OpenSim.Framework.Communications
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.moveInventoryFolder(folder);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
// See IInventoryServices
@@ -218,14 +218,14 @@ namespace OpenSim.Framework.Communications
{
m_log.DebugFormat(
"[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.addInventoryItem(item);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
// See IInventoryServices
@@ -233,14 +233,14 @@ namespace OpenSim.Framework.Communications
{
m_log.InfoFormat(
"[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.updateInventoryItem(item);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
// See IInventoryServices
@@ -248,19 +248,19 @@ namespace OpenSim.Framework.Communications
{
m_log.InfoFormat(
"[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder);
-
+
foreach (KeyValuePair plugin in m_plugins)
{
plugin.Value.deleteInventoryItem(item.ID);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
-
+
///
/// 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.
///
@@ -269,13 +269,13 @@ namespace OpenSim.Framework.Communications
{
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 (KeyValuePair plugin in m_plugins)
{
plugin.Value.deleteInventoryFolder(subFolder.ID);
@@ -288,17 +288,17 @@ namespace OpenSim.Framework.Communications
{
DeleteItem(item);
}
-
- // FIXME: Should return false on failure
- return true;
+
+ // FIXME: Should return false on failure
+ return true;
}
-
+
private void AddNewInventorySet(UsersInventory inventory)
{
foreach (InventoryFolderBase folder in inventory.Folders.Values)
{
AddFolder(folder);
- }
+ }
}
///
@@ -340,7 +340,7 @@ namespace OpenSim.Framework.Communications
folder.Type = (short)AssetType.Bodypart;
folder.Version = 1;
Folders.Add(folder.ID, folder);
-
+
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
folder.Owner = user;
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Communications
folder.Name = "Calling Cards";
folder.Type = (short)AssetType.CallingCard;
folder.Version = 1;
- Folders.Add(folder.ID, folder);
+ Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase();
folder.ParentID = rootFolder;
diff --git a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs
index 6ec21d9..1a9cc24 100644
--- a/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs
@@ -31,9 +31,9 @@ namespace OpenSim.Framework.Communications.Limit
/// Interface for strategies that can limit requests from the client. Currently only used in the
/// texture modules to deal with repeated requests for certain textures. However, limiting strategies
/// could be used with other requests.
- ///
+ ///
public interface IRequestLimitStrategy
- {
+ {
///
/// Should the request be allowed? If the id is not monitored, then the request is always allowed.
/// Otherwise, the strategy criteria will be applied.
@@ -41,21 +41,21 @@ namespace OpenSim.Framework.Communications.Limit
///
///
bool AllowRequest(TId id);
-
+
///
/// Has the request been refused just once?
///
/// False if the request has not yet been refused, or if the request has been refused more
/// than once.
bool IsFirstRefusal(TId id);
-
+
///
/// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring
/// continues.
///
///
void MonitorRequests(TId id);
-
+
///
/// Is the id being monitored?
///
diff --git a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs
index 72d0586..932f780 100644
--- a/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs
@@ -26,15 +26,15 @@
*/
namespace OpenSim.Framework.Communications.Limit
-{
+{
///
/// Strategy which polices no limits
///
public class NullLimitStrategy : IRequestLimitStrategy
- {
+ {
public bool AllowRequest(TId id) { return true; }
public bool IsFirstRefusal(TId id) { return false; }
public void MonitorRequests(TId id) { /* intentionally blank */ }
- public bool IsMonitoringRequests(TId id) { return false; }
+ public bool IsMonitoringRequests(TId id) { return false; }
}
}
diff --git a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs
index dfa05fa..bb72029 100644
--- a/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs
@@ -31,14 +31,14 @@ namespace OpenSim.Framework.Communications.Limit
{
///
/// Limit requests by discarding them after they've been repeated a certain number of times.
- ///
+ ///
public class RepeatLimitStrategy : IRequestLimitStrategy
{
///
/// Record each asset request that we're notified about.
///
private readonly Dictionary requestCounts = new Dictionary();
-
+
///
/// The maximum number of requests that can be made before we drop subsequent requests.
///
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Limit
{
get { return m_maxRequests; }
}
-
+
///
/// The maximum number of requests that may be served before all further
/// requests are dropped.
@@ -55,52 +55,52 @@ namespace OpenSim.Framework.Communications.Limit
{
m_maxRequests = maxRequests;
}
-
+
///
///
///
public bool AllowRequest(TId id)
- {
+ {
if (requestCounts.ContainsKey(id))
{
requestCounts[id] += 1;
-
+
if (requestCounts[id] > m_maxRequests)
- {
+ {
return false;
- }
+ }
}
-
+
return true;
}
-
+
///
///
- ///
+ ///
public bool IsFirstRefusal(TId id)
{
if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id])
{
return true;
- }
-
+ }
+
return false;
}
-
+
///
///
- ///
+ ///
public void MonitorRequests(TId id)
{
if (!IsMonitoringRequests(id))
{
requestCounts.Add(id, 1);
- }
- }
-
+ }
+ }
+
///
///
- ///
+ ///
public bool IsMonitoringRequests(TId id)
{
return requestCounts.ContainsKey(id);
diff --git a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs
index 34b01ff..b5b925e 100644
--- a/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs
+++ b/OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs
@@ -32,17 +32,17 @@ namespace OpenSim.Framework.Communications.Limit
{
///
/// Limit requests by discarding repeat attempts that occur within a given time period
- ///
+ ///
/// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests
/// for the same texture at different resolutions.
- ///
+ ///
public class TimeLimitStrategy : IRequestLimitStrategy
{
///
/// Record the time at which an asset request occurs.
///
- private readonly Dictionary requests = new Dictionary();
-
+ private readonly Dictionary requests = new Dictionary();
+
///
/// The minimum time period between which requests for the same data will be serviced.
///
@@ -53,37 +53,37 @@ namespace OpenSim.Framework.Communications.Limit
}
///
- ///
+ ///
public TimeLimitStrategy(TimeSpan repeatPeriod)
{
m_repeatPeriod = repeatPeriod;
}
-
+
///
///
///
public bool AllowRequest(TId id)
- {
+ {
if (IsMonitoringRequests(id))
{
DateTime now = DateTime.Now;
TimeSpan elapsed = now - requests[id].Time;
-
+
if (elapsed < RepeatPeriod)
{
requests[id].Refusals += 1;
return false;
}
-
- requests[id].Time = now;
+
+ requests[id].Time = now;
}
-
+
return true;
}
-
+
///
///
- ///
+ ///
public bool IsFirstRefusal(TId id)
{
if (IsMonitoringRequests(id))
@@ -92,31 +92,31 @@ namespace OpenSim.Framework.Communications.Limit
{
return true;
}
- }
-
+ }
+
return false;
}
-
+
///
///
- ///
+ ///
public void MonitorRequests(TId id)
{
if (!IsMonitoringRequests(id))
{
requests.Add(id, new Request(DateTime.Now));
- }
- }
-
+ }
+ }
+
///
///
- ///
+ ///
public bool IsMonitoringRequests(TId id)
{
return requests.ContainsKey(id);
- }
+ }
}
-
+
///
/// Private request details.
///
@@ -126,12 +126,12 @@ namespace OpenSim.Framework.Communications.Limit
/// Time of last request
///
public DateTime Time;
-
+
///
/// Number of refusals associated with this request
///
public int Refusals;
-
+
public Request(DateTime time)
{
Time = time;
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs
index bccac74..6fdd06a 100644
--- a/OpenSim/Framework/Communications/LoginResponse.cs
+++ b/OpenSim/Framework/Communications/LoginResponse.cs
@@ -239,7 +239,7 @@ namespace OpenSim.Framework.Communications
"Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.",
"false");
}
-
+
///
/// Response to indicate that login failed because the agent's inventory was not available.
///
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Communications
return GenerateFailureResponse(
"key",
"The avatar inventory service is not responding. Please notify your login region operator.",
- "false");
+ "false");
}
public XmlRpcResponse CreateAlreadyLoggedInResponse()
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index fa78a30..bd0fa53 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -48,8 +48,8 @@ namespace OpenSim.Framework.Communications
protected string m_welcomeMessage = "Welcome to OpenSim";
protected UserManagerBase m_userManager = null;
- protected Mutex m_loginMutex = new Mutex(false);
-
+ protected Mutex m_loginMutex = new Mutex(false);
+
///
/// Used during login to send the skeleton of the OpenSim Library to the client.
///
@@ -61,12 +61,12 @@ namespace OpenSim.Framework.Communications
///
///
///
- public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
+ public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
string welcomeMess)
{
m_userManager = userManager;
m_libraryRootFolder = libraryRootFolder;
-
+
if (welcomeMess != String.Empty)
{
m_welcomeMessage = welcomeMess;
@@ -79,15 +79,15 @@ namespace OpenSim.Framework.Communications
/// The existing response
/// The user profile
public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest);
-
+
///
/// Get the initial login inventory skeleton (in other words, the folder structure) for the given user.
///
///
///
/// This will be thrown if there is a problem with the inventory service
- protected abstract InventoryData GetInventorySkeleton(LLUUID userID);
-
+ protected abstract InventoryData GetInventorySkeleton(LLUUID userID);
+
///
/// Called when we receive the client's initial XMLRPC login_to_simulator request message
///
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications
UserProfileData userProfile;
LoginResponse logResponse = new LoginResponse();
-
+
string firstname = String.Empty;
string lastname = String.Empty;
@@ -120,23 +120,23 @@ namespace OpenSim.Framework.Communications
{
firstname = (string) requestData["first"];
lastname = (string) requestData["last"];
-
+
m_log.InfoFormat(
- "[LOGIN BEGIN]: Received login request message from user {0} {1}",
+ "[LOGIN BEGIN]: Received login request message from user {0} {1}",
firstname, lastname);
string clientVersion = "Unknown";
-
+
if (requestData.Contains("version"))
{
- clientVersion = (string)requestData["version"];
+ clientVersion = (string)requestData["version"];
}
-
+
if (requestData.Contains("start"))
{
startLocationRequest = (string)requestData["start"];
- }
-
+ }
+
m_log.DebugFormat(
"[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest);
@@ -163,9 +163,9 @@ namespace OpenSim.Framework.Communications
catch (Exception e)
{
m_log.InfoFormat(
- "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
+ "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
requestData["web_login_key"], firstname, lastname, e);
-
+
return logResponse.CreateFailedResponse();
}
GoodLogin = AuthenticateUser(userProfile, webloginkey);
@@ -176,14 +176,14 @@ namespace OpenSim.Framework.Communications
{
m_log.Info(
"[LOGIN END]: login_to_simulator login message did not contain all the required data");
-
+
return logResponse.CreateGridErrorResponse();
}
if (!GoodLogin)
{
m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname);
-
+
return logResponse.CreateLoginFailedResponse();
}
else
@@ -199,11 +199,11 @@ namespace OpenSim.Framework.Communications
m_userManager.CommitAgent(ref userProfile);
// Reject the login
-
+
m_log.InfoFormat(
- "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
+ "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
firstname, lastname);
-
+
return logResponse.CreateAlreadyLoggedInResponse();
}
// Otherwise...
@@ -214,9 +214,9 @@ namespace OpenSim.Framework.Communications
{
LLUUID agentID = userProfile.ID;
InventoryData inventData = null;
-
+
try
- {
+ {
inventData = GetInventorySkeleton(agentID);
}
catch (Exception e)
@@ -224,10 +224,10 @@ namespace OpenSim.Framework.Communications
m_log.ErrorFormat(
"[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}",
agentID, e.GetType(), e.Message);
-
- return logResponse.CreateLoginInventoryFailedResponse();
- }
-
+
+ return logResponse.CreateLoginInventoryFailedResponse();
+ }
+
ArrayList AgentInventoryArray = inventData.InventoryArray;
Hashtable InventoryRootHash = new Hashtable();
@@ -235,7 +235,7 @@ namespace OpenSim.Framework.Communications
ArrayList InventoryRoot = new ArrayList();
InventoryRoot.Add(InventoryRootHash);
userProfile.RootInventoryFolderID = inventData.RootFolderID;
-
+
// Inventory Library Section
Hashtable InventoryLibRootHash = new Hashtable();
InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
@@ -244,10 +244,10 @@ namespace OpenSim.Framework.Communications
logResponse.InventoryLibRoot = InventoryLibRoot;
logResponse.InventoryLibraryOwner = GetLibraryOwner();
-
+
logResponse.InventoryRoot = InventoryRoot;
logResponse.InventorySkeleton = AgentInventoryArray;
- logResponse.InventoryLibrary = GetInventoryLibrary();
+ logResponse.InventoryLibrary = GetInventoryLibrary();
// Circuit Code
uint circode = (uint) (Util.RandomClass.Next());
@@ -280,15 +280,15 @@ namespace OpenSim.Framework.Communications
//return logResponse.ToXmlRpcResponse();
}
CommitAgent(ref userProfile);
-
+
// If we reach this point, then the login has successfully logged onto the grid
if (StatsManager.UserStats != null)
StatsManager.UserStats.AddSuccessfulLogin();
-
+
m_log.DebugFormat(
"[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.",
firstname, lastname);
-
+
return logResponse.ToXmlRpcResponse();
}
catch (Exception e)
@@ -422,10 +422,10 @@ namespace OpenSim.Framework.Communications
}
CommitAgent(ref userProfile);
-
+
// If we reach this point, then the login has successfully logged onto the grid
if (StatsManager.UserStats != null)
- StatsManager.UserStats.AddSuccessfulLogin();
+ StatsManager.UserStats.AddSuccessfulLogin();
return logResponse.ToLLSDResponse();
}
@@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications
// period, space, parens, and dash.
Regex wfcut = new Regex("[^a-zA-Z0-9_\\.\\$ \\(\\)\\-]");
-
+
Hashtable returnactions = new Hashtable();
int statuscode = 200;
@@ -467,7 +467,7 @@ namespace OpenSim.Framework.Communications
// the client requires the HTML form field be named 'username'
// however, the data it sends when it loads the first time is 'firstname'
// another one of those little nuances.
-
+
if (keysvals.Contains("firstname"))
firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999);
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications
if (keysvals.Contains("lang"))
lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999);
-
+
if (keysvals.Contains("password"))
password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999);
@@ -541,8 +541,8 @@ namespace OpenSim.Framework.Communications
return returnactions;
}
- public string GetLoginForm(string firstname, string lastname, string location, string region,
- string grid, string channel, string version, string lang,
+ public string GetLoginForm(string firstname, string lastname, string location, string region,
+ string grid, string channel, string version, string lang,
string password, string errormessages)
{
// inject our values in the form at the markers
@@ -559,7 +559,7 @@ namespace OpenSim.Framework.Communications
loginform = sr.ReadToEnd();
sr.Close();
}
-
+
loginform = loginform.Replace("[$firstname]", firstname);
loginform = loginform.Replace("[$lastname]", lastname);
loginform = loginform.Replace("[$location]", location);
@@ -586,7 +586,7 @@ namespace OpenSim.Framework.Communications
responseString += "OpenSim Login";
responseString += " ";
responseString += "