aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJeff Ames2008-05-16 01:22:11 +0000
committerJeff Ames2008-05-16 01:22:11 +0000
commit65c5efe43b68700bad94076d4cd421160203c5de (patch)
tree589b56649ed02f4942671fd6e51c6dc43f682e0d /OpenSim/Framework
parentThank you very much, mjm for : (diff)
downloadopensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.zip
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.gz
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.bz2
opensim-SC_OLD-65c5efe43b68700bad94076d4cd421160203c5de.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AssemblyInfo.cs8
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs20
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs6
-rw-r--r--OpenSim/Framework/ClientManager.cs2
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetCache.cs22
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetServerBase.cs8
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs220
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs8
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs46
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs72
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs78
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs130
-rw-r--r--OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs16
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSD.cs26
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs10
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDInventoryItem.cs2
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDParcelVoiceInfoResponse.cs4
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDTaskInventoryUploadComplete.cs2
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDTaskScriptUpdate.cs6
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDVoiceAccountResponse.cs4
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs2
-rw-r--r--OpenSim/Framework/Communications/GenericAsyncResult.cs4
-rw-r--r--OpenSim/Framework/Communications/IInventoryServices.cs22
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs8
-rw-r--r--OpenSim/Framework/Communications/InventoryServiceBase.cs122
-rw-r--r--OpenSim/Framework/Communications/Limit/IRequestLimitStrategy.cs10
-rw-r--r--OpenSim/Framework/Communications/Limit/NullLimitStrategy.cs6
-rw-r--r--OpenSim/Framework/Communications/Limit/RepeatLimitStrategy.cs38
-rw-r--r--OpenSim/Framework/Communications/Limit/TimeLimitStrategy.cs50
-rw-r--r--OpenSim/Framework/Communications/LoginResponse.cs4
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs108
-rw-r--r--OpenSim/Framework/Communications/Properties/AssemblyInfo.cs10
-rw-r--r--OpenSim/Framework/Communications/RestClient.cs12
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs26
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs8
-rw-r--r--OpenSim/Framework/Console/OpenSimAppender.cs16
-rw-r--r--OpenSim/Framework/IClientAPI.cs34
-rw-r--r--OpenSim/Framework/IClientAPI2.cs4
-rw-r--r--OpenSim/Framework/IInventoryData.cs2
-rw-r--r--OpenSim/Framework/IUserData.cs6
-rw-r--r--OpenSim/Framework/InventoryFolderBase.cs2
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs20
-rw-r--r--OpenSim/Framework/RegionCommsListener.cs6
-rw-r--r--OpenSim/Framework/RegionInfo.cs8
-rw-r--r--OpenSim/Framework/Remoting.cs2
-rw-r--r--OpenSim/Framework/SerializableInventory.cs2
-rw-r--r--OpenSim/Framework/SerializableRegionInfo.cs4
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs42
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs28
-rw-r--r--OpenSim/Framework/Servers/RestObjectPosterResponse.cs10
-rw-r--r--OpenSim/Framework/Servers/RestStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs2
-rw-r--r--OpenSim/Framework/Statistics/AssetStatsCollector.cs28
-rw-r--r--OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs4
-rw-r--r--OpenSim/Framework/Statistics/SimExtraStatsCollector.cs62
-rw-r--r--OpenSim/Framework/Statistics/StatsManager.cs28
-rw-r--r--OpenSim/Framework/Statistics/UserStatsCollector.cs24
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs12
-rw-r--r--OpenSim/Framework/Util.cs20
60 files changed, 745 insertions, 745 deletions
diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs
index d43b259..3cd3def 100644
--- a/OpenSim/Framework/AssemblyInfo.cs
+++ b/OpenSim/Framework/AssemblyInfo.cs
@@ -28,7 +28,7 @@
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30 30
31// General Information about an assembly is controlled through the following 31// General information about an assembly is controlled through the following
32// set of attributes. Change these attribute values to modify the information 32// set of attributes. Change these attribute values to modify the information
33// associated with an assembly. 33// associated with an assembly.
34 34
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
41[assembly : AssemblyTrademark("")] 41[assembly : AssemblyTrademark("")]
42[assembly : AssemblyCulture("")] 42[assembly : AssemblyCulture("")]
43 43
44// Setting ComVisible to false makes the types in this assembly not visible 44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from 45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type. 46// COM, set the ComVisible attribute to true on that type.
47 47
48[assembly : ComVisible(false)] 48[assembly : ComVisible(false)]
@@ -54,7 +54,7 @@ using System.Runtime.InteropServices;
54// Version information for an assembly consists of the following four values: 54// Version information for an assembly consists of the following four values:
55// 55//
56// Major Version 56// Major Version
57// Minor Version 57// Minor Version
58// Build Number 58// Build Number
59// Revision 59// Revision
60// 60//
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 945163c..7adcb4a 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -38,7 +38,7 @@ using Nini.Config;
38/// Loads assets from the filesystem location. Not yet a plugin, though it should be. 38/// Loads assets from the filesystem location. Not yet a plugin, though it should be.
39/// </summary> 39/// </summary>
40namespace OpenSim.Framework.AssetLoader.Filesystem 40namespace OpenSim.Framework.AssetLoader.Filesystem
41{ 41{
42 public class AssetLoaderFileSystem : IAssetLoader 42 public class AssetLoaderFileSystem : IAssetLoader
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -63,7 +63,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
63 63
64 return asset; 64 return asset;
65 } 65 }
66 66
67 protected static void LoadAsset(AssetBase info, bool image, string path) 67 protected static void LoadAsset(AssetBase info, bool image, string path)
68 { 68 {
69 FileInfo fInfo = new FileInfo(path); 69 FileInfo fInfo = new FileInfo(path);
@@ -77,7 +77,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
77 info.Data = idata; 77 info.Data = idata;
78 //info.loaded=true; 78 //info.loaded=true;
79 } 79 }
80 80
81 public void ForEachDefaultXmlAsset(Action<AssetBase> action) 81 public void ForEachDefaultXmlAsset(Action<AssetBase> action)
82 { 82 {
83 string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml"); 83 string assetSetFilename = Path.Combine(Util.assetsDir(), "AssetSets.xml");
@@ -91,28 +91,28 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
91 if (File.Exists(assetSetFilename)) 91 if (File.Exists(assetSetFilename))
92 { 92 {
93 string assetSetPath = "ERROR"; 93 string assetSetPath = "ERROR";
94 94
95 try 95 try
96 { 96 {
97 XmlConfigSource source = new XmlConfigSource(assetSetFilename); 97 XmlConfigSource source = new XmlConfigSource(assetSetFilename);
98 98
99 for (int i = 0; i < source.Configs.Count; i++) 99 for (int i = 0; i < source.Configs.Count; i++)
100 { 100 {
101 assetSetPath = source.Configs[i].GetString("file", String.Empty); 101 assetSetPath = source.Configs[i].GetString("file", String.Empty);
102 102
103 LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets); 103 LoadXmlAssetSet(Path.Combine(Util.assetsDir(), assetSetPath), assets);
104 } 104 }
105 } 105 }
106 catch (XmlException e) 106 catch (XmlException e)
107 { 107 {
108 m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e); 108 m_log.ErrorFormat("[ASSETS]: Error loading {0} : {1}", assetSetPath, e);
109 } 109 }
110 } 110 }
111 else 111 else
112 { 112 {
113 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded."); 113 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
114 } 114 }
115 115
116 assets.ForEach(action); 116 assets.ForEach(action);
117 } 117 }
118 118
@@ -124,7 +124,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
124 protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) 124 protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets)
125 { 125 {
126 m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); 126 m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath);
127 127
128 if (File.Exists(assetSetPath)) 128 if (File.Exists(assetSetPath))
129 { 129 {
130 try 130 try
@@ -156,6 +156,6 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
156 { 156 {
157 m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath); 157 m_log.ErrorFormat("[ASSETS]: Asset set file {0} does not exist!", assetSetPath);
158 } 158 }
159 } 159 }
160 } 160 }
161} 161}
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index cf9ff58..365df1a 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Framework
56 public readonly static int SKIRT = 12; 56 public readonly static int SKIRT = 12;
57 57
58 private readonly static int MAX_WEARABLES = 13; 58 private readonly static int MAX_WEARABLES = 13;
59 59
60 private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); 60 private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
61 private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); 61 private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
62 private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); 62 private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb");
@@ -204,7 +204,7 @@ namespace OpenSim.Framework
204 set { m_wearables[SKIRT].AssetID = value; } 204 set { m_wearables[SKIRT].AssetID = value; }
205 } 205 }
206 206
207 public void SetDefaultWearables() 207 public void SetDefaultWearables()
208 { 208 {
209 m_wearables[BODY].AssetID = BODY_ASSET; 209 m_wearables[BODY].AssetID = BODY_ASSET;
210 m_wearables[BODY].ItemID = BODY_ITEM; 210 m_wearables[BODY].ItemID = BODY_ITEM;
@@ -257,7 +257,7 @@ namespace OpenSim.Framework
257 } 257 }
258 258
259 /// <summary> 259 /// <summary>
260 /// 260 ///
261 /// </summary> 261 /// </summary>
262 /// <param name="texture"></param> 262 /// <param name="texture"></param>
263 /// <param name="visualParam"></param> 263 /// <param name="visualParam"></param>
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 2395c99..a70f7fa 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Framework
72 72
73 public void Remove(uint id) 73 public void Remove(uint id)
74 { 74 {
75 //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count); 75 //m_log.InfoFormat("[CLIENT]: Removing client with code {0}, current count {1}", id, m_clients.Count);
76 lock (m_clients) 76 lock (m_clients)
77 { 77 {
78 m_clients.Remove(id); 78 m_clients.Remove(id);
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
40 40
41 /// <summary> 41 /// <summary>
42 /// Manages local cache of assets and their sending to viewers. 42 /// Manages local cache of assets and their sending to viewers.
43 /// 43 ///
44 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either 44 /// This class actually encapsulates two largely separate mechanisms. One mechanism fetches assets either
45 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and 45 /// synchronously or async and passes the data back to the requester. The second mechanism fetches assets and
46 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and 46 /// sends packetised data directly back to the client. The only point where they meet is AssetReceived() and
47 /// AssetNotFound(), which means they do share the same asset and texture caches. 47 /// AssetNotFound(), which means they do share the same asset and texture caches.
48 /// 48 ///
49 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age). 49 /// TODO Assets in this cache are effectively immortal (they are never disposed off through old age).
50 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets 50 /// This is not a huge problem at the moment since other memory use usually dwarfs that used by assets
51 /// but it's something to bear in mind. 51 /// but it's something to bear in mind.
@@ -281,8 +281,8 @@ namespace OpenSim.Framework.Communications.Cache
281 281
282 /// <summary> 282 /// <summary>
283 /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to 283 /// Synchronously retreive an asset. If the asset isn't in the cache, a request will be made to the persistent store to
284 /// load it into the cache. 284 /// load it into the cache.
285 /// 285 ///
286 /// XXX We'll keep polling the cache until we get the asset or we exceed 286 /// XXX We'll keep polling the cache until we get the asset or we exceed
287 /// the allowed number of polls. This isn't a very good way of doing things since a single thread 287 /// the allowed number of polls. This isn't a very good way of doing things since a single thread
288 /// is processing inbound packets, so if the asset server is slow, we could block this for up to 288 /// 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
431 //making a copy of the list is not ideal 431 //making a copy of the list is not ideal
432 //but the old method of locking around this whole block of code was causing a multi-thread lock 432 //but the old method of locking around this whole block of code was causing a multi-thread lock
433 //between this and the TextureDownloadModule 433 //between this and the TextureDownloadModule
434 //while the localAsset thread running this and trying to send a texture to the callback in the 434 //while the localAsset thread running this and trying to send a texture to the callback in the
435 //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding 435 //texturedownloadmodule , and hitting a lock in there. While the texturedownload thread (which was holding
436 // the lock in the texturedownload module) was trying to 436 // the lock in the texturedownload module) was trying to
437 //request a new asset and hitting a lock in here on the RequestLists. 437 //request a new asset and hitting a lock in here on the RequestLists.
438 438
439 List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests); 439 List<NewAssetRequest> theseRequests = new List<NewAssetRequest>(reqList.Requests);
440 reqList.Requests.Clear(); 440 reqList.Requests.Clear();
441 441
@@ -460,7 +460,7 @@ namespace OpenSim.Framework.Communications.Cache
460 { 460 {
461 // m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); 461 // m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
462 462
463 // Notify requesters for this asset 463 // Notify requesters for this asset
464 AssetRequestsList reqList = null; 464 AssetRequestsList reqList = null;
465 lock (RequestLists) 465 lock (RequestLists)
466 { 466 {
@@ -552,7 +552,7 @@ namespace OpenSim.Framework.Communications.Cache
552 } 552 }
553 return; 553 return;
554 } 554 }
555 //it is in our cache 555 //it is in our cache
556 AssetInfo asset = Assets[requestID]; 556 AssetInfo asset = Assets[requestID];
557 557
558 // add to the AssetRequests list 558 // add to the AssetRequests list
@@ -679,14 +679,14 @@ namespace OpenSim.Framework.Communications.Cache
679 public byte AssetRequestSource = 2; 679 public byte AssetRequestSource = 2;
680 public byte[] Params = null; 680 public byte[] Params = null;
681 //public bool AssetInCache; 681 //public bool AssetInCache;
682 //public int TimeRequested; 682 //public int TimeRequested;
683 public int DiscardLevel = -1; 683 public int DiscardLevel = -1;
684 684
685 public AssetRequest() 685 public AssetRequest()
686 { 686 {
687 } 687 }
688 } 688 }
689 689
690 public class AssetInfo : AssetBase 690 public class AssetInfo : AssetBase
691 { 691 {
692 public AssetInfo() 692 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
36{ 36{
37 public abstract class AssetServerBase : IAssetServer 37 public abstract class AssetServerBase : IAssetServer
38 { 38 {
39 private static readonly ILog m_log 39 private static readonly ILog m_log
40 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 protected IAssetReceiver m_receiver; 42 protected IAssetReceiver m_receiver;
@@ -47,12 +47,12 @@ namespace OpenSim.Framework.Communications.Cache
47 47
48 // Temporarily hardcoded - should be a plugin 48 // Temporarily hardcoded - should be a plugin
49 protected IAssetLoader assetLoader = new AssetLoaderFileSystem(); 49 protected IAssetLoader assetLoader = new AssetLoaderFileSystem();
50 50
51 protected abstract void StoreAsset(AssetBase asset); 51 protected abstract void StoreAsset(AssetBase asset);
52 protected abstract void CommitAssets(); 52 protected abstract void CommitAssets();
53 53
54 /// <summary> 54 /// <summary>
55 /// This method must be implemented by a subclass to retrieve the asset named in the 55 /// This method must be implemented by a subclass to retrieve the asset named in the
56 /// AssetRequest. If the asset is not found, null should be returned. 56 /// AssetRequest. If the asset is not found, null should be returned.
57 /// </summary> 57 /// </summary>
58 /// <param name="req"></param> 58 /// <param name="req"></param>
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
60 protected abstract AssetBase GetAsset(AssetRequest req); 60 protected abstract AssetBase GetAsset(AssetRequest req);
61 61
62 /// <summary> 62 /// <summary>
63 /// Process an asset request. This method will call GetAsset(AssetRequest req) 63 /// Process an asset request. This method will call GetAsset(AssetRequest req)
64 /// on the subclass. 64 /// on the subclass.
65 /// </summary> 65 /// </summary>
66 /// <param name="req"></param> 66 /// <param name="req"></param>
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;
36namespace OpenSim.Framework.Communications.Cache 36namespace OpenSim.Framework.Communications.Cache
37{ 37{
38 internal delegate void AddItemDelegate(InventoryItemBase itemInfo); 38 internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
39 internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); 39 internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
40 internal delegate void DeleteItemDelegate(LLUUID itemID); 40 internal delegate void DeleteItemDelegate(LLUUID itemID);
41 41
42 internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); 42 internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID);
43 internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); 43 internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
44 internal delegate void PurgeFolderDelegate(LLUUID folderID); 44 internal delegate void PurgeFolderDelegate(LLUUID folderID);
45 internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); 45 internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID);
46 46
47 internal delegate void SendInventoryDescendentsDelegate( 47 internal delegate void SendInventoryDescendentsDelegate(
48 IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); 48 IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
49 49
50 /// <summary> 50 /// <summary>
51 /// Stores user profile and inventory data received from backend services for a particular user. 51 /// Stores user profile and inventory data received from backend services for a particular user.
52 /// </summary> 52 /// </summary>
53 public class CachedUserInfo 53 public class CachedUserInfo
54 { 54 {
55 private static readonly ILog m_log 55 private static readonly ILog m_log
56 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
58 /// <summary> 58 /// <summary>
59 /// The comms manager holds references to services (user, grid, inventory, etc.) 59 /// The comms manager holds references to services (user, grid, inventory, etc.)
60 /// </summary> 60 /// </summary>
61 private readonly CommunicationsManager m_commsManager; 61 private readonly CommunicationsManager m_commsManager;
62 62
63 public UserProfileData UserProfile { get { return m_userProfile; } } 63 public UserProfileData UserProfile { get { return m_userProfile; } }
64 private readonly UserProfileData m_userProfile; 64 private readonly UserProfileData m_userProfile;
65 65
66 /// <summary> 66 /// <summary>
67 /// Has we received the user's inventory from the inventory service? 67 /// Has we received the user's inventory from the inventory service?
68 /// </summary> 68 /// </summary>
69 private bool m_hasInventory; 69 private bool m_hasInventory;
70 70
71 /// <summary> 71 /// <summary>
72 /// Inventory requests waiting for receipt of this user's inventory from the inventory service. 72 /// Inventory requests waiting for receipt of this user's inventory from the inventory service.
73 /// </summary> 73 /// </summary>
74 private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>(); 74 private readonly IList<IInventoryRequest> m_pendingRequests = new List<IInventoryRequest>();
75 75
76 /// <summary> 76 /// <summary>
77 /// Has this user info object yet received its inventory information from the invetnroy service? 77 /// Has this user info object yet received its inventory information from the invetnroy service?
78 /// </summary> 78 /// </summary>
79 public bool HasInventory { get { return m_hasInventory; } } 79 public bool HasInventory { get { return m_hasInventory; } }
80 80
81 private InventoryFolderImpl m_rootFolder; 81 private InventoryFolderImpl m_rootFolder;
82 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } 82 public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
83 83
84 /// <summary> 84 /// <summary>
85 /// FIXME: This could be contained within a local variable - it doesn't need to be a field 85 /// FIXME: This could be contained within a local variable - it doesn't need to be a field
86 /// </summary> 86 /// </summary>
87 private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders 87 private IDictionary<LLUUID, IList<InventoryFolderImpl>> pendingCategorizationFolders
88 = new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); 88 = new Dictionary<LLUUID, IList<InventoryFolderImpl>>();
89 89
90 /// <summary> 90 /// <summary>
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Communications.Cache
97 m_commsManager = commsManager; 97 m_commsManager = commsManager;
98 m_userProfile = userProfile; 98 m_userProfile = userProfile;
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
102 /// This allows a request to be added to be processed once we receive a user's inventory 102 /// This allows a request to be added to be processed once we receive a user's inventory
103 /// from the inventory service. If we already have the inventory, the request 103 /// from the inventory service. If we already have the inventory, the request
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Communications.Cache
118 } 118 }
119 } 119 }
120 } 120 }
121 121
122 /// <summary> 122 /// <summary>
123 /// Store a folder pending arrival of its parent 123 /// Store a folder pending arrival of its parent
124 /// </summary> 124 /// </summary>
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications.Cache
126 private void AddPendingFolder(InventoryFolderImpl folder) 126 private void AddPendingFolder(InventoryFolderImpl folder)
127 { 127 {
128 LLUUID parentFolderId = folder.ParentID; 128 LLUUID parentFolderId = folder.ParentID;
129 129
130 if (pendingCategorizationFolders.ContainsKey(parentFolderId)) 130 if (pendingCategorizationFolders.ContainsKey(parentFolderId))
131 { 131 {
132 pendingCategorizationFolders[parentFolderId].Add(folder); 132 pendingCategorizationFolders[parentFolderId].Add(folder);
@@ -135,11 +135,11 @@ namespace OpenSim.Framework.Communications.Cache
135 { 135 {
136 IList<InventoryFolderImpl> folders = new List<InventoryFolderImpl>(); 136 IList<InventoryFolderImpl> folders = new List<InventoryFolderImpl>();
137 folders.Add(folder); 137 folders.Add(folder);
138 138
139 pendingCategorizationFolders[parentFolderId] = folders; 139 pendingCategorizationFolders[parentFolderId] = folders;
140 } 140 }
141 } 141 }
142 142
143 /// <summary> 143 /// <summary>
144 /// Add any pending folders which were received before the given folder 144 /// Add any pending folders which were received before the given folder
145 /// </summary> 145 /// </summary>
@@ -155,18 +155,18 @@ namespace OpenSim.Framework.Communications.Cache
155// m_log.DebugFormat( 155// m_log.DebugFormat(
156// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}", 156// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}",
157// folder.name, folder.folderID, parent.name, parent.folderID); 157// folder.name, folder.folderID, parent.name, parent.folderID);
158 158
159 lock (newFolder.SubFolders) 159 lock (newFolder.SubFolders)
160 { 160 {
161 if (!newFolder.SubFolders.ContainsKey(folder.ID)) 161 if (!newFolder.SubFolders.ContainsKey(folder.ID))
162 { 162 {
163 newFolder.SubFolders.Add(folder.ID, folder); 163 newFolder.SubFolders.Add(folder.ID, folder);
164 } 164 }
165 } 165 }
166 } 166 }
167 } 167 }
168 } 168 }
169 169
170 /// <summary> 170 /// <summary>
171 /// Callback invoked when the inventory is received from an async request to the inventory service 171 /// Callback invoked when the inventory is received from an async request to the inventory service
172 /// </summary> 172 /// </summary>
@@ -177,12 +177,12 @@ namespace OpenSim.Framework.Communications.Cache
177 // FIXME: Exceptions thrown upwards never appear on the console. Could fix further up if these 177 // FIXME: Exceptions thrown upwards never appear on the console. Could fix further up if these
178 // are simply being swallowed 178 // are simply being swallowed
179 try 179 try
180 { 180 {
181 foreach (InventoryFolderImpl folder in folders) 181 foreach (InventoryFolderImpl folder in folders)
182 { 182 {
183 FolderReceive(folder); 183 FolderReceive(folder);
184 } 184 }
185 185
186 foreach (InventoryItemBase item in items) 186 foreach (InventoryItemBase item in items)
187 { 187 {
188 ItemReceive(item); 188 ItemReceive(item);
@@ -191,15 +191,15 @@ namespace OpenSim.Framework.Communications.Cache
191 catch (Exception e) 191 catch (Exception e)
192 { 192 {
193 m_log.ErrorFormat("[INVENTORY CACHE]: Error processing inventory received from inventory service, {0}", e); 193 m_log.ErrorFormat("[INVENTORY CACHE]: Error processing inventory received from inventory service, {0}", e);
194 } 194 }
195 195
196 // Deal with pending requests 196 // Deal with pending requests
197 lock (m_pendingRequests) 197 lock (m_pendingRequests)
198 { 198 {
199 // We're going to change inventory status within the lock to avoid a race condition 199 // We're going to change inventory status within the lock to avoid a race condition
200 // where requests are processed after the AddRequest() method has been called. 200 // where requests are processed after the AddRequest() method has been called.
201 m_hasInventory = true; 201 m_hasInventory = true;
202 202
203 foreach (IInventoryRequest request in m_pendingRequests) 203 foreach (IInventoryRequest request in m_pendingRequests)
204 { 204 {
205 request.Execute(); 205 request.Execute();
@@ -215,7 +215,7 @@ namespace OpenSim.Framework.Communications.Cache
215 private void FolderReceive(InventoryFolderImpl newFolder) 215 private void FolderReceive(InventoryFolderImpl newFolder)
216 { 216 {
217// m_log.DebugFormat( 217// m_log.DebugFormat(
218// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", 218// "[INVENTORY CACHE]: Received folder {0} {1} for user {2}",
219// folderInfo.Name, folderInfo.ID, userID); 219// folderInfo.Name, folderInfo.ID, userID);
220 220
221 if (RootFolder == null) 221 if (RootFolder == null)
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Communications.Cache
232 else 232 else
233 { 233 {
234 InventoryFolderImpl parentFolder = RootFolder.FindFolder(newFolder.ParentID); 234 InventoryFolderImpl parentFolder = RootFolder.FindFolder(newFolder.ParentID);
235 235
236 if (parentFolder != null) 236 if (parentFolder != null)
237 { 237 {
238 lock (parentFolder.SubFolders) 238 lock (parentFolder.SubFolders)
@@ -252,44 +252,44 @@ namespace OpenSim.Framework.Communications.Cache
252 else 252 else
253 { 253 {
254 AddPendingFolder(newFolder); 254 AddPendingFolder(newFolder);
255 } 255 }
256 } 256 }
257 257
258 ResolvePendingFolders(newFolder); 258 ResolvePendingFolders(newFolder);
259 } 259 }
260 260
261 /// <summary> 261 /// <summary>
262 /// Callback invoked when an item is received from an async request to the inventory service. 262 /// Callback invoked when an item is received from an async request to the inventory service.
263 /// 263 ///
264 /// We're assuming here that items are always received after all the folders 264 /// We're assuming here that items are always received after all the folders
265 /// received. 265 /// received.
266 /// </summary> 266 /// </summary>
267 /// <param name="folderInfo"></param> 267 /// <param name="folderInfo"></param>
268 private void ItemReceive(InventoryItemBase itemInfo) 268 private void ItemReceive(InventoryItemBase itemInfo)
269 { 269 {
270// m_log.DebugFormat( 270// m_log.DebugFormat(
271// "[INVENTORY CACHE]: Received item {0} {1} for user {2}", 271// "[INVENTORY CACHE]: Received item {0} {1} for user {2}",
272// itemInfo.Name, itemInfo.ID, userID); 272// itemInfo.Name, itemInfo.ID, userID);
273 InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder); 273 InventoryFolderImpl folder = RootFolder.FindFolder(itemInfo.Folder);
274 274
275 if (null == folder) 275 if (null == folder)
276 { 276 {
277 m_log.WarnFormat( 277 m_log.WarnFormat(
278 "Received item {0} {1} but its folder {2} does not exist", 278 "Received item {0} {1} but its folder {2} does not exist",
279 itemInfo.Name, itemInfo.ID, itemInfo.Folder); 279 itemInfo.Name, itemInfo.ID, itemInfo.Folder);
280 280
281 return; 281 return;
282 } 282 }
283 283
284 lock (folder.Items) 284 lock (folder.Items)
285 { 285 {
286 folder.Items[itemInfo.ID] = itemInfo; 286 folder.Items[itemInfo.ID] = itemInfo;
287 } 287 }
288 } 288 }
289 289
290 /// <summary> 290 /// <summary>
291 /// Create a folder in this agent's inventory. 291 /// Create a folder in this agent's inventory.
292 /// 292 ///
293 /// If the inventory service has not yet delievered the inventory 293 /// If the inventory service has not yet delievered the inventory
294 /// for this user then the request will be queued. 294 /// for this user then the request will be queued.
295 /// </summary> 295 /// </summary>
@@ -299,20 +299,20 @@ namespace OpenSim.Framework.Communications.Cache
299 { 299 {
300// m_log.DebugFormat( 300// m_log.DebugFormat(
301// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); 301// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
302 302
303 if (HasInventory) 303 if (HasInventory)
304 { 304 {
305 InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID); 305 InventoryFolderImpl parentFolder = RootFolder.FindFolder(parentID);
306 306
307 if (null == parentFolder) 307 if (null == parentFolder)
308 { 308 {
309 m_log.WarnFormat( 309 m_log.WarnFormat(
310 "[AGENT INVENTORY]: Tried to create folder {0} {1} but the parent {2} does not exist", 310 "[AGENT INVENTORY]: Tried to create folder {0} {1} but the parent {2} does not exist",
311 folderName, folderID, parentID); 311 folderName, folderID, parentID);
312 312
313 return false; 313 return false;
314 } 314 }
315 315
316 InventoryFolderImpl createdFolder = parentFolder.CreateChildFolder(folderID, folderName, folderType); 316 InventoryFolderImpl createdFolder = parentFolder.CreateChildFolder(folderID, folderName, folderType);
317 317
318 if (createdFolder != null) 318 if (createdFolder != null)
@@ -324,17 +324,17 @@ namespace OpenSim.Framework.Communications.Cache
324 createdBaseFolder.ParentID = createdFolder.ParentID; 324 createdBaseFolder.ParentID = createdFolder.ParentID;
325 createdBaseFolder.Type = createdFolder.Type; 325 createdBaseFolder.Type = createdFolder.Type;
326 createdBaseFolder.Version = createdFolder.Version; 326 createdBaseFolder.Version = createdFolder.Version;
327 327
328 m_commsManager.InventoryService.AddFolder(createdBaseFolder); 328 m_commsManager.InventoryService.AddFolder(createdBaseFolder);
329 329
330 return true; 330 return true;
331 } 331 }
332 else 332 else
333 { 333 {
334 m_log.WarnFormat( 334 m_log.WarnFormat(
335 "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists", 335 "[AGENT INVENTORY]: Tried to create folder {0} {1} but the folder already exists",
336 folderName, folderID); 336 folderName, folderID);
337 337
338 return false; 338 return false;
339 } 339 }
340 } 340 }
@@ -344,22 +344,22 @@ namespace OpenSim.Framework.Communications.Cache
344 new InventoryRequest( 344 new InventoryRequest(
345 Delegate.CreateDelegate(typeof(CreateFolderDelegate), this, "CreateFolder"), 345 Delegate.CreateDelegate(typeof(CreateFolderDelegate), this, "CreateFolder"),
346 new object[] { folderName, folderID, folderType, parentID })); 346 new object[] { folderName, folderID, folderType, parentID }));
347 347
348 return true; 348 return true;
349 } 349 }
350 } 350 }
351 351
352 /// <summary> 352 /// <summary>
353 /// Handle a client request to update the inventory folder 353 /// Handle a client request to update the inventory folder
354 /// 354 ///
355 /// If the inventory service has not yet delievered the inventory 355 /// If the inventory service has not yet delievered the inventory
356 /// for this user then the request will be queued. 356 /// for this user then the request will be queued.
357 /// 357 ///
358 /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE 358 /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
359 /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, 359 /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
360 /// and needs to be changed. 360 /// and needs to be changed.
361 /// </summary> 361 /// </summary>
362 /// 362 ///
363 /// <param name="folderID"></param> 363 /// <param name="folderID"></param>
364 /// <param name="type"></param> 364 /// <param name="type"></param>
365 /// <param name="name"></param> 365 /// <param name="name"></param>
@@ -367,7 +367,7 @@ namespace OpenSim.Framework.Communications.Cache
367 public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) 367 public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID)
368 { 368 {
369// m_log.DebugFormat( 369// m_log.DebugFormat(
370// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 370// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
371 371
372 if (HasInventory) 372 if (HasInventory)
373 { 373 {
@@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Cache
378 baseFolder.ParentID = parentID; 378 baseFolder.ParentID = parentID;
379 baseFolder.Type = (short) type; 379 baseFolder.Type = (short) type;
380 baseFolder.Version = RootFolder.Version; 380 baseFolder.Version = RootFolder.Version;
381 381
382 m_commsManager.InventoryService.AddFolder(baseFolder); 382 m_commsManager.InventoryService.AddFolder(baseFolder);
383 } 383 }
384 else 384 else
@@ -387,18 +387,18 @@ namespace OpenSim.Framework.Communications.Cache
387 new InventoryRequest( 387 new InventoryRequest(
388 Delegate.CreateDelegate(typeof(UpdateFolderDelegate), this, "UpdateFolder"), 388 Delegate.CreateDelegate(typeof(UpdateFolderDelegate), this, "UpdateFolder"),
389 new object[] { name, folderID, type, parentID })); 389 new object[] { name, folderID, type, parentID }));
390 } 390 }
391 391
392 return true; 392 return true;
393 } 393 }
394 394
395 /// <summary> 395 /// <summary>
396 /// Handle an inventory folder move request from the client. 396 /// Handle an inventory folder move request from the client.
397 /// 397 ///
398 /// If the inventory service has not yet delievered the inventory 398 /// If the inventory service has not yet delievered the inventory
399 /// for this user then the request will be queued. 399 /// for this user then the request will be queued.
400 /// </summary> 400 /// </summary>
401 /// 401 ///
402 /// <param name="folderID"></param> 402 /// <param name="folderID"></param>
403 /// <param name="parentID"></param> 403 /// <param name="parentID"></param>
404 public bool MoveFolder(LLUUID folderID, LLUUID parentID) 404 public bool MoveFolder(LLUUID folderID, LLUUID parentID)
@@ -413,9 +413,9 @@ namespace OpenSim.Framework.Communications.Cache
413 baseFolder.Owner = m_userProfile.ID; 413 baseFolder.Owner = m_userProfile.ID;
414 baseFolder.ID = folderID; 414 baseFolder.ID = folderID;
415 baseFolder.ParentID = parentID; 415 baseFolder.ParentID = parentID;
416 416
417 m_commsManager.InventoryService.MoveFolder(baseFolder); 417 m_commsManager.InventoryService.MoveFolder(baseFolder);
418 418
419 return true; 419 return true;
420 } 420 }
421 else 421 else
@@ -424,30 +424,30 @@ namespace OpenSim.Framework.Communications.Cache
424 new InventoryRequest( 424 new InventoryRequest(
425 Delegate.CreateDelegate(typeof(MoveFolderDelegate), this, "MoveFolder"), 425 Delegate.CreateDelegate(typeof(MoveFolderDelegate), this, "MoveFolder"),
426 new object[] { folderID, parentID })); 426 new object[] { folderID, parentID }));
427 427
428 return true; 428 return true;
429 } 429 }
430 } 430 }
431 431
432 /// <summary> 432 /// <summary>
433 /// This method will delete all the items and folders in the given folder. 433 /// This method will delete all the items and folders in the given folder.
434 /// 434 ///
435 /// If the inventory service has not yet delievered the inventory 435 /// If the inventory service has not yet delievered the inventory
436 /// for this user then the request will be queued. 436 /// for this user then the request will be queued.
437 /// </summary> 437 /// </summary>
438 /// 438 ///
439 /// <param name="folderID"></param> 439 /// <param name="folderID"></param>
440 public bool PurgeFolder(LLUUID folderID) 440 public bool PurgeFolder(LLUUID folderID)
441 { 441 {
442// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", 442// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
443// folderID, remoteClient.Name, remoteClient.AgentId); 443// folderID, remoteClient.Name, remoteClient.AgentId);
444 444
445 if (HasInventory) 445 if (HasInventory)
446 { 446 {
447 InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID); 447 InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID);
448 448
449 if (purgedFolder != null) 449 if (purgedFolder != null)
450 { 450 {
451 // XXX Nasty - have to create a new object to hold details we already have 451 // XXX Nasty - have to create a new object to hold details we already have
452 InventoryFolderBase purgedBaseFolder = new InventoryFolderBase(); 452 InventoryFolderBase purgedBaseFolder = new InventoryFolderBase();
453 purgedBaseFolder.Owner = purgedFolder.Owner; 453 purgedBaseFolder.Owner = purgedFolder.Owner;
@@ -455,12 +455,12 @@ namespace OpenSim.Framework.Communications.Cache
455 purgedBaseFolder.Name = purgedFolder.Name; 455 purgedBaseFolder.Name = purgedFolder.Name;
456 purgedBaseFolder.ParentID = purgedFolder.ParentID; 456 purgedBaseFolder.ParentID = purgedFolder.ParentID;
457 purgedBaseFolder.Type = purgedFolder.Type; 457 purgedBaseFolder.Type = purgedFolder.Type;
458 purgedBaseFolder.Version = purgedFolder.Version; 458 purgedBaseFolder.Version = purgedFolder.Version;
459 459
460 m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder); 460 m_commsManager.InventoryService.PurgeFolder(purgedBaseFolder);
461 461
462 purgedFolder.Purge(); 462 purgedFolder.Purge();
463 463
464 return true; 464 return true;
465 } 465 }
466 } 466 }
@@ -470,12 +470,12 @@ namespace OpenSim.Framework.Communications.Cache
470 new InventoryRequest( 470 new InventoryRequest(
471 Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"), 471 Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"),
472 new object[] { folderID })); 472 new object[] { folderID }));
473 473
474 return true; 474 return true;
475 } 475 }
476 476
477 return false; 477 return false;
478 } 478 }
479 479
480 /// <summary> 480 /// <summary>
481 /// Add an item to the user's inventory 481 /// Add an item to the user's inventory
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications.Cache
494 new InventoryRequest( 494 new InventoryRequest(
495 Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"), 495 Delegate.CreateDelegate(typeof(AddItemDelegate), this, "AddItem"),
496 new object[] { item })); 496 new object[] { item }));
497 } 497 }
498 } 498 }
499 499
500 /// <summary> 500 /// <summary>
@@ -514,18 +514,18 @@ namespace OpenSim.Framework.Communications.Cache
514 new InventoryRequest( 514 new InventoryRequest(
515 Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"), 515 Delegate.CreateDelegate(typeof(UpdateItemDelegate), this, "UpdateItem"),
516 new object[] { item })); 516 new object[] { item }));
517 } 517 }
518 } 518 }
519 519
520 /// <summary> 520 /// <summary>
521 /// Delete an item from the user's inventory 521 /// Delete an item from the user's inventory
522 /// 522 ///
523 /// If the inventory service has not yet delievered the inventory 523 /// If the inventory service has not yet delievered the inventory
524 /// for this user then the request will be queued. 524 /// for this user then the request will be queued.
525 /// </summary> 525 /// </summary>
526 /// <param name="itemID"></param> 526 /// <param name="itemID"></param>
527 /// <returns> 527 /// <returns>
528 /// true on a successful delete or a if the request is queued. 528 /// true on a successful delete or a if the request is queued.
529 /// Returns false on an immediate failure 529 /// Returns false on an immediate failure
530 /// </returns> 530 /// </returns>
531 public bool DeleteItem(LLUUID itemID) 531 public bool DeleteItem(LLUUID itemID)
@@ -535,14 +535,14 @@ namespace OpenSim.Framework.Communications.Cache
535 // XXX For historical reasons (grid comms), we need to retrieve the whole item in order to delete, even though 535 // XXX For historical reasons (grid comms), we need to retrieve the whole item in order to delete, even though
536 // really only the item id is required. 536 // really only the item id is required.
537 InventoryItemBase item = RootFolder.FindItem(itemID); 537 InventoryItemBase item = RootFolder.FindItem(itemID);
538 538
539 if (null == item) 539 if (null == item)
540 { 540 {
541 m_log.WarnFormat("[AGENT INVENTORY]: Tried to delete item {0} which does not exist", itemID); 541 m_log.WarnFormat("[AGENT INVENTORY]: Tried to delete item {0} which does not exist", itemID);
542 542
543 return false; 543 return false;
544 } 544 }
545 545
546 if (RootFolder.DeleteItem(item.ID)) 546 if (RootFolder.DeleteItem(item.ID))
547 { 547 {
548 return m_commsManager.InventoryService.DeleteItem(item); 548 return m_commsManager.InventoryService.DeleteItem(item);
@@ -554,13 +554,13 @@ namespace OpenSim.Framework.Communications.Cache
554 new InventoryRequest( 554 new InventoryRequest(
555 Delegate.CreateDelegate(typeof(DeleteItemDelegate), this, "DeleteItem"), 555 Delegate.CreateDelegate(typeof(DeleteItemDelegate), this, "DeleteItem"),
556 new object[] { itemID })); 556 new object[] { itemID }));
557 557
558 return true; 558 return true;
559 } 559 }
560 560
561 return false; 561 return false;
562 } 562 }
563 563
564 /// <summary> 564 /// <summary>
565 /// Send details of the inventory items and/or folders in a given folder to the client. 565 /// Send details of the inventory items and/or folders in a given folder to the client.
566 /// </summary> 566 /// </summary>
@@ -574,13 +574,13 @@ namespace OpenSim.Framework.Communications.Cache
574 if (HasInventory) 574 if (HasInventory)
575 { 575 {
576 InventoryFolderImpl folder; 576 InventoryFolderImpl folder;
577 577
578 if ((folder = RootFolder.FindFolder(folderID)) != null) 578 if ((folder = RootFolder.FindFolder(folderID)) != null)
579 { 579 {
580// m_log.DebugFormat( 580// m_log.DebugFormat(
581// "[AGENT INVENTORY]: Found folder {0} for client {1}", 581// "[AGENT INVENTORY]: Found folder {0} for client {1}",
582// folderID, remoteClient.AgentId); 582// folderID, remoteClient.AgentId);
583 583
584 client.SendInventoryFolderDetails( 584 client.SendInventoryFolderDetails(
585 client.AgentId, folderID, folder.RequestListOfItems(), 585 client.AgentId, folderID, folder.RequestListOfItems(),
586 folder.RequestListOfFolders(), fetchFolders, fetchItems); 586 folder.RequestListOfFolders(), fetchFolders, fetchItems);
@@ -592,7 +592,7 @@ namespace OpenSim.Framework.Communications.Cache
592 m_log.WarnFormat( 592 m_log.WarnFormat(
593 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}", 593 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1} {2}",
594 folderID, client.Name, client.AgentId); 594 folderID, client.Name, client.AgentId);
595 595
596 return false; 596 return false;
597 } 597 }
598 } 598 }
@@ -604,13 +604,13 @@ namespace OpenSim.Framework.Communications.Cache
604 new object[] { client, folderID, fetchFolders, fetchItems })); 604 new object[] { client, folderID, fetchFolders, fetchItems }));
605 605
606 return true; 606 return true;
607 } 607 }
608 } 608 }
609 } 609 }
610 610
611 /// <summary> 611 /// <summary>
612 /// Should be implemented by callers which require a callback when the user's inventory is received 612 /// Should be implemented by callers which require a callback when the user's inventory is received
613 /// </summary> 613 /// </summary>
614 public interface IInventoryRequest 614 public interface IInventoryRequest
615 { 615 {
616 /// <summary> 616 /// <summary>
@@ -618,7 +618,7 @@ namespace OpenSim.Framework.Communications.Cache
618 /// </summary> 618 /// </summary>
619 void Execute(); 619 void Execute();
620 } 620 }
621 621
622 /// <summary> 622 /// <summary>
623 /// Generic inventory request 623 /// Generic inventory request
624 /// </summary> 624 /// </summary>
@@ -626,16 +626,16 @@ namespace OpenSim.Framework.Communications.Cache
626 { 626 {
627 private Delegate m_delegate; 627 private Delegate m_delegate;
628 private Object[] m_args; 628 private Object[] m_args;
629 629
630 internal InventoryRequest(Delegate delegat, Object[] args) 630 internal InventoryRequest(Delegate delegat, Object[] args)
631 { 631 {
632 m_delegate = delegat; 632 m_delegate = delegat;
633 m_args = args; 633 m_args = args;
634 } 634 }
635 635
636 public void Execute() 636 public void Execute()
637 { 637 {
638 m_delegate.DynamicInvoke(m_args); 638 m_delegate.DynamicInvoke(m_args);
639 } 639 }
640 } 640 }
641} 641}
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
95 // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); 95 // XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
96 // xs.Serialize(s, asset); 96 // xs.Serialize(s, asset);
97 // RestClient rc = new RestClient(_assetServerUrl); 97 // RestClient rc = new RestClient(_assetServerUrl);
98 98
99 string assetUrl = _assetServerUrl + "/assets/"; 99 string assetUrl = _assetServerUrl + "/assets/";
100 100
101 //rc.AddResourcePath("assets"); 101 //rc.AddResourcePath("assets");
102 102
103 // rc.RequestMethod = "POST"; 103 // rc.RequestMethod = "POST";
@@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications.Cache
105 //m_log.InfoFormat("[ASSET]: Stored {0}", rc); 105 //m_log.InfoFormat("[ASSET]: Stored {0}", rc);
106 106
107 m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID); 107 m_log.InfoFormat("[GRID ASSET CLIENT]: Sending store request for asset {0}", asset.FullID);
108 108
109 RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset); 109 RestObjectPoster.BeginPostObject<AssetBase>(assetUrl, asset);
110 } 110 }
111 catch (Exception e) 111 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
36 public class InventoryFolderImpl : InventoryFolderBase 36 public class InventoryFolderImpl : InventoryFolderBase
37 { 37 {
38 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 38 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
39 39
40 // Fields 40 // Fields
41 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); 41 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
42 public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); 42 public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>();
@@ -82,14 +82,14 @@ namespace OpenSim.Framework.Communications.Cache
82 subFold.ParentID = this.ID; 82 subFold.ParentID = this.ID;
83 subFold.Owner = Owner; 83 subFold.Owner = Owner;
84 SubFolders.Add(subFold.ID, subFold); 84 SubFolders.Add(subFold.ID, subFold);
85 85
86 return subFold; 86 return subFold;
87 } 87 }
88 } 88 }
89 89
90 return null; 90 return null;
91 } 91 }
92 92
93 /// <summary> 93 /// <summary>
94 /// Delete all the folders and items in this folder. 94 /// Delete all the folders and items in this folder.
95 /// </summary> 95 /// </summary>
@@ -97,9 +97,9 @@ namespace OpenSim.Framework.Communications.Cache
97 { 97 {
98 foreach (InventoryFolderImpl folder in SubFolders.Values) 98 foreach (InventoryFolderImpl folder in SubFolders.Values)
99 { 99 {
100 folder.Purge(); 100 folder.Purge();
101 } 101 }
102 102
103 SubFolders.Clear(); 103 SubFolders.Clear();
104 Items.Clear(); 104 Items.Clear();
105 } 105 }
@@ -118,20 +118,20 @@ namespace OpenSim.Framework.Communications.Cache
118 return Items[itemID]; 118 return Items[itemID];
119 } 119 }
120 } 120 }
121 121
122 lock (SubFolders) 122 lock (SubFolders)
123 { 123 {
124 foreach (InventoryFolderImpl folder in SubFolders.Values) 124 foreach (InventoryFolderImpl folder in SubFolders.Values)
125 { 125 {
126 InventoryItemBase item = folder.FindItem(itemID); 126 InventoryItemBase item = folder.FindItem(itemID);
127 127
128 if (item != null) 128 if (item != null)
129 { 129 {
130 return item; 130 return item;
131 } 131 }
132 } 132 }
133 } 133 }
134 134
135 return null; 135 return null;
136 } 136 }
137 137
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache
143 public bool DeleteItem(LLUUID itemID) 143 public bool DeleteItem(LLUUID itemID)
144 { 144 {
145 bool found = false; 145 bool found = false;
146 146
147 lock (Items) 147 lock (Items)
148 { 148 {
149 if (Items.ContainsKey(itemID)) 149 if (Items.ContainsKey(itemID))
@@ -152,20 +152,20 @@ namespace OpenSim.Framework.Communications.Cache
152 return true; 152 return true;
153 } 153 }
154 } 154 }
155 155
156 lock (SubFolders) 156 lock (SubFolders)
157 { 157 {
158 foreach (InventoryFolderImpl folder in SubFolders.Values) 158 foreach (InventoryFolderImpl folder in SubFolders.Values)
159 { 159 {
160 found = folder.DeleteItem(itemID); 160 found = folder.DeleteItem(itemID);
161 161
162 if (found == true) 162 if (found == true)
163 { 163 {
164 break; 164 break;
165 } 165 }
166 } 166 }
167 } 167 }
168 168
169 return found; 169 return found;
170 } 170 }
171 171
@@ -175,25 +175,25 @@ namespace OpenSim.Framework.Communications.Cache
175 /// </summary> 175 /// </summary>
176 /// <returns>The requested folder if it exists, null if it does not.</returns> 176 /// <returns>The requested folder if it exists, null if it does not.</returns>
177 public InventoryFolderImpl FindFolder(LLUUID folderID) 177 public InventoryFolderImpl FindFolder(LLUUID folderID)
178 { 178 {
179 if (folderID == ID) 179 if (folderID == ID)
180 { 180 {
181 return this; 181 return this;
182 } 182 }
183 183
184 lock (SubFolders) 184 lock (SubFolders)
185 { 185 {
186 foreach (InventoryFolderImpl folder in SubFolders.Values) 186 foreach (InventoryFolderImpl folder in SubFolders.Values)
187 { 187 {
188 InventoryFolderImpl returnFolder = folder.FindFolder(folderID); 188 InventoryFolderImpl returnFolder = folder.FindFolder(folderID);
189 189
190 if (returnFolder != null) 190 if (returnFolder != null)
191 { 191 {
192 return returnFolder; 192 return returnFolder;
193 } 193 }
194 } 194 }
195 } 195 }
196 196
197 return null; 197 return null;
198 } 198 }
199 199
@@ -203,7 +203,7 @@ namespace OpenSim.Framework.Communications.Cache
203 public List<InventoryItemBase> RequestListOfItems() 203 public List<InventoryItemBase> RequestListOfItems()
204 { 204 {
205 List<InventoryItemBase> itemList = new List<InventoryItemBase>(); 205 List<InventoryItemBase> itemList = new List<InventoryItemBase>();
206 206
207 lock (Items) 207 lock (Items)
208 { 208 {
209 foreach (InventoryItemBase item in Items.Values) 209 foreach (InventoryItemBase item in Items.Values)
@@ -211,9 +211,9 @@ namespace OpenSim.Framework.Communications.Cache
211 itemList.Add(item); 211 itemList.Add(item);
212 } 212 }
213 } 213 }
214 214
215 //m_log.DebugFormat("[INVENTORY FOLDER IMPL]: Found {0} items", itemList.Count); 215 //m_log.DebugFormat("[INVENTORY FOLDER IMPL]: Found {0} items", itemList.Count);
216 216
217 return itemList; 217 return itemList;
218 } 218 }
219 219
@@ -221,9 +221,9 @@ namespace OpenSim.Framework.Communications.Cache
221 /// Return the list of immediate child folders in this folder. 221 /// Return the list of immediate child folders in this folder.
222 /// </summary> 222 /// </summary>
223 public List<InventoryFolderBase> RequestListOfFolders() 223 public List<InventoryFolderBase> RequestListOfFolders()
224 { 224 {
225 List<InventoryFolderBase> folderList = new List<InventoryFolderBase>(); 225 List<InventoryFolderBase> folderList = new List<InventoryFolderBase>();
226 226
227 lock (SubFolders) 227 lock (SubFolders)
228 { 228 {
229 foreach (InventoryFolderBase folder in SubFolders.Values) 229 foreach (InventoryFolderBase folder in SubFolders.Values)
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache
231 folderList.Add(folder); 231 folderList.Add(folder);
232 } 232 }
233 } 233 }
234 234
235 return folderList; 235 return folderList;
236 } 236 }
237 } 237 }
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
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); 47 private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000");
48 48
49 /// <summary> 49 /// <summary>
50 /// Holds the root library folder and all its descendents. This is really only used during inventory 50 /// Holds the root library folder and all its descendents. This is really only used during inventory
51 /// setup so that we don't have to repeatedly search the tree of library folders. 51 /// setup so that we don't have to repeatedly search the tree of library folders.
52 /// </summary> 52 /// </summary>
53 protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders 53 protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders
54 = new Dictionary<LLUUID, InventoryFolderImpl>(); 54 = new Dictionary<LLUUID, InventoryFolderImpl>();
55 55
56 public LibraryRootFolder() 56 public LibraryRootFolder()
57 { 57 {
58 m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); 58 m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
59 59
60 Owner = libOwner; 60 Owner = libOwner;
61 ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); 61 ID = new LLUUID("00000112-000f-0000-0000-000100bba000");
62 Name = "OpenSim Library"; 62 Name = "OpenSim Library";
63 ParentID = LLUUID.Zero; 63 ParentID = LLUUID.Zero;
64 Type = (short) 8; 64 Type = (short) 8;
65 Version = (ushort) 1; 65 Version = (ushort) 1;
66 66
67 libraryFolders.Add(ID, this); 67 libraryFolders.Add(ID, this);
68 68
69 LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); 69 LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml"));
70 70
71 // CreateLibraryItems(); 71 // CreateLibraryItems();
72 } 72 }
73 73
74 /// <summary> 74 /// <summary>
75 /// Hardcoded item creation. Please don't add any more items here - future items should be created 75 /// Hardcoded item creation. Please don't add any more items here - future items should be created
76 /// in the xml in the bin/inventory folder. 76 /// in the xml in the bin/inventory folder.
77 /// </summary> 77 /// </summary>
78 /// 78 ///
@@ -132,7 +132,7 @@ namespace OpenSim.Framework.Communications.Cache
132 item.NextPermissions = 0x7FFFFFFF; 132 item.NextPermissions = 0x7FFFFFFF;
133 return item; 133 return item;
134 } 134 }
135 135
136 /// <summary> 136 /// <summary>
137 /// Use the asset set information at path to load assets 137 /// Use the asset set information at path to load assets
138 /// </summary> 138 /// </summary>
@@ -142,49 +142,49 @@ namespace OpenSim.Framework.Communications.Cache
142 { 142 {
143 m_log.InfoFormat( 143 m_log.InfoFormat(
144 "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath); 144 "[LIBRARY INVENTORY]: Loading libraries control file {0}", librariesControlPath);
145 145
146 LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); 146 LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig);
147 } 147 }
148 148
149 /// <summary> 149 /// <summary>
150 /// Read a library set from config 150 /// Read a library set from config
151 /// </summary> 151 /// </summary>
152 /// <param name="config"></param> 152 /// <param name="config"></param>
153 protected void ReadLibraryFromConfig(IConfig config) 153 protected void ReadLibraryFromConfig(IConfig config)
154 { 154 {
155 string foldersPath 155 string foldersPath
156 = Path.Combine( 156 = Path.Combine(
157 Util.inventoryDir(), config.GetString("foldersFile", String.Empty)); 157 Util.inventoryDir(), config.GetString("foldersFile", String.Empty));
158 158
159 LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig); 159 LoadFromFile(foldersPath, "Library folders", ReadFolderFromConfig);
160 160
161 string itemsPath 161 string itemsPath
162 = Path.Combine( 162 = Path.Combine(
163 Util.inventoryDir(), config.GetString("itemsFile", String.Empty)); 163 Util.inventoryDir(), config.GetString("itemsFile", String.Empty));
164 164
165 LoadFromFile(itemsPath, "Library items", ReadItemFromConfig); 165 LoadFromFile(itemsPath, "Library items", ReadItemFromConfig);
166 } 166 }
167 167
168 /// <summary> 168 /// <summary>
169 /// Read a library inventory folder from a loaded configuration 169 /// Read a library inventory folder from a loaded configuration
170 /// </summary> 170 /// </summary>
171 /// <param name="source"></param> 171 /// <param name="source"></param>
172 private void ReadFolderFromConfig(IConfig config) 172 private void ReadFolderFromConfig(IConfig config)
173 { 173 {
174 InventoryFolderImpl folderInfo = new InventoryFolderImpl(); 174 InventoryFolderImpl folderInfo = new InventoryFolderImpl();
175 175
176 folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); 176 folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString()));
177 folderInfo.Name = config.GetString("name", "unknown"); 177 folderInfo.Name = config.GetString("name", "unknown");
178 folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); 178 folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString()));
179 folderInfo.Type = (short)config.GetInt("type", 8); 179 folderInfo.Type = (short)config.GetInt("type", 8);
180 180
181 folderInfo.Owner = libOwner; 181 folderInfo.Owner = libOwner;
182 folderInfo.Version = 1; 182 folderInfo.Version = 1;
183 183
184 if (libraryFolders.ContainsKey(folderInfo.ParentID)) 184 if (libraryFolders.ContainsKey(folderInfo.ParentID))
185 { 185 {
186 InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID]; 186 InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID];
187 187
188 libraryFolders.Add(folderInfo.ID, folderInfo); 188 libraryFolders.Add(folderInfo.ID, folderInfo);
189 parentFolder.SubFolders.Add(folderInfo.ID, folderInfo); 189 parentFolder.SubFolders.Add(folderInfo.ID, folderInfo);
190 190
@@ -201,7 +201,7 @@ namespace OpenSim.Framework.Communications.Cache
201 /// <summary> 201 /// <summary>
202 /// Read a library inventory item metadata from a loaded configuration 202 /// Read a library inventory item metadata from a loaded configuration
203 /// </summary> 203 /// </summary>
204 /// <param name="source"></param> 204 /// <param name="source"></param>
205 private void ReadItemFromConfig(IConfig config) 205 private void ReadItemFromConfig(IConfig config)
206 { 206 {
207 InventoryItemBase item = new InventoryItemBase(); 207 InventoryItemBase item = new InventoryItemBase();
@@ -218,11 +218,11 @@ namespace OpenSim.Framework.Communications.Cache
218 item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF); 218 item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF);
219 item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF); 219 item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF);
220 item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF); 220 item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF);
221 221
222 if (libraryFolders.ContainsKey(item.Folder)) 222 if (libraryFolders.ContainsKey(item.Folder))
223 { 223 {
224 InventoryFolderImpl parentFolder = libraryFolders[item.Folder]; 224 InventoryFolderImpl parentFolder = libraryFolders[item.Folder];
225 225
226 parentFolder.Items.Add(item.ID, item); 226 parentFolder.Items.Add(item.ID, item);
227 } 227 }
228 else 228 else
@@ -230,11 +230,11 @@ namespace OpenSim.Framework.Communications.Cache
230 m_log.WarnFormat( 230 m_log.WarnFormat(
231 "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", 231 "[LIBRARY INVENTORY]: Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!",
232 item.Name, item.ID, item.Folder); 232 item.Name, item.ID, item.Folder);
233 } 233 }
234 } 234 }
235 235
236 private delegate void ConfigAction(IConfig config); 236 private delegate void ConfigAction(IConfig config);
237 237
238 /// <summary> 238 /// <summary>
239 /// Load the given configuration at a path and perform an action on each Config contained within it 239 /// Load the given configuration at a path and perform an action on each Config contained within it
240 /// </summary> 240 /// </summary>
@@ -242,7 +242,7 @@ namespace OpenSim.Framework.Communications.Cache
242 /// <param name="fileDescription"></param> 242 /// <param name="fileDescription"></param>
243 /// <param name="action"></param> 243 /// <param name="action"></param>
244 private static void LoadFromFile(string path, string fileDescription, ConfigAction action) 244 private static void LoadFromFile(string path, string fileDescription, ConfigAction action)
245 { 245 {
246 if (File.Exists(path)) 246 if (File.Exists(path))
247 { 247 {
248 try 248 try
@@ -250,21 +250,21 @@ namespace OpenSim.Framework.Communications.Cache
250 XmlConfigSource source = new XmlConfigSource(path); 250 XmlConfigSource source = new XmlConfigSource(path);
251 251
252 for (int i = 0; i < source.Configs.Count; i++) 252 for (int i = 0; i < source.Configs.Count; i++)
253 { 253 {
254 action(source.Configs[i]); 254 action(source.Configs[i]);
255 } 255 }
256 } 256 }
257 catch (XmlException e) 257 catch (XmlException e)
258 { 258 {
259 m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e); 259 m_log.ErrorFormat("[LIBRARY INVENTORY]: Error loading {0} : {1}", path, e);
260 } 260 }
261 } 261 }
262 else 262 else
263 { 263 {
264 m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path); 264 m_log.ErrorFormat("[LIBRARY INVENTORY]: {0} file {1} does not exist!", fileDescription, path);
265 } 265 }
266 } 266 }
267 267
268 /// <summary> 268 /// <summary>
269 /// Looks like a simple getter, but is written like this for some consistency with the other Request 269 /// Looks like a simple getter, but is written like this for some consistency with the other Request
270 /// methods in the superclass 270 /// 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;
33using log4net; 33using log4net;
34 34
35namespace OpenSim.Framework.Communications.Cache 35namespace OpenSim.Framework.Communications.Cache
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Holds user profile information and retrieves it from backend services. 38 /// Holds user profile information and retrieves it from backend services.
39 /// </summary> 39 /// </summary>
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache
45 /// The comms manager holds references to services (user, grid, inventory, etc.) 45 /// The comms manager holds references to services (user, grid, inventory, etc.)
46 /// </summary> 46 /// </summary>
47 private readonly CommunicationsManager m_commsManager; 47 private readonly CommunicationsManager m_commsManager;
48 48
49 /// <summary> 49 /// <summary>
50 /// Each user has a cached profile. 50 /// Each user has a cached profile.
51 /// </summary> 51 /// </summary>
@@ -84,8 +84,8 @@ namespace OpenSim.Framework.Communications.Cache
84 } 84 }
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 /// <summary> 89 /// <summary>
90 /// Remove this user's profile cache. 90 /// Remove this user's profile cache.
91 /// </summary> 91 /// </summary>
@@ -103,9 +103,9 @@ namespace OpenSim.Framework.Communications.Cache
103 else 103 else
104 { 104 {
105 m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID); 105 m_log.ErrorFormat("[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userID);
106 } 106 }
107 } 107 }
108 108
109 return false; 109 return false;
110 } 110 }
111 111
@@ -118,14 +118,14 @@ namespace OpenSim.Framework.Communications.Cache
118 { 118 {
119 CachedUserInfo userInfo = GetUserDetails(userID); 119 CachedUserInfo userInfo = GetUserDetails(userID);
120 if (userInfo != null) 120 if (userInfo != null)
121 { 121 {
122 m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive); 122 m_commsManager.InventoryService.RequestInventoryForUser(userID, userInfo.InventoryReceive);
123 } 123 }
124 else 124 else
125 { 125 {
126 m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID); 126 m_log.ErrorFormat("[USER CACHE]: RequestInventoryForUser() - user profile for user {0} not found", userID);
127 } 127 }
128 } 128 }
129 129
130 /// <summary> 130 /// <summary>
131 /// Get the details of the given user. A caller should try this method first if it isn't sure that 131 /// 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
151 /// <param name="parentID"></param> 151 /// <param name="parentID"></param>
152 public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, 152 public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType,
153 string folderName, LLUUID parentID) 153 string folderName, LLUUID parentID)
154 { 154 {
155 CachedUserInfo userProfile; 155 CachedUserInfo userProfile;
156 156
157 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 157 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -159,21 +159,21 @@ namespace OpenSim.Framework.Communications.Cache
159 if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID)) 159 if (!userProfile.CreateFolder(folderName, folderID, folderType, parentID))
160 { 160 {
161 m_log.ErrorFormat( 161 m_log.ErrorFormat(
162 "[AGENT INVENTORY]: Failed to create folder for user {0} {1}", 162 "[AGENT INVENTORY]: Failed to create folder for user {0} {1}",
163 remoteClient.Name, remoteClient.AgentId); 163 remoteClient.Name, remoteClient.AgentId);
164 } 164 }
165 } 165 }
166 else 166 else
167 { 167 {
168 m_log.ErrorFormat( 168 m_log.ErrorFormat(
169 "[AGENT INVENTORY]: Could not find user profile for {0} {1}", 169 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
170 remoteClient.Name, remoteClient.AgentId); 170 remoteClient.Name, remoteClient.AgentId);
171 } 171 }
172 } 172 }
173 173
174 /// <summary> 174 /// <summary>
175 /// Handle a client request to update the inventory folder 175 /// Handle a client request to update the inventory folder
176 /// 176 ///
177 /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE 177 /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
178 /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, 178 /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
179 /// and needs to be changed. 179 /// and needs to be changed.
@@ -188,7 +188,7 @@ namespace OpenSim.Framework.Communications.Cache
188 { 188 {
189// m_log.DebugFormat( 189// m_log.DebugFormat(
190// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); 190// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
191 191
192 CachedUserInfo userProfile; 192 CachedUserInfo userProfile;
193 193
194 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile)) 194 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
@@ -196,16 +196,16 @@ namespace OpenSim.Framework.Communications.Cache
196 if (!userProfile.UpdateFolder(name, folderID, type, parentID)) 196 if (!userProfile.UpdateFolder(name, folderID, type, parentID))
197 { 197 {
198 m_log.ErrorFormat( 198 m_log.ErrorFormat(
199 "[AGENT INVENTORY]: Failed to update folder for user {0} {1}", 199 "[AGENT INVENTORY]: Failed to update folder for user {0} {1}",
200 remoteClient.Name, remoteClient.AgentId); 200 remoteClient.Name, remoteClient.AgentId);
201 } 201 }
202 } 202 }
203 else 203 else
204 { 204 {
205 m_log.ErrorFormat( 205 m_log.ErrorFormat(
206 "[AGENT INVENTORY]: Could not find user profile for {0} {1}", 206 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
207 remoteClient.Name, remoteClient.AgentId); 207 remoteClient.Name, remoteClient.AgentId);
208 } 208 }
209 } 209 }
210 210
211 /// <summary> 211 /// <summary>
@@ -223,16 +223,16 @@ namespace OpenSim.Framework.Communications.Cache
223 if (!userProfile.MoveFolder(folderID, parentID)) 223 if (!userProfile.MoveFolder(folderID, parentID))
224 { 224 {
225 m_log.ErrorFormat( 225 m_log.ErrorFormat(
226 "[AGENT INVENTORY]: Failed to move folder for user {0} {1}", 226 "[AGENT INVENTORY]: Failed to move folder for user {0} {1}",
227 remoteClient.Name, remoteClient.AgentId); 227 remoteClient.Name, remoteClient.AgentId);
228 } 228 }
229 } 229 }
230 else 230 else
231 { 231 {
232 m_log.ErrorFormat( 232 m_log.ErrorFormat(
233 "[AGENT INVENTORY]: Could not find user profile for {0} {1}", 233 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
234 remoteClient.Name, remoteClient.AgentId); 234 remoteClient.Name, remoteClient.AgentId);
235 } 235 }
236 } 236 }
237 237
238 /// <summary> 238 /// <summary>
@@ -267,14 +267,14 @@ namespace OpenSim.Framework.Communications.Cache
267 else 267 else
268 { 268 {
269 m_log.ErrorFormat( 269 m_log.ErrorFormat(
270 "[AGENT INVENTORY]: Could not find user profile for {0} {1}", 270 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
271 remoteClient.Name, remoteClient.AgentId); 271 remoteClient.Name, remoteClient.AgentId);
272 } 272 }
273 } 273 }
274 274
275 /// <summary> 275 /// <summary>
276 /// Handle the caps inventory descendents fetch. 276 /// Handle the caps inventory descendents fetch.
277 /// 277 ///
278 /// Since the folder structure is sent to the client on login, I believe we only need to handle items. 278 /// Since the folder structure is sent to the client on login, I believe we only need to handle items.
279 /// </summary> 279 /// </summary>
280 /// <param name="agentID"></param> 280 /// <param name="agentID"></param>
@@ -288,20 +288,20 @@ namespace OpenSim.Framework.Communications.Cache
288 bool fetchFolders, bool fetchItems, int sortOrder) 288 bool fetchFolders, bool fetchItems, int sortOrder)
289 { 289 {
290// m_log.DebugFormat( 290// m_log.DebugFormat(
291// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", 291// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
292// fetchFolders, fetchItems, folderID, agentID); 292// fetchFolders, fetchItems, folderID, agentID);
293 293
294 // FIXME MAYBE: We're not handling sortOrder! 294 // FIXME MAYBE: We're not handling sortOrder!
295 295
296 InventoryFolderImpl fold; 296 InventoryFolderImpl fold;
297 if ((fold = libraryRoot.FindFolder(folderID)) != null) 297 if ((fold = libraryRoot.FindFolder(folderID)) != null)
298 { 298 {
299 return fold.RequestListOfItems(); 299 return fold.RequestListOfItems();
300 } 300 }
301 301
302 CachedUserInfo userProfile; 302 CachedUserInfo userProfile;
303 if (m_userProfiles.TryGetValue(agentID, out userProfile)) 303 if (m_userProfiles.TryGetValue(agentID, out userProfile))
304 { 304 {
305 // XXX: When a client crosses into a scene, their entire inventory is fetched 305 // XXX: When a client crosses into a scene, their entire inventory is fetched
306 // asynchronously. If the client makes a request before the inventory is received, we need 306 // asynchronously. If the client makes a request before the inventory is received, we need
307 // to give the inventory a chance to come in. 307 // to give the inventory a chance to come in.
@@ -315,18 +315,18 @@ namespace OpenSim.Framework.Communications.Cache
315 while (attempts++ < 30) 315 while (attempts++ < 30)
316 { 316 {
317 m_log.DebugFormat( 317 m_log.DebugFormat(
318 "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}", 318 "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}",
319 attempts, folderID, agentID); 319 attempts, folderID, agentID);
320 320
321 Thread.Sleep(2000); 321 Thread.Sleep(2000);
322 322
323 if (userProfile.HasInventory) 323 if (userProfile.HasInventory)
324 { 324 {
325 break; 325 break;
326 } 326 }
327 } 327 }
328 } 328 }
329 329
330 if (userProfile.HasInventory) 330 if (userProfile.HasInventory)
331 { 331 {
332 if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null) 332 if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null)
@@ -338,9 +338,9 @@ namespace OpenSim.Framework.Communications.Cache
338 m_log.WarnFormat( 338 m_log.WarnFormat(
339 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}", 339 "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}",
340 folderID, agentID); 340 folderID, agentID);
341 341
342 return null; 342 return null;
343 } 343 }
344 } 344 }
345 else 345 else
346 { 346 {
@@ -352,7 +352,7 @@ namespace OpenSim.Framework.Communications.Cache
352 else 352 else
353 { 353 {
354 m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID); 354 m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID);
355 355
356 return null; 356 return null;
357 } 357 }
358 } 358 }
@@ -371,16 +371,16 @@ namespace OpenSim.Framework.Communications.Cache
371 if (!userProfile.PurgeFolder(folderID)) 371 if (!userProfile.PurgeFolder(folderID))
372 { 372 {
373 m_log.ErrorFormat( 373 m_log.ErrorFormat(
374 "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}", 374 "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}",
375 remoteClient.Name, remoteClient.AgentId); 375 remoteClient.Name, remoteClient.AgentId);
376 } 376 }
377 } 377 }
378 else 378 else
379 { 379 {
380 m_log.ErrorFormat( 380 m_log.ErrorFormat(
381 "[AGENT INVENTORY]: Could not find user profile for {0} {1}", 381 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
382 remoteClient.Name, remoteClient.AgentId); 382 remoteClient.Name, remoteClient.AgentId);
383 } 383 }
384 } 384 }
385 385
386 public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) 386 public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
@@ -407,9 +407,9 @@ namespace OpenSim.Framework.Communications.Cache
407 else 407 else
408 { 408 {
409 m_log.ErrorFormat( 409 m_log.ErrorFormat(
410 "[AGENT INVENTORY]: Could not find user profile for {0} {1}", 410 "[AGENT INVENTORY]: Could not find user profile for {0} {1}",
411 remoteClient.Name, remoteClient.AgentId); 411 remoteClient.Name, remoteClient.AgentId);
412 } 412 }
413 } 413 }
414 } 414 }
415} 415}
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
64 64
65 public class Caps 65 public class Caps
66 { 66 {
67 private static readonly ILog m_log = 67 private static readonly ILog m_log =
68 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 68 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
69 69
70 private string m_httpListenerHostName; 70 private string m_httpListenerHostName;
71 private uint m_httpListenPort; 71 private uint m_httpListenPort;
72 72
73 /// <summary> 73 /// <summary>
74 /// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester. 74 /// This is the uuid portion of every CAPS path. It is used to make capability urls private to the requester.
75 /// </summary> 75 /// </summary>
76 private string m_capsObjectPath; 76 private string m_capsObjectPath;
77 public string CapsObjectPath { get { return m_capsObjectPath; } } 77 public string CapsObjectPath { get { return m_capsObjectPath; } }
78 78
79 private CapsHandlers m_capsHandlers; 79 private CapsHandlers m_capsHandlers;
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Communications.Capabilities
88 88
89 // The following two entries are in a module, however, there also here so that we don't re-assign 89 // The following two entries are in a module, however, there also here so that we don't re-assign
90 // the path to another cap by mistake. 90 // the path to another cap by mistake.
91 private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module. 91 private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module.
92 private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module. 92 private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module.
93 93
94 //private string eventQueue = "0100/"; 94 //private string eventQueue = "0100/";
@@ -100,7 +100,7 @@ namespace OpenSim.Framework.Communications.Capabilities
100 private bool m_dumpAssetsToFile; 100 private bool m_dumpAssetsToFile;
101 private string m_regionName; 101 private string m_regionName;
102 102
103 // These are callbacks which will be setup by the scene so that we can update scene data when we 103 // These are callbacks which will be setup by the scene so that we can update scene data when we
104 // receive capability calls 104 // receive capability calls
105 public NewInventoryItem AddNewInventoryItem = null; 105 public NewInventoryItem AddNewInventoryItem = null;
106 public ItemUpdatedCallback ItemUpdatedCall = null; 106 public ItemUpdatedCallback ItemUpdatedCall = null;
@@ -128,46 +128,46 @@ namespace OpenSim.Framework.Communications.Capabilities
128 public void RegisterHandlers() 128 public void RegisterHandlers()
129 { 129 {
130 DeregisterHandlers(); 130 DeregisterHandlers();
131 131
132 string capsBase = "/CAPS/" + m_capsObjectPath; 132 string capsBase = "/CAPS/" + m_capsObjectPath;
133 133
134 try 134 try
135 { 135 {
136 // the root of all evil 136 // the root of all evil
137 m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest); 137 m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
138 m_capsHandlers["MapLayer"] = 138 m_capsHandlers["MapLayer"] =
139 new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", 139 new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST",
140 capsBase + m_mapLayerPath, 140 capsBase + m_mapLayerPath,
141 GetMapLayer); 141 GetMapLayer);
142 m_capsHandlers["NewFileAgentInventory"] = 142 m_capsHandlers["NewFileAgentInventory"] =
143 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", 143 new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST",
144 capsBase + m_newInventory, 144 capsBase + m_newInventory,
145 NewAgentInventoryRequest); 145 NewAgentInventoryRequest);
146 m_capsHandlers["UpdateNotecardAgentInventory"] = 146 m_capsHandlers["UpdateNotecardAgentInventory"] =
147 new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); 147 new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory);
148 m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"]; 148 m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"];
149 m_capsHandlers["UpdateScriptTaskInventory"] = 149 m_capsHandlers["UpdateScriptTaskInventory"] =
150 new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); 150 new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
151 151
152 // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and 152 // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
153 // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires 153 // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires
154 // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service, 154 // enhancements (probably filling out the folder part of the LLSD reply) to our CAPS service,
155 // but when I went on the Linden grid, the 155 // but when I went on the Linden grid, the
156 // simulators I visited (version 1.21) were, surprisingly, no longer supplying this capability. Instead, 156 // simulators I visited (version 1.21) were, surprisingly, no longer supplying this capability. Instead,
157 // the 1.19.1.4 client appeared to be happily flowing inventory data over UDP 157 // the 1.19.1.4 client appeared to be happily flowing inventory data over UDP
158 // 158 //
159 // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid 159 // This is very probably just a temporary measure - once the CAPS service appears again on the Linden grid
160 // we will be 160 // we will be
161 // able to get the data we need to implement the necessary part of the protocol to fix the issue above. 161 // able to get the data we need to implement the necessary part of the protocol to fix the issue above.
162// m_capsHandlers["FetchInventoryDescendents"] = 162// m_capsHandlers["FetchInventoryDescendents"] =
163// new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryRequest); 163// new RestStreamHandler("POST", capsBase + m_fetchInventoryPath, FetchInventoryRequest);
164 164
165 // m_capsHandlers["FetchInventoryDescendents"] = 165 // m_capsHandlers["FetchInventoryDescendents"] =
166 // new LLSDStreamhandler<LLSDFetchInventoryDescendents, LLSDInventoryDescendents>("POST", 166 // new LLSDStreamhandler<LLSDFetchInventoryDescendents, LLSDInventoryDescendents>("POST",
167 // capsBase + m_fetchInventory, 167 // capsBase + m_fetchInventory,
168 // FetchInventory)); 168 // FetchInventory));
169 // m_capsHandlers["RequestTextureDownload"] = new RestStreamHandler("POST", 169 // m_capsHandlers["RequestTextureDownload"] = new RestStreamHandler("POST",
170 // capsBase + m_requestTexture, 170 // capsBase + m_requestTexture,
171 // RequestTexture); 171 // RequestTexture);
172 } 172 }
173 catch (Exception e) 173 catch (Exception e)
@@ -181,7 +181,7 @@ namespace OpenSim.Framework.Communications.Capabilities
181 /// </summary> 181 /// </summary>
182 /// <param name="capName"></param> 182 /// <param name="capName"></param>
183 /// <param name="handler"></param> 183 /// <param name="handler"></param>
184 public void RegisterHandler(string capName, IRequestHandler handler) 184 public void RegisterHandler(string capName, IRequestHandler handler)
185 { 185 {
186 m_capsHandlers[capName] = handler; 186 m_capsHandlers[capName] = handler;
187 m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path); 187 m_log.DebugFormat("[CAPS]: Registering handler for \"{0}\": path {1}", capName, handler.Path);
@@ -189,14 +189,14 @@ namespace OpenSim.Framework.Communications.Capabilities
189 189
190 /// <summary> 190 /// <summary>
191 /// Remove all CAPS service handlers. 191 /// Remove all CAPS service handlers.
192 /// 192 ///
193 /// </summary> 193 /// </summary>
194 /// <param name="httpListener"></param> 194 /// <param name="httpListener"></param>
195 /// <param name="path"></param> 195 /// <param name="path"></param>
196 /// <param name="restMethod"></param> 196 /// <param name="restMethod"></param>
197 public void DeregisterHandlers() 197 public void DeregisterHandlers()
198 { 198 {
199 foreach (string capsName in m_capsHandlers.Caps) 199 foreach (string capsName in m_capsHandlers.Caps)
200 { 200 {
201 m_capsHandlers.Remove(capsName); 201 m_capsHandlers.Remove(capsName);
202 } 202 }
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Capabilities
220 220
221 // FIXME: these all should probably go into the respective region 221 // FIXME: these all should probably go into the respective region
222 // modules 222 // modules
223 223
224 /// <summary> 224 /// <summary>
225 /// Processes a fetch inventory request and sends the reply 225 /// Processes a fetch inventory request and sends the reply
226 226
@@ -229,7 +229,7 @@ namespace OpenSim.Framework.Communications.Capabilities
229 /// <param name="path"></param> 229 /// <param name="path"></param>
230 /// <param name="param"></param> 230 /// <param name="param"></param>
231 /// <returns></returns> 231 /// <returns></returns>
232 // Request is like: 232 // Request is like:
233 //<llsd> 233 //<llsd>
234 // <map><key>folders</key> 234 // <map><key>folders</key>
235 // <array> 235 // <array>
@@ -240,14 +240,14 @@ namespace OpenSim.Framework.Communications.Capabilities
240 // </map> 240 // </map>
241 //</llsd> 241 //</llsd>
242 // 242 //
243 // multiple fetch-folder maps are allowed within the larger folders map. 243 // multiple fetch-folder maps are allowed within the larger folders map.
244 public string FetchInventoryRequest(string request, string path, string param) 244 public string FetchInventoryRequest(string request, string path, string param)
245 { 245 {
246 string unmodifiedRequest = request.ToString(); 246 string unmodifiedRequest = request.ToString();
247 247
248 //m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest); 248 //m_log.DebugFormat("[AGENT INVENTORY]: Received CAPS fetch inventory request {0}", unmodifiedRequest);
249 m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName); 249 m_log.Debug("[CAPS]: Inventory Request in region: " + m_regionName);
250 250
251 Hashtable hash = new Hashtable(); 251 Hashtable hash = new Hashtable();
252 try 252 try
253 { 253 {
@@ -258,7 +258,7 @@ namespace OpenSim.Framework.Communications.Capabilities
258 m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message); 258 m_log.Error("[AGENT INVENTORY]: Fetch error: " + pe.Message);
259 m_log.Error("Request: " + request.ToString()); 259 m_log.Error("Request: " + request.ToString());
260 } 260 }
261 261
262 ArrayList foldersrequested = (ArrayList)hash["folders"]; 262 ArrayList foldersrequested = (ArrayList)hash["folders"];
263 263
264 string response = ""; 264 string response = "";
@@ -275,15 +275,15 @@ namespace OpenSim.Framework.Communications.Capabilities
275 inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); 275 inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
276 inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", ""); 276 inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", "");
277 inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); 277 inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", "");
278 278
279 response += inventoryitemstr; 279 response += inventoryitemstr;
280 } 280 }
281 281
282 if (response.Length == 0) 282 if (response.Length == 0)
283 { 283 {
284 // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. 284 // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants.
285 // Therefore, I'm concluding that the client only has so many threads available to do requests 285 // Therefore, I'm concluding that the client only has so many threads available to do requests
286 // and when a thread stalls.. is stays stalled. 286 // and when a thread stalls.. is stays stalled.
287 // Therefore we need to return something valid 287 // Therefore we need to return something valid
288 response = "<llsd><map><key>folders</key><array /></map></llsd>"; 288 response = "<llsd><map><key>folders</key><array /></map></llsd>";
289 } 289 }
@@ -291,7 +291,7 @@ namespace OpenSim.Framework.Communications.Capabilities
291 { 291 {
292 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; 292 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
293 } 293 }
294 294
295 //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml"); 295 //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml");
296 //m_log.Debug(Util.GetFormattedXml(response)); 296 //m_log.Debug(Util.GetFormattedXml(response));
297 297
@@ -310,7 +310,7 @@ namespace OpenSim.Framework.Communications.Capabilities
310 contents.agent___id = m_agentID; 310 contents.agent___id = m_agentID;
311 contents.owner___id = invFetch.owner_id; 311 contents.owner___id = invFetch.owner_id;
312 contents.folder___id = invFetch.folder_id; 312 contents.folder___id = invFetch.folder_id;
313 313
314 // The version number being sent back was originally 1. 314 // The version number being sent back was originally 1.
315 // Unfortunately, on 1.19.1.4, this means that we see a problem where on subsequent logins 315 // Unfortunately, on 1.19.1.4, this means that we see a problem where on subsequent logins
316 // without clearing client cache, objects in the root folder disappear until the cache is cleared, 316 // without clearing client cache, objects in the root folder disappear until the cache is cleared,
@@ -318,8 +318,8 @@ namespace OpenSim.Framework.Communications.Capabilities
318 // 318 //
319 // Seeing the version to something other than 0 may be the right thing to do, but there is 319 // Seeing the version to something other than 0 may be the right thing to do, but there is
320 // a greater subtlety of the second life protocol that needs to be understood first. 320 // a greater subtlety of the second life protocol that needs to be understood first.
321 contents.version = 0; 321 contents.version = 0;
322 322
323 contents.descendents = 0; 323 contents.descendents = 0;
324 reply.folders.Array.Add(contents); 324 reply.folders.Array.Add(contents);
325 List<InventoryItemBase> itemList = null; 325 List<InventoryItemBase> itemList = null;
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Capabilities
327 { 327 {
328 itemList = CAPSFetchInventoryDescendents(m_agentID, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order); 328 itemList = CAPSFetchInventoryDescendents(m_agentID, invFetch.folder_id, invFetch.owner_id, invFetch.fetch_folders, invFetch.fetch_items, invFetch.sort_order);
329 } 329 }
330 330
331 if (itemList != null) 331 if (itemList != null)
332 { 332 {
333 foreach (InventoryItemBase invItem in itemList) 333 foreach (InventoryItemBase invItem in itemList)
@@ -336,12 +336,12 @@ namespace OpenSim.Framework.Communications.Capabilities
336 } 336 }
337 } 337 }
338 else 338 else
339 { 339 {
340 IClientAPI client = GetClient(m_agentID); 340 IClientAPI client = GetClient(m_agentID);
341 341
342 // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response. 342 // We're going to both notify the client of inventory service failure and send back a 'no folder contents' response.
343 // If we don't send back the response, 343 // If we don't send back the response,
344 // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest()) 344 // the client becomes unhappy (see Teravus' comment in FetchInventoryRequest())
345 if (client != null) 345 if (client != null)
346 { 346 {
347 client.SendAgentAlertMessage( 347 client.SendAgentAlertMessage(
@@ -351,11 +351,11 @@ namespace OpenSim.Framework.Communications.Capabilities
351 else 351 else
352 { 352 {
353 m_log.ErrorFormat( 353 m_log.ErrorFormat(
354 "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure", 354 "[AGENT INVENTORY]: Could not lookup controlling client for {0} in order to notify them of the inventory service failure",
355 m_agentID); 355 m_agentID);
356 } 356 }
357 } 357 }
358 358
359 contents.descendents = contents.items.Array.Count; 359 contents.descendents = contents.items.Array.Count;
360 return reply; 360 return reply;
361 } 361 }
@@ -375,7 +375,7 @@ namespace OpenSim.Framework.Communications.Capabilities
375 llsdItem.item_id = invItem.ID; 375 llsdItem.item_id = invItem.ID;
376 llsdItem.name = invItem.Name; 376 llsdItem.name = invItem.Name;
377 llsdItem.parent_id = invItem.Folder; 377 llsdItem.parent_id = invItem.Folder;
378 llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower(); 378 llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
379 llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower(); 379 llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower();
380 llsdItem.permissions = new LLSDPermissions(); 380 llsdItem.permissions = new LLSDPermissions();
381 llsdItem.permissions.creator_id = invItem.Creator; 381 llsdItem.permissions.creator_id = invItem.Creator;
@@ -395,7 +395,7 @@ namespace OpenSim.Framework.Communications.Capabilities
395 } 395 }
396 396
397 /// <summary> 397 /// <summary>
398 /// 398 ///
399 /// </summary> 399 /// </summary>
400 /// <param name="mapReq"></param> 400 /// <param name="mapReq"></param>
401 /// <returns></returns> 401 /// <returns></returns>
@@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications.Capabilities
408 } 408 }
409 409
410 /// <summary> 410 /// <summary>
411 /// 411 ///
412 /// </summary> 412 /// </summary>
413 /// <returns></returns> 413 /// <returns></returns>
414 protected static LLSDMapLayer GetLLSDMapLayerResponse() 414 protected static LLSDMapLayer GetLLSDMapLayerResponse()
@@ -421,7 +421,7 @@ namespace OpenSim.Framework.Communications.Capabilities
421 } 421 }
422 422
423 /// <summary> 423 /// <summary>
424 /// 424 ///
425 /// </summary> 425 /// </summary>
426 /// <param name="request"></param> 426 /// <param name="request"></param>
427 /// <param name="path"></param> 427 /// <param name="path"></param>
@@ -437,7 +437,7 @@ namespace OpenSim.Framework.Communications.Capabilities
437 #region EventQueue (Currently not enabled) 437 #region EventQueue (Currently not enabled)
438 438
439 /// <summary> 439 /// <summary>
440 /// 440 ///
441 /// </summary> 441 /// </summary>
442 /// <param name="request"></param> 442 /// <param name="request"></param>
443 /// <param name="path"></param> 443 /// <param name="path"></param>
@@ -463,7 +463,7 @@ namespace OpenSim.Framework.Communications.Capabilities
463 } 463 }
464 464
465 /// <summary> 465 /// <summary>
466 /// 466 ///
467 /// </summary> 467 /// </summary>
468 /// <param name="caps"></param> 468 /// <param name="caps"></param>
469 /// <param name="ipAddressPort"></param> 469 /// <param name="ipAddressPort"></param>
@@ -482,7 +482,7 @@ namespace OpenSim.Framework.Communications.Capabilities
482 } 482 }
483 483
484 /// <summary> 484 /// <summary>
485 /// 485 ///
486 /// </summary> 486 /// </summary>
487 /// <returns></returns> 487 /// <returns></returns>
488 public string CreateEmptyEventResponse() 488 public string CreateEmptyEventResponse()
@@ -590,7 +590,7 @@ namespace OpenSim.Framework.Communications.Capabilities
590 } 590 }
591 591
592 /// <summary> 592 /// <summary>
593 /// 593 ///
594 /// </summary> 594 /// </summary>
595 /// <param name="llsdRequest"></param> 595 /// <param name="llsdRequest"></param>
596 /// <returns></returns> 596 /// <returns></returns>
@@ -622,7 +622,7 @@ namespace OpenSim.Framework.Communications.Capabilities
622 } 622 }
623 623
624 /// <summary> 624 /// <summary>
625 /// 625 ///
626 /// </summary> 626 /// </summary>
627 /// <param name="assetID"></param> 627 /// <param name="assetID"></param>
628 /// <param name="inventoryItem"></param> 628 /// <param name="inventoryItem"></param>
@@ -708,7 +708,7 @@ namespace OpenSim.Framework.Communications.Capabilities
708 /// <param name="itemID">Item to update</param> 708 /// <param name="itemID">Item to update</param>
709 /// <param name="primID">Prim containing item to update</param> 709 /// <param name="primID">Prim containing item to update</param>
710 /// <param name="isScriptRunning">Signals whether the script to update is currently running</param> 710 /// <param name="isScriptRunning">Signals whether the script to update is currently running</param>
711 /// <param name="data">New asset data</param> 711 /// <param name="data">New asset data</param>
712 public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data) 712 public void TaskScriptUpdated(LLUUID itemID, LLUUID primID, bool isScriptRunning, byte[] data)
713 { 713 {
714 if (TaskScriptUpdatedCall != null) 714 if (TaskScriptUpdatedCall != null)
@@ -751,7 +751,7 @@ namespace OpenSim.Framework.Communications.Capabilities
751 } 751 }
752 752
753 /// <summary> 753 /// <summary>
754 /// 754 ///
755 /// </summary> 755 /// </summary>
756 /// <param name="data"></param> 756 /// <param name="data"></param>
757 /// <param name="path"></param> 757 /// <param name="path"></param>
@@ -807,7 +807,7 @@ namespace OpenSim.Framework.Communications.Capabilities
807 } 807 }
808 808
809 /// <summary> 809 /// <summary>
810 /// This class is a callback invoked when a client sends asset data to 810 /// This class is a callback invoked when a client sends asset data to
811 /// an agent inventory notecard update url 811 /// an agent inventory notecard update url
812 /// </summary> 812 /// </summary>
813 public class ItemUpdater 813 public class ItemUpdater
@@ -831,7 +831,7 @@ namespace OpenSim.Framework.Communications.Capabilities
831 } 831 }
832 832
833 /// <summary> 833 /// <summary>
834 /// 834 ///
835 /// </summary> 835 /// </summary>
836 /// <param name="data"></param> 836 /// <param name="data"></param>
837 /// <param name="path"></param> 837 /// <param name="path"></param>
@@ -889,7 +889,7 @@ namespace OpenSim.Framework.Communications.Capabilities
889 } 889 }
890 890
891 /// <summary> 891 /// <summary>
892 /// This class is a callback invoked when a client sends asset data to 892 /// This class is a callback invoked when a client sends asset data to
893 /// a task inventory script update url 893 /// a task inventory script update url
894 /// </summary> 894 /// </summary>
895 public class TaskInventoryScriptUpdater 895 public class TaskInventoryScriptUpdater
@@ -921,7 +921,7 @@ namespace OpenSim.Framework.Communications.Capabilities
921 } 921 }
922 922
923 /// <summary> 923 /// <summary>
924 /// 924 ///
925 /// </summary> 925 /// </summary>
926 /// <param name="data"></param> 926 /// <param name="data"></param>
927 /// <param name="path"></param> 927 /// <param name="path"></param>
@@ -931,7 +931,7 @@ namespace OpenSim.Framework.Communications.Capabilities
931 { 931 {
932 try 932 try
933 { 933 {
934// m_log.InfoFormat("[CAPS]: " + 934// m_log.InfoFormat("[CAPS]: " +
935// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", 935// "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}",
936// data, path, param)); 936// data, path, param));
937 937
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
64 /// </summary> 64 /// </summary>
65 /// <param name="capsName">name of the capability of the cap 65 /// <param name="capsName">name of the capability of the cap
66 /// handler to be removed</param> 66 /// handler to be removed</param>
67 public void Remove(string capsName) 67 public void Remove(string capsName)
68 { 68 {
69 // This line must be here, or caps will break! 69 // This line must be here, or caps will break!
70 m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path); 70 m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[capsName].Path);
71 m_capsHandlers.Remove(capsName); 71 m_capsHandlers.Remove(capsName);
72 } 72 }
73 73
74 public bool ContainsCap(string cap) 74 public bool ContainsCap(string cap)
75 { 75 {
76 return m_capsHandlers.ContainsKey(cap); 76 return m_capsHandlers.ContainsKey(cap);
77 } 77 }
@@ -85,14 +85,14 @@ namespace OpenSim.Framework.Communications.Capabilities
85 /// retrieve a cap handler for a cap that is not contained in 85 /// retrieve a cap handler for a cap that is not contained in
86 /// CapsHandlers. 86 /// CapsHandlers.
87 /// </Remarks> 87 /// </Remarks>
88 public IRequestHandler this[string idx] 88 public IRequestHandler this[string idx]
89 { 89 {
90 get 90 get
91 { 91 {
92 return m_capsHandlers[idx]; 92 return m_capsHandlers[idx];
93 } 93 }
94 94
95 set 95 set
96 { 96 {
97 if (m_capsHandlers.ContainsKey(idx)) 97 if (m_capsHandlers.ContainsKey(idx))
98 { 98 {
@@ -111,9 +111,9 @@ namespace OpenSim.Framework.Communications.Capabilities
111 /// Return the list of cap names for which this CapsHandlers 111 /// Return the list of cap names for which this CapsHandlers
112 /// object contains cap handlers. 112 /// object contains cap handlers.
113 /// </summary> 113 /// </summary>
114 public string[] Caps 114 public string[] Caps
115 { 115 {
116 get 116 get
117 { 117 {
118 string[] __keys = new string[m_capsHandlers.Keys.Count]; 118 string[] __keys = new string[m_capsHandlers.Keys.Count];
119 m_capsHandlers.Keys.CopyTo(__keys, 0); 119 m_capsHandlers.Keys.CopyTo(__keys, 0);
@@ -125,7 +125,7 @@ namespace OpenSim.Framework.Communications.Capabilities
125 /// Return an LLSD-serializable Hashtable describing the 125 /// Return an LLSD-serializable Hashtable describing the
126 /// capabilities and their handler details. 126 /// capabilities and their handler details.
127 /// </summary> 127 /// </summary>
128 public Hashtable CapsDetails 128 public Hashtable CapsDetails
129 { 129 {
130 get 130 get
131 { 131 {
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;
37namespace OpenSim.Framework.Communications.Capabilities 37namespace OpenSim.Framework.Communications.Capabilities
38{ 38{
39 /// <summary> 39 /// <summary>
40 /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code. 40 /// Borrowed from (a older version of) libsl for now, as their new llsd code doesn't work we our decoding code.
41 /// </summary> 41 /// </summary>
42 public static class LLSD 42 public static class LLSD
43 { 43 {
44 /// <summary> 44 /// <summary>
45 /// 45 ///
46 /// </summary> 46 /// </summary>
47 public class LLSDParseException : Exception 47 public class LLSDParseException : Exception
48 { 48 {
@@ -52,7 +52,7 @@ namespace OpenSim.Framework.Communications.Capabilities
52 } 52 }
53 53
54 /// <summary> 54 /// <summary>
55 /// 55 ///
56 /// </summary> 56 /// </summary>
57 public class LLSDSerializeException : Exception 57 public class LLSDSerializeException : Exception
58 { 58 {
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Communications.Capabilities
62 } 62 }
63 63
64 /// <summary> 64 /// <summary>
65 /// 65 ///
66 /// </summary> 66 /// </summary>
67 /// <param name="b"></param> 67 /// <param name="b"></param>
68 /// <returns></returns> 68 /// <returns></returns>
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Capabilities
72 } 72 }
73 73
74 /// <summary> 74 /// <summary>
75 /// 75 ///
76 /// </summary> 76 /// </summary>
77 /// <param name="st"></param> 77 /// <param name="st"></param>
78 /// <returns></returns> 78 /// <returns></returns>
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Communications.Capabilities
96 } 96 }
97 97
98 /// <summary> 98 /// <summary>
99 /// 99 ///
100 /// </summary> 100 /// </summary>
101 /// <param name="obj"></param> 101 /// <param name="obj"></param>
102 /// <returns></returns> 102 /// <returns></returns>
@@ -116,7 +116,7 @@ namespace OpenSim.Framework.Communications.Capabilities
116 } 116 }
117 117
118 /// <summary> 118 /// <summary>
119 /// 119 ///
120 /// </summary> 120 /// </summary>
121 /// <param name="writer"></param> 121 /// <param name="writer"></param>
122 /// <param name="obj"></param> 122 /// <param name="obj"></param>
@@ -217,7 +217,7 @@ namespace OpenSim.Framework.Communications.Capabilities
217 } 217 }
218 218
219 /// <summary> 219 /// <summary>
220 /// 220 ///
221 /// </summary> 221 /// </summary>
222 /// <param name="reader"></param> 222 /// <param name="reader"></param>
223 /// <returns></returns> 223 /// <returns></returns>
@@ -360,7 +360,7 @@ namespace OpenSim.Framework.Communications.Capabilities
360 } 360 }
361 361
362 /// <summary> 362 /// <summary>
363 /// 363 ///
364 /// </summary> 364 /// </summary>
365 /// <param name="reader"></param> 365 /// <param name="reader"></param>
366 /// <returns></returns> 366 /// <returns></returns>
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Capabilities
405 } 405 }
406 406
407 /// <summary> 407 /// <summary>
408 /// 408 ///
409 /// </summary> 409 /// </summary>
410 /// <param name="reader"></param> 410 /// <param name="reader"></param>
411 /// <returns></returns> 411 /// <returns></returns>
@@ -441,7 +441,7 @@ namespace OpenSim.Framework.Communications.Capabilities
441 } 441 }
442 442
443 /// <summary> 443 /// <summary>
444 /// 444 ///
445 /// </summary> 445 /// </summary>
446 /// <param name="count"></param> 446 /// <param name="count"></param>
447 /// <returns></returns> 447 /// <returns></returns>
@@ -453,7 +453,7 @@ namespace OpenSim.Framework.Communications.Capabilities
453 } 453 }
454 454
455 /// <summary> 455 /// <summary>
456 /// 456 ///
457 /// </summary> 457 /// </summary>
458 /// <param name="obj"></param> 458 /// <param name="obj"></param>
459 /// <param name="indent"></param> 459 /// <param name="indent"></param>
@@ -661,7 +661,7 @@ namespace OpenSim.Framework.Communications.Capabilities
661 } 661 }
662 662
663 /// <summary> 663 /// <summary>
664 /// 664 ///
665 /// </summary> 665 /// </summary>
666 /// <param name="reader"></param> 666 /// <param name="reader"></param>
667 private static void SkipWS(XmlTextReader reader) 667 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
35{ 35{
36 public class LLSDHelpers 36 public class LLSDHelpers
37 { 37 {
38// private static readonly log4net.ILog m_log 38// private static readonly log4net.ILog m_log
39// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 39// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40 40
41 public static string SerialiseLLSDReply(object obj) 41 public static string SerialiseLLSDReply(object obj)
42 { 42 {
43 StringWriter sw = new StringWriter(); 43 StringWriter sw = new StringWriter();
@@ -47,9 +47,9 @@ namespace OpenSim.Framework.Communications.Capabilities
47 SerializeLLSDType(writer, obj); 47 SerializeLLSDType(writer, obj);
48 writer.WriteEndElement(); 48 writer.WriteEndElement();
49 writer.Close(); 49 writer.Close();
50 50
51 //m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString()); 51 //m_log.DebugFormat("[LLSD Helpers]: Generated serialized LLSD reply {0}", sw.ToString());
52 52
53 return sw.ToString(); 53 return sw.ToString();
54 } 54 }
55 55
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Capabilities
146 fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); 146 fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
147 //TODO 147 //TODO
148 // the LLSD map/array types in the array need to be deserialised 148 // the LLSD map/array types in the array need to be deserialised
149 // but first we need to know the right class to deserialise them into. 149 // but first we need to know the right class to deserialise them into.
150 } 150 }
151 else 151 else
152 { 152 {
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
91 public int descendents; 91 public int descendents;
92 public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names 92 public LLUUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
93 public LLSDArray items = new LLSDArray(); 93 public LLSDArray items = new LLSDArray();
94 public LLUUID owner___id; // and of course we can't have field names with "-" in 94 public LLUUID owner___id; // and of course we can't have field names with "-" in
95 public int version; 95 public int version;
96 } 96 }
97} \ No newline at end of file 97} \ 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 @@
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using System.Collections; 29using System.Collections;
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Communications.Capabilities
41 { 41 {
42 } 42 }
43 43
44 public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds) 44 public LLSDParcelVoiceInfoResponse(string region, int localID, Hashtable creds)
45 { 45 {
46 region_name = region; 46 region_name = region;
47 parcel_local_id = localID; 47 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
51 //string requestBody = streamReader.ReadToEnd(); 51 //string requestBody = streamReader.ReadToEnd();
52 //streamReader.Close(); 52 //streamReader.Close();
53 53
54 // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap) 54 // libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)
55 // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request)); 55 // libsecondlife.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
56 56
57 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); 57 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
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// The task inventory item that was updated 36 /// The task inventory item that was updated
37 /// </summary> 37 /// </summary>
38 public LLUUID item_id; 38 public LLUUID item_id;
39 39
40 /// <summary> 40 /// <summary>
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
34 { 34 {
35 /// <summary> 35 /// <summary>
36 /// The item containing the script to update 36 /// The item containing the script to update
37 /// </summary> 37 /// </summary>
38 public LLUUID item_id; 38 public LLUUID item_id;
39 39
40 /// <summary> 40 /// <summary>
41 /// The task containing the script 41 /// The task containing the script
42 /// </summary> 42 /// </summary>
43 public LLUUID task_id; 43 public LLUUID task_id;
44 44
45 /// <summary> 45 /// <summary>
46 /// Signals whether the script is currently active 46 /// Signals whether the script is currently active
47 /// </summary> 47 /// </summary>
48 public int is_script_running; 48 public int is_script_running;
49 } 49 }
50} \ No newline at end of file 50} \ 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 @@
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29namespace OpenSim.Framework.Communications.Capabilities 29namespace OpenSim.Framework.Communications.Capabilities
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities
38 { 38 {
39 } 39 }
40 40
41 public LLSDVoiceAccountResponse(string user, string pass) 41 public LLSDVoiceAccountResponse(string user, string pass)
42 { 42 {
43 username = user; 43 username = user;
44 password = pass; 44 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
236 236
237 public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile) 237 public void UpdateAvatarPropertiesRequest(IClientAPI remote_client, UserProfileData UserProfile)
238 { 238 {
239 m_userService.UpdateUserProfileProperties(UserProfile); 239 m_userService.UpdateUserProfileProperties(UserProfile);
240 return; 240 return;
241 } 241 }
242 242
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
112 112
113 public void EndInvoke() 113 public void EndInvoke()
114 { 114 {
115 // This method assumes that only 1 thread calls EndInvoke 115 // This method assumes that only 1 thread calls EndInvoke
116 if (!IsCompleted) 116 if (!IsCompleted)
117 { 117 {
118 // If the operation isn't done, wait for it 118 // If the operation isn't done, wait for it
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Communications
142 // Save the asynchronous operation's result 142 // Save the asynchronous operation's result
143 m_result = result; 143 m_result = result;
144 144
145 // Tell the base class that the operation completed 145 // Tell the base class that the operation completed
146 // sucessfully (no exception) 146 // sucessfully (no exception)
147 base.SetAsCompleted(completedSynchronously); 147 base.SetAsCompleted(completedSynchronously);
148 } 148 }
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
43 public interface IInventoryServices 43 public interface IInventoryServices
44 { 44 {
45 /// <summary> 45 /// <summary>
46 /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the 46 /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the
47 /// inventory has been received 47 /// inventory has been received
48 /// </summary> 48 /// </summary>
49 /// <param name="userID"></param> 49 /// <param name="userID"></param>
50 /// <param name="callback"></param> 50 /// <param name="callback"></param>
51 void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); 51 void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
52 52
53 /// <summary> 53 /// <summary>
54 /// Add a new folder to the user's inventory 54 /// Add a new folder to the user's inventory
55 /// </summary> 55 /// </summary>
56 /// <param name="folder"></param> 56 /// <param name="folder"></param>
57 /// <returns>true if the folder was successfully added</returns> 57 /// <returns>true if the folder was successfully added</returns>
58 bool AddFolder(InventoryFolderBase folder); 58 bool AddFolder(InventoryFolderBase folder);
59 59
60 /// <summary> 60 /// <summary>
61 /// Move an inventory folder to a new location 61 /// Move an inventory folder to a new location
62 /// </summary> 62 /// </summary>
63 /// <param name="folder">A folder containing the details of the new location</param> 63 /// <param name="folder">A folder containing the details of the new location</param>
64 /// <returns>true if the folder was successfully moved</returns> 64 /// <returns>true if the folder was successfully moved</returns>
65 bool MoveFolder(InventoryFolderBase folder); 65 bool MoveFolder(InventoryFolderBase folder);
66 66
67 /// <summary> 67 /// <summary>
68 /// Purge an inventory folder of all its items and subfolders. 68 /// Purge an inventory folder of all its items and subfolders.
69 /// </summary> 69 /// </summary>
70 /// <param name="folder"></param> 70 /// <param name="folder"></param>
71 /// <returns>true if the folder was successfully purged</returns> 71 /// <returns>true if the folder was successfully purged</returns>
72 bool PurgeFolder(InventoryFolderBase folder); 72 bool PurgeFolder(InventoryFolderBase folder);
73 73
74 /// <summary> 74 /// <summary>
75 /// Add a new item to the user's inventory 75 /// Add a new item to the user's inventory
76 /// </summary> 76 /// </summary>
77 /// <param name="item"></param> 77 /// <param name="item"></param>
78 /// <returns>true if the item was successfully added</returns> 78 /// <returns>true if the item was successfully added</returns>
79 bool AddItem(InventoryItemBase item); 79 bool AddItem(InventoryItemBase item);
80 80
81 /// <summary> 81 /// <summary>
82 /// Update an item in the user's inventory 82 /// Update an item in the user's inventory
83 /// </summary> 83 /// </summary>
84 /// <param name="item"></param> 84 /// <param name="item"></param>
85 /// <returns>true if the item was successfully updated</returns> 85 /// <returns>true if the item was successfully updated</returns>
86 bool UpdateItem(InventoryItemBase item); 86 bool UpdateItem(InventoryItemBase item);
87 87
88 /// <summary> 88 /// <summary>
89 /// Delete an item from the user's inventory 89 /// Delete an item from the user's inventory
90 /// </summary> 90 /// </summary>
91 /// <param name="item"></param> 91 /// <param name="item"></param>
92 /// <returns>true if the item was successfully deleted</returns> 92 /// <returns>true if the item was successfully deleted</returns>
93 bool DeleteItem(InventoryItemBase item); 93 bool DeleteItem(InventoryItemBase item);
94 94
95 /// <summary> 95 /// <summary>
96 /// Create a new inventory for the given user. 96 /// Create a new inventory for the given user.
97 /// </summary> 97 /// </summary>
98 /// <param name="user"></param> 98 /// <param name="user"></param>
99 /// <returns>true if the inventory was successfully created, false otherwise</returns> 99 /// <returns>true if the inventory was successfully created, false otherwise</returns>
100 bool CreateNewUserInventory(LLUUID user); 100 bool CreateNewUserInventory(LLUUID user);
101 101
102 bool HasInventoryForUser(LLUUID userID); 102 bool HasInventoryForUser(LLUUID userID);
103 103
104 /// <summary> 104 /// <summary>
@@ -107,12 +107,12 @@ namespace OpenSim.Framework.Communications
107 /// <param name="userID"></param> 107 /// <param name="userID"></param>
108 /// <returns>null if no root folder was found</returns> 108 /// <returns>null if no root folder was found</returns>
109 InventoryFolderBase RequestRootFolder(LLUUID userID); 109 InventoryFolderBase RequestRootFolder(LLUUID userID);
110 110
111 /// <summary> 111 /// <summary>
112 /// Returns a list of all the folders in a given user's inventory. 112 /// Returns a list of all the folders in a given user's inventory.
113 /// </summary> 113 /// </summary>
114 /// <param name="userId"></param> 114 /// <param name="userId"></param>
115 /// <returns>A flat list of the user's inventory folder tree, 115 /// <returns>A flat list of the user's inventory folder tree,
116 /// null if there is no inventory for this user</returns> 116 /// null if there is no inventory for this user</returns>
117 List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId); 117 List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId);
118 } 118 }
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
37 /// </summary> 37 /// </summary>
38 /// <param name="fname">First name</param> 38 /// <param name="fname">First name</param>
39 /// <param name="lname">Last name</param> 39 /// <param name="lname">Last name</param>
40 /// <returns>A user profile. Returns null if no profile is found</returns> 40 /// <returns>A user profile. Returns null if no profile is found</returns>
41 UserProfileData GetUserProfile(string firstName, string lastName); 41 UserProfileData GetUserProfile(string firstName, string lastName);
42 42
43 //UserProfileData GetUserProfile(string name); 43 //UserProfileData GetUserProfile(string name);
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.Communications
46 /// Loads a user profile from a database by UUID 46 /// Loads a user profile from a database by UUID
47 /// </summary> 47 /// </summary>
48 /// <param name="uuid">The target UUID</param> 48 /// <param name="uuid">The target UUID</param>
49 /// <returns>A user profile. Returns null if no user profile is found.</returns> 49 /// <returns>A user profile. Returns null if no user profile is found.</returns>
50 UserProfileData GetUserProfile(LLUUID userId); 50 UserProfileData GetUserProfile(LLUUID userId);
51 51
52 void clearUserAgent(LLUUID avatarID); 52 void clearUserAgent(LLUUID avatarID);
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications
57 UserProfileData SetupMasterUser(LLUUID userId); 57 UserProfileData SetupMasterUser(LLUUID userId);
58 58
59 /// <summary> 59 /// <summary>
60 /// 60 ///
61 /// </summary> 61 /// </summary>
62 /// <param name="user"></param> 62 /// <param name="user"></param>
63 LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY); 63 LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Communications
110 List<FriendListItem> GetUserFriendList(LLUUID friendlistowner); 110 List<FriendListItem> GetUserFriendList(LLUUID friendlistowner);
111 111
112 /// <summary> 112 /// <summary>
113 /// Get's the User Appearance 113 /// Get's the User Appearance
114 AvatarAppearance GetUserAppearance(LLUUID user); 114 AvatarAppearance GetUserAppearance(LLUUID user);
115 115
116 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 116 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
40 /// </summary> 40 /// </summary>
41 public abstract class InventoryServiceBase : IInventoryServices 41 public abstract class InventoryServiceBase : IInventoryServices
42 { 42 {
43 private static readonly ILog m_log 43 private static readonly ILog m_log
44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); 46 protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
47 47
48 #region Plugin methods 48 #region Plugin methods
49 49
50 /// <summary> 50 /// <summary>
51 /// Adds a new user server plugin - plugins will be requested in the order they were loaded. 51 /// Adds a new user server plugin - plugins will be requested in the order they were loaded.
52 /// </summary> 52 /// </summary>
@@ -76,42 +76,42 @@ namespace OpenSim.Framework.Communications
76 } 76 }
77 } 77 }
78 } 78 }
79 79
80 #endregion 80 #endregion
81 81
82 #region IInventoryServices methods 82 #region IInventoryServices methods
83 83
84 // See IInventoryServices 84 // See IInventoryServices
85 public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId) 85 public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
86 { 86 {
87// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId); 87// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
88 88
89 InventoryFolderBase rootFolder = RequestRootFolder(userId); 89 InventoryFolderBase rootFolder = RequestRootFolder(userId);
90 90
91 // Agent has no inventory structure yet. 91 // Agent has no inventory structure yet.
92 if (null == rootFolder) 92 if (null == rootFolder)
93 { 93 {
94 return null; 94 return null;
95 } 95 }
96 96
97 List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>(); 97 List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
98 98
99 userFolders.Add(rootFolder); 99 userFolders.Add(rootFolder);
100 100
101 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 101 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
102 { 102 {
103 IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.ID); 103 IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.ID);
104 userFolders.AddRange(folders); 104 userFolders.AddRange(folders);
105 } 105 }
106 106
107// foreach (InventoryFolderBase folder in userFolders) 107// foreach (InventoryFolderBase folder in userFolders)
108// { 108// {
109// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID); 109// m_log.DebugFormat("[AGENT INVENTORY]: Got folder {0} {1}", folder.name, folder.folderID);
110// } 110// }
111 111
112 return userFolders; 112 return userFolders;
113 } 113 }
114 114
115 // See IInventoryServices 115 // See IInventoryServices
116 public virtual bool HasInventoryForUser(LLUUID userID) 116 public virtual bool HasInventoryForUser(LLUUID userID)
117 { 117 {
@@ -133,31 +133,31 @@ namespace OpenSim.Framework.Communications
133 public bool CreateNewUserInventory(LLUUID user) 133 public bool CreateNewUserInventory(LLUUID user)
134 { 134 {
135 InventoryFolderBase existingRootFolder = RequestRootFolder(user); 135 InventoryFolderBase existingRootFolder = RequestRootFolder(user);
136 136
137 if (null != existingRootFolder) 137 if (null != existingRootFolder)
138 { 138 {
139 m_log.WarnFormat( 139 m_log.WarnFormat(
140 "[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have " 140 "[AGENT INVENTORY]: Did not create a new inventory for user {0} since they already have "
141 + "a root inventory folder with id {1}", 141 + "a root inventory folder with id {1}",
142 user, existingRootFolder.ID); 142 user, existingRootFolder.ID);
143 } 143 }
144 else 144 else
145 { 145 {
146 UsersInventory inven = new UsersInventory(); 146 UsersInventory inven = new UsersInventory();
147 inven.CreateNewInventorySet(user); 147 inven.CreateNewInventorySet(user);
148 AddNewInventorySet(inven); 148 AddNewInventorySet(inven);
149 149
150 return true; 150 return true;
151 } 151 }
152 152
153 return false; 153 return false;
154 } 154 }
155 155
156 // See IInventoryServices 156 // See IInventoryServices
157 public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback); 157 public abstract void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback);
158 158
159 #endregion 159 #endregion
160 160
161 #region Methods used by GridInventoryService 161 #region Methods used by GridInventoryService
162 162
163 public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID) 163 public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID)
@@ -180,21 +180,21 @@ namespace OpenSim.Framework.Communications
180 } 180 }
181 return itemsList; 181 return itemsList;
182 } 182 }
183 183
184 #endregion 184 #endregion
185 185
186 // See IInventoryServices 186 // See IInventoryServices
187 public bool AddFolder(InventoryFolderBase folder) 187 public bool AddFolder(InventoryFolderBase folder)
188 { 188 {
189 m_log.DebugFormat( 189 m_log.DebugFormat(
190 "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); 190 "[AGENT INVENTORY]: Adding folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
191 191
192 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 192 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
193 { 193 {
194 plugin.Value.addInventoryFolder(folder); 194 plugin.Value.addInventoryFolder(folder);
195 } 195 }
196 196
197 // FIXME: Should return false on failure 197 // FIXME: Should return false on failure
198 return true; 198 return true;
199 } 199 }
200 200
@@ -203,14 +203,14 @@ namespace OpenSim.Framework.Communications
203 { 203 {
204 m_log.DebugFormat( 204 m_log.DebugFormat(
205 "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); 205 "[AGENT INVENTORY]: Moving folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID);
206 206
207 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 207 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
208 { 208 {
209 plugin.Value.moveInventoryFolder(folder); 209 plugin.Value.moveInventoryFolder(folder);
210 } 210 }
211 211
212 // FIXME: Should return false on failure 212 // FIXME: Should return false on failure
213 return true; 213 return true;
214 } 214 }
215 215
216 // See IInventoryServices 216 // See IInventoryServices
@@ -218,14 +218,14 @@ namespace OpenSim.Framework.Communications
218 { 218 {
219 m_log.DebugFormat( 219 m_log.DebugFormat(
220 "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder); 220 "[AGENT INVENTORY]: Adding item {0} {1} to folder {2}", item.Name, item.ID, item.Folder);
221 221
222 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 222 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
223 { 223 {
224 plugin.Value.addInventoryItem(item); 224 plugin.Value.addInventoryItem(item);
225 } 225 }
226 226
227 // FIXME: Should return false on failure 227 // FIXME: Should return false on failure
228 return true; 228 return true;
229 } 229 }
230 230
231 // See IInventoryServices 231 // See IInventoryServices
@@ -233,14 +233,14 @@ namespace OpenSim.Framework.Communications
233 { 233 {
234 m_log.InfoFormat( 234 m_log.InfoFormat(
235 "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder); 235 "[AGENT INVENTORY]: Updating item {0} {1} in folder {2}", item.Name, item.ID, item.Folder);
236 236
237 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 237 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
238 { 238 {
239 plugin.Value.updateInventoryItem(item); 239 plugin.Value.updateInventoryItem(item);
240 } 240 }
241 241
242 // FIXME: Should return false on failure 242 // FIXME: Should return false on failure
243 return true; 243 return true;
244 } 244 }
245 245
246 // See IInventoryServices 246 // See IInventoryServices
@@ -248,19 +248,19 @@ namespace OpenSim.Framework.Communications
248 { 248 {
249 m_log.InfoFormat( 249 m_log.InfoFormat(
250 "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder); 250 "[AGENT INVENTORY]: Deleting item {0} {1} from folder {2}", item.Name, item.ID, item.Folder);
251 251
252 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 252 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
253 { 253 {
254 plugin.Value.deleteInventoryItem(item.ID); 254 plugin.Value.deleteInventoryItem(item.ID);
255 } 255 }
256 256
257 // FIXME: Should return false on failure 257 // FIXME: Should return false on failure
258 return true; 258 return true;
259 } 259 }
260 260
261 /// <summary> 261 /// <summary>
262 /// Purge a folder of all items items and subfolders. 262 /// Purge a folder of all items items and subfolders.
263 /// 263 ///
264 /// FIXME: Really nasty in a sense, because we have to query the database to get information we may 264 /// FIXME: Really nasty in a sense, because we have to query the database to get information we may
265 /// already know... Needs heavy refactoring. 265 /// already know... Needs heavy refactoring.
266 /// </summary> 266 /// </summary>
@@ -269,13 +269,13 @@ namespace OpenSim.Framework.Communications
269 { 269 {
270 m_log.DebugFormat( 270 m_log.DebugFormat(
271 "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID); 271 "[AGENT INVENTORY]: Purging folder {0} {1} of its contents", folder.Name, folder.ID);
272 272
273 List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID); 273 List<InventoryFolderBase> subFolders = RequestSubFolders(folder.ID);
274 274
275 foreach (InventoryFolderBase subFolder in subFolders) 275 foreach (InventoryFolderBase subFolder in subFolders)
276 { 276 {
277// m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID); 277// m_log.DebugFormat("[AGENT INVENTORY]: Deleting folder {0} {1}", subFolder.Name, subFolder.ID);
278 278
279 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) 279 foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
280 { 280 {
281 plugin.Value.deleteInventoryFolder(subFolder.ID); 281 plugin.Value.deleteInventoryFolder(subFolder.ID);
@@ -288,17 +288,17 @@ namespace OpenSim.Framework.Communications
288 { 288 {
289 DeleteItem(item); 289 DeleteItem(item);
290 } 290 }
291 291
292 // FIXME: Should return false on failure 292 // FIXME: Should return false on failure
293 return true; 293 return true;
294 } 294 }
295 295
296 private void AddNewInventorySet(UsersInventory inventory) 296 private void AddNewInventorySet(UsersInventory inventory)
297 { 297 {
298 foreach (InventoryFolderBase folder in inventory.Folders.Values) 298 foreach (InventoryFolderBase folder in inventory.Folders.Values)
299 { 299 {
300 AddFolder(folder); 300 AddFolder(folder);
301 } 301 }
302 } 302 }
303 303
304 /// <summary> 304 /// <summary>
@@ -340,7 +340,7 @@ namespace OpenSim.Framework.Communications
340 folder.Type = (short)AssetType.Bodypart; 340 folder.Type = (short)AssetType.Bodypart;
341 folder.Version = 1; 341 folder.Version = 1;
342 Folders.Add(folder.ID, folder); 342 Folders.Add(folder.ID, folder);
343 343
344 folder = new InventoryFolderBase(); 344 folder = new InventoryFolderBase();
345 folder.ParentID = rootFolder; 345 folder.ParentID = rootFolder;
346 folder.Owner = user; 346 folder.Owner = user;
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Communications
348 folder.Name = "Calling Cards"; 348 folder.Name = "Calling Cards";
349 folder.Type = (short)AssetType.CallingCard; 349 folder.Type = (short)AssetType.CallingCard;
350 folder.Version = 1; 350 folder.Version = 1;
351 Folders.Add(folder.ID, folder); 351 Folders.Add(folder.ID, folder);
352 352
353 folder = new InventoryFolderBase(); 353 folder = new InventoryFolderBase();
354 folder.ParentID = rootFolder; 354 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
31 /// Interface for strategies that can limit requests from the client. Currently only used in the 31 /// Interface for strategies that can limit requests from the client. Currently only used in the
32 /// texture modules to deal with repeated requests for certain textures. However, limiting strategies 32 /// texture modules to deal with repeated requests for certain textures. However, limiting strategies
33 /// could be used with other requests. 33 /// could be used with other requests.
34 /// </summary> 34 /// </summary>
35 public interface IRequestLimitStrategy<TId> 35 public interface IRequestLimitStrategy<TId>
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// Should the request be allowed? If the id is not monitored, then the request is always allowed. 38 /// Should the request be allowed? If the id is not monitored, then the request is always allowed.
39 /// Otherwise, the strategy criteria will be applied. 39 /// Otherwise, the strategy criteria will be applied.
@@ -41,21 +41,21 @@ namespace OpenSim.Framework.Communications.Limit
41 /// <param name="id"></param> 41 /// <param name="id"></param>
42 /// <returns></returns> 42 /// <returns></returns>
43 bool AllowRequest(TId id); 43 bool AllowRequest(TId id);
44 44
45 /// <summary> 45 /// <summary>
46 /// Has the request been refused just once? 46 /// Has the request been refused just once?
47 /// </summary> 47 /// </summary>
48 /// <returns>False if the request has not yet been refused, or if the request has been refused more 48 /// <returns>False if the request has not yet been refused, or if the request has been refused more
49 /// than once.</returns> 49 /// than once.</returns>
50 bool IsFirstRefusal(TId id); 50 bool IsFirstRefusal(TId id);
51 51
52 /// <summary> 52 /// <summary>
53 /// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring 53 /// Start monitoring for future AllowRequest calls. If the id is already monitored, then monitoring
54 /// continues. 54 /// continues.
55 /// </summary> 55 /// </summary>
56 /// <param name="id"></param> 56 /// <param name="id"></param>
57 void MonitorRequests(TId id); 57 void MonitorRequests(TId id);
58 58
59 /// <summary> 59 /// <summary>
60 /// Is the id being monitored? 60 /// Is the id being monitored?
61 /// </summary> 61 /// </summary>
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 @@
26 */ 26 */
27 27
28namespace OpenSim.Framework.Communications.Limit 28namespace OpenSim.Framework.Communications.Limit
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// Strategy which polices no limits 31 /// Strategy which polices no limits
32 /// </summary> 32 /// </summary>
33 public class NullLimitStrategy<TId> : IRequestLimitStrategy<TId> 33 public class NullLimitStrategy<TId> : IRequestLimitStrategy<TId>
34 { 34 {
35 public bool AllowRequest(TId id) { return true; } 35 public bool AllowRequest(TId id) { return true; }
36 public bool IsFirstRefusal(TId id) { return false; } 36 public bool IsFirstRefusal(TId id) { return false; }
37 public void MonitorRequests(TId id) { /* intentionally blank */ } 37 public void MonitorRequests(TId id) { /* intentionally blank */ }
38 public bool IsMonitoringRequests(TId id) { return false; } 38 public bool IsMonitoringRequests(TId id) { return false; }
39 } 39 }
40} 40}
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
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// Limit requests by discarding them after they've been repeated a certain number of times. 33 /// Limit requests by discarding them after they've been repeated a certain number of times.
34 /// </summary> 34 /// </summary>
35 public class RepeatLimitStrategy<TId> : IRequestLimitStrategy<TId> 35 public class RepeatLimitStrategy<TId> : IRequestLimitStrategy<TId>
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// Record each asset request that we're notified about. 38 /// Record each asset request that we're notified about.
39 /// </summary> 39 /// </summary>
40 private readonly Dictionary<TId, int> requestCounts = new Dictionary<TId, int>(); 40 private readonly Dictionary<TId, int> requestCounts = new Dictionary<TId, int>();
41 41
42 /// <summary> 42 /// <summary>
43 /// The maximum number of requests that can be made before we drop subsequent requests. 43 /// The maximum number of requests that can be made before we drop subsequent requests.
44 /// </summary> 44 /// </summary>
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Limit
47 { 47 {
48 get { return m_maxRequests; } 48 get { return m_maxRequests; }
49 } 49 }
50 50
51 /// <summary></summary> 51 /// <summary></summary>
52 /// <param name="maxRequests">The maximum number of requests that may be served before all further 52 /// <param name="maxRequests">The maximum number of requests that may be served before all further
53 /// requests are dropped.</param> 53 /// requests are dropped.</param>
@@ -55,52 +55,52 @@ namespace OpenSim.Framework.Communications.Limit
55 { 55 {
56 m_maxRequests = maxRequests; 56 m_maxRequests = maxRequests;
57 } 57 }
58 58
59 /// <summary> 59 /// <summary>
60 /// <see cref="IRequestLimitStrategy"/> 60 /// <see cref="IRequestLimitStrategy"/>
61 /// </summary> 61 /// </summary>
62 public bool AllowRequest(TId id) 62 public bool AllowRequest(TId id)
63 { 63 {
64 if (requestCounts.ContainsKey(id)) 64 if (requestCounts.ContainsKey(id))
65 { 65 {
66 requestCounts[id] += 1; 66 requestCounts[id] += 1;
67 67
68 if (requestCounts[id] > m_maxRequests) 68 if (requestCounts[id] > m_maxRequests)
69 { 69 {
70 return false; 70 return false;
71 } 71 }
72 } 72 }
73 73
74 return true; 74 return true;
75 } 75 }
76 76
77 /// <summary> 77 /// <summary>
78 /// <see cref="IRequestLimitStrategy"/> 78 /// <see cref="IRequestLimitStrategy"/>
79 /// </summary> 79 /// </summary>
80 public bool IsFirstRefusal(TId id) 80 public bool IsFirstRefusal(TId id)
81 { 81 {
82 if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id]) 82 if (requestCounts.ContainsKey(id) && m_maxRequests + 1 == requestCounts[id])
83 { 83 {
84 return true; 84 return true;
85 } 85 }
86 86
87 return false; 87 return false;
88 } 88 }
89 89
90 /// <summary> 90 /// <summary>
91 /// <see cref="IRequestLimitStrategy"/> 91 /// <see cref="IRequestLimitStrategy"/>
92 /// </summary> 92 /// </summary>
93 public void MonitorRequests(TId id) 93 public void MonitorRequests(TId id)
94 { 94 {
95 if (!IsMonitoringRequests(id)) 95 if (!IsMonitoringRequests(id))
96 { 96 {
97 requestCounts.Add(id, 1); 97 requestCounts.Add(id, 1);
98 } 98 }
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
102 /// <see cref="IRequestLimitStrategy"/> 102 /// <see cref="IRequestLimitStrategy"/>
103 /// </summary> 103 /// </summary>
104 public bool IsMonitoringRequests(TId id) 104 public bool IsMonitoringRequests(TId id)
105 { 105 {
106 return requestCounts.ContainsKey(id); 106 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
32{ 32{
33 /// <summary> 33 /// <summary>
34 /// Limit requests by discarding repeat attempts that occur within a given time period 34 /// Limit requests by discarding repeat attempts that occur within a given time period
35 /// 35 ///
36 /// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests 36 /// XXX Don't use this for limiting texture downloading, at least not until we better handle multiple requests
37 /// for the same texture at different resolutions. 37 /// for the same texture at different resolutions.
38 /// </summary> 38 /// </summary>
39 public class TimeLimitStrategy<TId> : IRequestLimitStrategy<TId> 39 public class TimeLimitStrategy<TId> : IRequestLimitStrategy<TId>
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// Record the time at which an asset request occurs. 42 /// Record the time at which an asset request occurs.
43 /// </summary> 43 /// </summary>
44 private readonly Dictionary<TId, Request> requests = new Dictionary<TId, Request>(); 44 private readonly Dictionary<TId, Request> requests = new Dictionary<TId, Request>();
45 45
46 /// <summary> 46 /// <summary>
47 /// The minimum time period between which requests for the same data will be serviced. 47 /// The minimum time period between which requests for the same data will be serviced.
48 /// </summary> 48 /// </summary>
@@ -53,37 +53,37 @@ namespace OpenSim.Framework.Communications.Limit
53 } 53 }
54 54
55 /// <summary></summary> 55 /// <summary></summary>
56 /// <param name="repeatPeriod"></param> 56 /// <param name="repeatPeriod"></param>
57 public TimeLimitStrategy(TimeSpan repeatPeriod) 57 public TimeLimitStrategy(TimeSpan repeatPeriod)
58 { 58 {
59 m_repeatPeriod = repeatPeriod; 59 m_repeatPeriod = repeatPeriod;
60 } 60 }
61 61
62 /// <summary> 62 /// <summary>
63 /// <see cref="IRequestLimitStrategy"/> 63 /// <see cref="IRequestLimitStrategy"/>
64 /// </summary> 64 /// </summary>
65 public bool AllowRequest(TId id) 65 public bool AllowRequest(TId id)
66 { 66 {
67 if (IsMonitoringRequests(id)) 67 if (IsMonitoringRequests(id))
68 { 68 {
69 DateTime now = DateTime.Now; 69 DateTime now = DateTime.Now;
70 TimeSpan elapsed = now - requests[id].Time; 70 TimeSpan elapsed = now - requests[id].Time;
71 71
72 if (elapsed < RepeatPeriod) 72 if (elapsed < RepeatPeriod)
73 { 73 {
74 requests[id].Refusals += 1; 74 requests[id].Refusals += 1;
75 return false; 75 return false;
76 } 76 }
77 77
78 requests[id].Time = now; 78 requests[id].Time = now;
79 } 79 }
80 80
81 return true; 81 return true;
82 } 82 }
83 83
84 /// <summary> 84 /// <summary>
85 /// <see cref="IRequestLimitStrategy"/> 85 /// <see cref="IRequestLimitStrategy"/>
86 /// </summary> 86 /// </summary>
87 public bool IsFirstRefusal(TId id) 87 public bool IsFirstRefusal(TId id)
88 { 88 {
89 if (IsMonitoringRequests(id)) 89 if (IsMonitoringRequests(id))
@@ -92,31 +92,31 @@ namespace OpenSim.Framework.Communications.Limit
92 { 92 {
93 return true; 93 return true;
94 } 94 }
95 } 95 }
96 96
97 return false; 97 return false;
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// <see cref="IRequestLimitStrategy"/> 101 /// <see cref="IRequestLimitStrategy"/>
102 /// </summary> 102 /// </summary>
103 public void MonitorRequests(TId id) 103 public void MonitorRequests(TId id)
104 { 104 {
105 if (!IsMonitoringRequests(id)) 105 if (!IsMonitoringRequests(id))
106 { 106 {
107 requests.Add(id, new Request(DateTime.Now)); 107 requests.Add(id, new Request(DateTime.Now));
108 } 108 }
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
112 /// <see cref="IRequestLimitStrategy"/> 112 /// <see cref="IRequestLimitStrategy"/>
113 /// </summary> 113 /// </summary>
114 public bool IsMonitoringRequests(TId id) 114 public bool IsMonitoringRequests(TId id)
115 { 115 {
116 return requests.ContainsKey(id); 116 return requests.ContainsKey(id);
117 } 117 }
118 } 118 }
119 119
120 /// <summary> 120 /// <summary>
121 /// Private request details. 121 /// Private request details.
122 /// </summary> 122 /// </summary>
@@ -126,12 +126,12 @@ namespace OpenSim.Framework.Communications.Limit
126 /// Time of last request 126 /// Time of last request
127 /// </summary> 127 /// </summary>
128 public DateTime Time; 128 public DateTime Time;
129 129
130 /// <summary> 130 /// <summary>
131 /// Number of refusals associated with this request 131 /// Number of refusals associated with this request
132 /// </summary> 132 /// </summary>
133 public int Refusals; 133 public int Refusals;
134 134
135 public Request(DateTime time) 135 public Request(DateTime time)
136 { 136 {
137 Time = time; 137 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
239 "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", 239 "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.",
240 "false"); 240 "false");
241 } 241 }
242 242
243 /// <summary> 243 /// <summary>
244 /// Response to indicate that login failed because the agent's inventory was not available. 244 /// Response to indicate that login failed because the agent's inventory was not available.
245 /// </summary> 245 /// </summary>
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Communications
249 return GenerateFailureResponse( 249 return GenerateFailureResponse(
250 "key", 250 "key",
251 "The avatar inventory service is not responding. Please notify your login region operator.", 251 "The avatar inventory service is not responding. Please notify your login region operator.",
252 "false"); 252 "false");
253 } 253 }
254 254
255 public XmlRpcResponse CreateAlreadyLoggedInResponse() 255 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
48 48
49 protected string m_welcomeMessage = "Welcome to OpenSim"; 49 protected string m_welcomeMessage = "Welcome to OpenSim";
50 protected UserManagerBase m_userManager = null; 50 protected UserManagerBase m_userManager = null;
51 protected Mutex m_loginMutex = new Mutex(false); 51 protected Mutex m_loginMutex = new Mutex(false);
52 52
53 /// <summary> 53 /// <summary>
54 /// Used during login to send the skeleton of the OpenSim Library to the client. 54 /// Used during login to send the skeleton of the OpenSim Library to the client.
55 /// </summary> 55 /// </summary>
@@ -61,12 +61,12 @@ namespace OpenSim.Framework.Communications
61 /// <param name="userManager"></param> 61 /// <param name="userManager"></param>
62 /// <param name="libraryRootFolder"></param> 62 /// <param name="libraryRootFolder"></param>
63 /// <param name="welcomeMess"></param> 63 /// <param name="welcomeMess"></param>
64 public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder, 64 public LoginService(UserManagerBase userManager, LibraryRootFolder libraryRootFolder,
65 string welcomeMess) 65 string welcomeMess)
66 { 66 {
67 m_userManager = userManager; 67 m_userManager = userManager;
68 m_libraryRootFolder = libraryRootFolder; 68 m_libraryRootFolder = libraryRootFolder;
69 69
70 if (welcomeMess != String.Empty) 70 if (welcomeMess != String.Empty)
71 { 71 {
72 m_welcomeMessage = welcomeMess; 72 m_welcomeMessage = welcomeMess;
@@ -79,15 +79,15 @@ namespace OpenSim.Framework.Communications
79 /// <param name="response">The existing response</param> 79 /// <param name="response">The existing response</param>
80 /// <param name="theUser">The user profile</param> 80 /// <param name="theUser">The user profile</param>
81 public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest); 81 public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest);
82 82
83 /// <summary> 83 /// <summary>
84 /// Get the initial login inventory skeleton (in other words, the folder structure) for the given user. 84 /// Get the initial login inventory skeleton (in other words, the folder structure) for the given user.
85 /// </summary> 85 /// </summary>
86 /// <param name="userID"></param> 86 /// <param name="userID"></param>
87 /// <returns></returns> 87 /// <returns></returns>
88 /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception> 88 /// <exception cref='System.Exception'>This will be thrown if there is a problem with the inventory service</exception>
89 protected abstract InventoryData GetInventorySkeleton(LLUUID userID); 89 protected abstract InventoryData GetInventorySkeleton(LLUUID userID);
90 90
91 /// <summary> 91 /// <summary>
92 /// Called when we receive the client's initial XMLRPC login_to_simulator request message 92 /// Called when we receive the client's initial XMLRPC login_to_simulator request message
93 /// </summary> 93 /// </summary>
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications
112 112
113 UserProfileData userProfile; 113 UserProfileData userProfile;
114 LoginResponse logResponse = new LoginResponse(); 114 LoginResponse logResponse = new LoginResponse();
115 115
116 string firstname = String.Empty; 116 string firstname = String.Empty;
117 string lastname = String.Empty; 117 string lastname = String.Empty;
118 118
@@ -120,23 +120,23 @@ namespace OpenSim.Framework.Communications
120 { 120 {
121 firstname = (string) requestData["first"]; 121 firstname = (string) requestData["first"];
122 lastname = (string) requestData["last"]; 122 lastname = (string) requestData["last"];
123 123
124 m_log.InfoFormat( 124 m_log.InfoFormat(
125 "[LOGIN BEGIN]: Received login request message from user {0} {1}", 125 "[LOGIN BEGIN]: Received login request message from user {0} {1}",
126 firstname, lastname); 126 firstname, lastname);
127 127
128 string clientVersion = "Unknown"; 128 string clientVersion = "Unknown";
129 129
130 if (requestData.Contains("version")) 130 if (requestData.Contains("version"))
131 { 131 {
132 clientVersion = (string)requestData["version"]; 132 clientVersion = (string)requestData["version"];
133 } 133 }
134 134
135 if (requestData.Contains("start")) 135 if (requestData.Contains("start"))
136 { 136 {
137 startLocationRequest = (string)requestData["start"]; 137 startLocationRequest = (string)requestData["start"];
138 } 138 }
139 139
140 m_log.DebugFormat( 140 m_log.DebugFormat(
141 "[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest); 141 "[LOGIN]: Client is {0}, start location is {1}", clientVersion, startLocationRequest);
142 142
@@ -163,9 +163,9 @@ namespace OpenSim.Framework.Communications
163 catch (Exception e) 163 catch (Exception e)
164 { 164 {
165 m_log.InfoFormat( 165 m_log.InfoFormat(
166 "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}", 166 "[LOGIN END]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
167 requestData["web_login_key"], firstname, lastname, e); 167 requestData["web_login_key"], firstname, lastname, e);
168 168
169 return logResponse.CreateFailedResponse(); 169 return logResponse.CreateFailedResponse();
170 } 170 }
171 GoodLogin = AuthenticateUser(userProfile, webloginkey); 171 GoodLogin = AuthenticateUser(userProfile, webloginkey);
@@ -176,14 +176,14 @@ namespace OpenSim.Framework.Communications
176 { 176 {
177 m_log.Info( 177 m_log.Info(
178 "[LOGIN END]: login_to_simulator login message did not contain all the required data"); 178 "[LOGIN END]: login_to_simulator login message did not contain all the required data");
179 179
180 return logResponse.CreateGridErrorResponse(); 180 return logResponse.CreateGridErrorResponse();
181 } 181 }
182 182
183 if (!GoodLogin) 183 if (!GoodLogin)
184 { 184 {
185 m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname); 185 m_log.InfoFormat("[LOGIN END]: User {0} {1} failed authentication", firstname, lastname);
186 186
187 return logResponse.CreateLoginFailedResponse(); 187 return logResponse.CreateLoginFailedResponse();
188 } 188 }
189 else 189 else
@@ -199,11 +199,11 @@ namespace OpenSim.Framework.Communications
199 m_userManager.CommitAgent(ref userProfile); 199 m_userManager.CommitAgent(ref userProfile);
200 200
201 // Reject the login 201 // Reject the login
202 202
203 m_log.InfoFormat( 203 m_log.InfoFormat(
204 "[LOGIN END]: Notifying user {0} {1} that they are already logged in", 204 "[LOGIN END]: Notifying user {0} {1} that they are already logged in",
205 firstname, lastname); 205 firstname, lastname);
206 206
207 return logResponse.CreateAlreadyLoggedInResponse(); 207 return logResponse.CreateAlreadyLoggedInResponse();
208 } 208 }
209 // Otherwise... 209 // Otherwise...
@@ -214,9 +214,9 @@ namespace OpenSim.Framework.Communications
214 { 214 {
215 LLUUID agentID = userProfile.ID; 215 LLUUID agentID = userProfile.ID;
216 InventoryData inventData = null; 216 InventoryData inventData = null;
217 217
218 try 218 try
219 { 219 {
220 inventData = GetInventorySkeleton(agentID); 220 inventData = GetInventorySkeleton(agentID);
221 } 221 }
222 catch (Exception e) 222 catch (Exception e)
@@ -224,10 +224,10 @@ namespace OpenSim.Framework.Communications
224 m_log.ErrorFormat( 224 m_log.ErrorFormat(
225 "[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}", 225 "[LOGIN END]: Error retrieving inventory skeleton of agent {0}, {1} - {2}",
226 agentID, e.GetType(), e.Message); 226 agentID, e.GetType(), e.Message);
227 227
228 return logResponse.CreateLoginInventoryFailedResponse(); 228 return logResponse.CreateLoginInventoryFailedResponse();
229 } 229 }
230 230
231 ArrayList AgentInventoryArray = inventData.InventoryArray; 231 ArrayList AgentInventoryArray = inventData.InventoryArray;
232 232
233 Hashtable InventoryRootHash = new Hashtable(); 233 Hashtable InventoryRootHash = new Hashtable();
@@ -235,7 +235,7 @@ namespace OpenSim.Framework.Communications
235 ArrayList InventoryRoot = new ArrayList(); 235 ArrayList InventoryRoot = new ArrayList();
236 InventoryRoot.Add(InventoryRootHash); 236 InventoryRoot.Add(InventoryRootHash);
237 userProfile.RootInventoryFolderID = inventData.RootFolderID; 237 userProfile.RootInventoryFolderID = inventData.RootFolderID;
238 238
239 // Inventory Library Section 239 // Inventory Library Section
240 Hashtable InventoryLibRootHash = new Hashtable(); 240 Hashtable InventoryLibRootHash = new Hashtable();
241 InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; 241 InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
@@ -244,10 +244,10 @@ namespace OpenSim.Framework.Communications
244 logResponse.InventoryLibRoot = InventoryLibRoot; 244 logResponse.InventoryLibRoot = InventoryLibRoot;
245 245
246 logResponse.InventoryLibraryOwner = GetLibraryOwner(); 246 logResponse.InventoryLibraryOwner = GetLibraryOwner();
247 247
248 logResponse.InventoryRoot = InventoryRoot; 248 logResponse.InventoryRoot = InventoryRoot;
249 logResponse.InventorySkeleton = AgentInventoryArray; 249 logResponse.InventorySkeleton = AgentInventoryArray;
250 logResponse.InventoryLibrary = GetInventoryLibrary(); 250 logResponse.InventoryLibrary = GetInventoryLibrary();
251 251
252 // Circuit Code 252 // Circuit Code
253 uint circode = (uint) (Util.RandomClass.Next()); 253 uint circode = (uint) (Util.RandomClass.Next());
@@ -280,15 +280,15 @@ namespace OpenSim.Framework.Communications
280 //return logResponse.ToXmlRpcResponse(); 280 //return logResponse.ToXmlRpcResponse();
281 } 281 }
282 CommitAgent(ref userProfile); 282 CommitAgent(ref userProfile);
283 283
284 // If we reach this point, then the login has successfully logged onto the grid 284 // If we reach this point, then the login has successfully logged onto the grid
285 if (StatsManager.UserStats != null) 285 if (StatsManager.UserStats != null)
286 StatsManager.UserStats.AddSuccessfulLogin(); 286 StatsManager.UserStats.AddSuccessfulLogin();
287 287
288 m_log.DebugFormat( 288 m_log.DebugFormat(
289 "[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.", 289 "[LOGIN END]: Authentication of user {0} {1} successful. Sending response to client.",
290 firstname, lastname); 290 firstname, lastname);
291 291
292 return logResponse.ToXmlRpcResponse(); 292 return logResponse.ToXmlRpcResponse();
293 } 293 }
294 catch (Exception e) 294 catch (Exception e)
@@ -422,10 +422,10 @@ namespace OpenSim.Framework.Communications
422 } 422 }
423 423
424 CommitAgent(ref userProfile); 424 CommitAgent(ref userProfile);
425 425
426 // If we reach this point, then the login has successfully logged onto the grid 426 // If we reach this point, then the login has successfully logged onto the grid
427 if (StatsManager.UserStats != null) 427 if (StatsManager.UserStats != null)
428 StatsManager.UserStats.AddSuccessfulLogin(); 428 StatsManager.UserStats.AddSuccessfulLogin();
429 429
430 return logResponse.ToLLSDResponse(); 430 return logResponse.ToLLSDResponse();
431 } 431 }
@@ -449,7 +449,7 @@ namespace OpenSim.Framework.Communications
449 // period, space, parens, and dash. 449 // period, space, parens, and dash.
450 450
451 Regex wfcut = new Regex("[^a-zA-Z0-9_\\.\\$ \\(\\)\\-]"); 451 Regex wfcut = new Regex("[^a-zA-Z0-9_\\.\\$ \\(\\)\\-]");
452 452
453 Hashtable returnactions = new Hashtable(); 453 Hashtable returnactions = new Hashtable();
454 int statuscode = 200; 454 int statuscode = 200;
455 455
@@ -467,7 +467,7 @@ namespace OpenSim.Framework.Communications
467 // the client requires the HTML form field be named 'username' 467 // the client requires the HTML form field be named 'username'
468 // however, the data it sends when it loads the first time is 'firstname' 468 // however, the data it sends when it loads the first time is 'firstname'
469 // another one of those little nuances. 469 // another one of those little nuances.
470 470
471 if (keysvals.Contains("firstname")) 471 if (keysvals.Contains("firstname"))
472 firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999); 472 firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999);
473 473
@@ -494,7 +494,7 @@ namespace OpenSim.Framework.Communications
494 494
495 if (keysvals.Contains("lang")) 495 if (keysvals.Contains("lang"))
496 lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999); 496 lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999);
497 497
498 if (keysvals.Contains("password")) 498 if (keysvals.Contains("password"))
499 password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999); 499 password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999);
500 500
@@ -541,8 +541,8 @@ namespace OpenSim.Framework.Communications
541 return returnactions; 541 return returnactions;
542 } 542 }
543 543
544 public string GetLoginForm(string firstname, string lastname, string location, string region, 544 public string GetLoginForm(string firstname, string lastname, string location, string region,
545 string grid, string channel, string version, string lang, 545 string grid, string channel, string version, string lang,
546 string password, string errormessages) 546 string password, string errormessages)
547 { 547 {
548 // inject our values in the form at the markers 548 // inject our values in the form at the markers
@@ -559,7 +559,7 @@ namespace OpenSim.Framework.Communications
559 loginform = sr.ReadToEnd(); 559 loginform = sr.ReadToEnd();
560 sr.Close(); 560 sr.Close();
561 } 561 }
562 562
563 loginform = loginform.Replace("[$firstname]", firstname); 563 loginform = loginform.Replace("[$firstname]", firstname);
564 loginform = loginform.Replace("[$lastname]", lastname); 564 loginform = loginform.Replace("[$lastname]", lastname);
565 loginform = loginform.Replace("[$location]", location); 565 loginform = loginform.Replace("[$location]", location);
@@ -586,7 +586,7 @@ namespace OpenSim.Framework.Communications
586 responseString += "<title>OpenSim Login</title>"; 586 responseString += "<title>OpenSim Login</title>";
587 responseString += "<body><br />"; 587 responseString += "<body><br />";
588 responseString += "<div id=\"login_box\">"; 588 responseString += "<div id=\"login_box\">";
589 589
590 responseString += "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">"; 590 responseString += "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">";
591 591
592 responseString += "<div id=\"message\">[$errors]</div>"; 592 responseString += "<div id=\"message\">[$errors]</div>";
@@ -670,13 +670,13 @@ namespace OpenSim.Framework.Communications
670 password = "$1$" + Util.Md5Hash(password); 670 password = "$1$" + Util.Md5Hash(password);
671 671
672 password = password.Remove(0, 3); //remove $1$ 672 password = password.Remove(0, 3); //remove $1$
673 673
674 string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); 674 string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
675 // Testing... 675 // Testing...
676 //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); 676 //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash);
677 //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); 677 //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
678 678
679 passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) 679 passwordSuccess = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
680 || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); 680 || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
681 681
682 return passwordSuccess; 682 return passwordSuccess;
@@ -694,7 +694,7 @@ namespace OpenSim.Framework.Communications
694 } 694 }
695 695
696 /// <summary> 696 /// <summary>
697 /// 697 ///
698 /// </summary> 698 /// </summary>
699 /// <param name="profile"></param> 699 /// <param name="profile"></param>
700 /// <param name="request"></param> 700 /// <param name="request"></param>
@@ -709,7 +709,7 @@ namespace OpenSim.Framework.Communications
709 } 709 }
710 710
711 /// <summary> 711 /// <summary>
712 /// 712 ///
713 /// </summary> 713 /// </summary>
714 /// <param name="firstname"></param> 714 /// <param name="firstname"></param>
715 /// <param name="lastname"></param> 715 /// <param name="lastname"></param>
@@ -720,7 +720,7 @@ namespace OpenSim.Framework.Communications
720 } 720 }
721 721
722 /// <summary> 722 /// <summary>
723 /// 723 ///
724 /// </summary> 724 /// </summary>
725 /// <returns></returns> 725 /// <returns></returns>
726 public virtual string GetMessage() 726 public virtual string GetMessage()
@@ -741,17 +741,17 @@ namespace OpenSim.Framework.Communications
741 } 741 }
742 return buddylistreturn; 742 return buddylistreturn;
743 } 743 }
744 744
745 /// <summary> 745 /// <summary>
746 /// Converts the inventory library skeleton into the form required by the rpc request. 746 /// Converts the inventory library skeleton into the form required by the rpc request.
747 /// </summary> 747 /// </summary>
748 /// <returns></returns> 748 /// <returns></returns>
749 protected virtual ArrayList GetInventoryLibrary() 749 protected virtual ArrayList GetInventoryLibrary()
750 { 750 {
751 Dictionary<LLUUID, InventoryFolderImpl> rootFolders 751 Dictionary<LLUUID, InventoryFolderImpl> rootFolders
752 = m_libraryRootFolder.RequestSelfAndDescendentFolders(); 752 = m_libraryRootFolder.RequestSelfAndDescendentFolders();
753 ArrayList folderHashes = new ArrayList(); 753 ArrayList folderHashes = new ArrayList();
754 754
755 foreach (InventoryFolderBase folder in rootFolders.Values) 755 foreach (InventoryFolderBase folder in rootFolders.Values)
756 { 756 {
757 Hashtable TempHash = new Hashtable(); 757 Hashtable TempHash = new Hashtable();
@@ -762,12 +762,12 @@ namespace OpenSim.Framework.Communications
762 TempHash["folder_id"] = folder.ID.ToString(); 762 TempHash["folder_id"] = folder.ID.ToString();
763 folderHashes.Add(TempHash); 763 folderHashes.Add(TempHash);
764 } 764 }
765 765
766 return folderHashes; 766 return folderHashes;
767 } 767 }
768 768
769 /// <summary> 769 /// <summary>
770 /// 770 ///
771 /// </summary> 771 /// </summary>
772 /// <returns></returns> 772 /// <returns></returns>
773 protected virtual ArrayList GetLibraryOwner() 773 protected virtual ArrayList GetLibraryOwner()
diff --git a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
index 9a53499..2df5fbc 100644
--- a/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
+++ b/OpenSim/Framework/Communications/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30 30
31// General Information about an assembly is controlled through the following 31// General information about an assembly is controlled through the following
32// set of attributes. Change these attribute values to modify the information 32// set of attributes. Change these attribute values to modify the information
33// associated with an assembly. 33// associated with an assembly.
34 34
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
41[assembly : AssemblyTrademark("")] 41[assembly : AssemblyTrademark("")]
42[assembly : AssemblyCulture("")] 42[assembly : AssemblyCulture("")]
43 43
44// Setting ComVisible to false makes the types in this assembly not visible 44// Setting ComVisible to false makes the types in this assembly not visible
45// to COM components. If you need to access a type in this assembly from 45// to COM components. If you need to access a type in this assembly from
46// COM, set the ComVisible attribute to true on that type. 46// COM, set the ComVisible attribute to true on that type.
47 47
48[assembly : ComVisible(false)] 48[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
54// Version information for an assembly consists of the following four values: 54// Version information for an assembly consists of the following four values:
55// 55//
56// Major Version 56// Major Version
57// Minor Version 57// Minor Version
58// Build Number 58// Build Number
59// Revision 59// Revision
60// 60//
61// You can specify all the values or you can default the Revision and Build Numbers 61// You can specify all the values or you can default the Revision and Build Numbers
62// by using the '*' as shown below: 62// by using the '*' as shown below:
63 63
64[assembly : AssemblyVersion("1.0.0.0")] 64[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index 4ed62bf..7c8876a 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -16,14 +16,14 @@ namespace OpenSim.Framework.Communications
16 /// <remarks> 16 /// <remarks>
17 /// This class is a generic implementation of a REST (Representational State Transfer) web service. This 17 /// This class is a generic implementation of a REST (Representational State Transfer) web service. This
18 /// class is designed to execute both synchronously and asynchronously. 18 /// class is designed to execute both synchronously and asynchronously.
19 /// 19 ///
20 /// Internally the implementation works as a two stage asynchronous web-client. 20 /// Internally the implementation works as a two stage asynchronous web-client.
21 /// When the request is initiated, RestClient will query asynchronously for for a web-response, 21 /// When the request is initiated, RestClient will query asynchronously for for a web-response,
22 /// sleeping until the initial response is returned by the server. Once the initial response is retrieved 22 /// sleeping until the initial response is returned by the server. Once the initial response is retrieved
23 /// the second stage of asynchronous requests will be triggered, in an attempt to read of the response 23 /// the second stage of asynchronous requests will be triggered, in an attempt to read of the response
24 /// object into a memorystream as a sequence of asynchronous reads. 24 /// object into a memorystream as a sequence of asynchronous reads.
25 /// 25 ///
26 /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing 26 /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing
27 /// other threads to execute, while it waits for a response from the web-service. RestClient itself can be 27 /// other threads to execute, while it waits for a response from the web-service. RestClient itself can be
28 /// invoked by the caller in either synchronous mode or asynchronous modes. 28 /// invoked by the caller in either synchronous mode or asynchronous modes.
29 /// </remarks> 29 /// </remarks>
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Communications
36 #region member variables 36 #region member variables
37 37
38 /// <summary> 38 /// <summary>
39 /// The base Uri of the web-service e.g. http://www.google.com 39 /// The base Uri of the web-service e.g. http://www.google.com
40 /// </summary> 40 /// </summary>
41 private string _url; 41 private string _url;
42 42
@@ -92,7 +92,7 @@ namespace OpenSim.Framework.Communications
92 92
93 93
94 /// <summary> 94 /// <summary>
95 /// if an exception occours during async processing, we need to save it, so it can be 95 /// if an exception occours during async processing, we need to save it, so it can be
96 /// rethrown on the primary thread; 96 /// rethrown on the primary thread;
97 /// </summary> 97 /// </summary>
98 private Exception _asyncException; 98 private Exception _asyncException;
@@ -341,7 +341,7 @@ namespace OpenSim.Framework.Communications
341 { 341 {
342 AsyncResult<Stream> ar = (AsyncResult<Stream>) asyncResult; 342 AsyncResult<Stream> ar = (AsyncResult<Stream>) asyncResult;
343 343
344 // Wait for operation to complete, then return result or 344 // Wait for operation to complete, then return result or
345 // throw exception 345 // throw exception
346 return ar.EndInvoke(); 346 return ar.EndInvoke();
347 } 347 }
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 8e0b75c..5a62682 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications
43 /// </summary> 43 /// </summary>
44 public abstract class UserManagerBase : IUserService 44 public abstract class UserManagerBase : IUserService
45 { 45 {
46 private static readonly ILog m_log 46 private static readonly ILog m_log
47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 public UserConfig _config; 49 public UserConfig _config;
50 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); 50 private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
51 51
52 /// <summary> 52 /// <summary>
53 /// Adds a new user server plugin - user servers will be requested in the order they were loaded. 53 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
54 /// </summary> 54 /// </summary>
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.Communications
85 m_log.Info("[USERSTORAGE]: Added IUserData Interface"); 85 m_log.Info("[USERSTORAGE]: Added IUserData Interface");
86 } 86 }
87 87
88 #region Get UserProfile 88 #region Get UserProfile
89 89
90 // see IUserService 90 // see IUserService
91 public UserProfileData GetUserProfile(string fname, string lname) 91 public UserProfileData GetUserProfile(string fname, string lname)
@@ -103,8 +103,8 @@ namespace OpenSim.Framework.Communications
103 103
104 return null; 104 return null;
105 } 105 }
106 106
107 // see IUserService 107 // see IUserService
108 public UserProfileData GetUserProfile(LLUUID uuid) 108 public UserProfileData GetUserProfile(LLUUID uuid)
109 { 109 {
110 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 110 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
@@ -408,7 +408,7 @@ namespace OpenSim.Framework.Communications
408 408
409 profile.CurrentAgent = agent; 409 profile.CurrentAgent = agent;
410 } 410 }
411 411
412 /// <summary> 412 /// <summary>
413 /// Process a user logoff from OpenSim. 413 /// Process a user logoff from OpenSim.
414 /// </summary> 414 /// </summary>
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications
422 { 422 {
423 if (StatsManager.UserStats != null) 423 if (StatsManager.UserStats != null)
424 StatsManager.UserStats.AddLogout(); 424 StatsManager.UserStats.AddLogout();
425 425
426 UserProfileData userProfile; 426 UserProfileData userProfile;
427 UserAgentData userAgent; 427 UserAgentData userAgent;
428 LLVector3 currentPos = new LLVector3(posx, posy, posz); 428 LLVector3 currentPos = new LLVector3(posx, posy, posz);
@@ -433,7 +433,7 @@ namespace OpenSim.Framework.Communications
433 { 433 {
434 // This line needs to be in side the above if statement or the UserServer will crash on some logouts. 434 // This line needs to be in side the above if statement or the UserServer will crash on some logouts.
435 m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); 435 m_log.Info("[LOGOUT]: " + userProfile.FirstName + " " + userProfile.SurName + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")");
436 436
437 userAgent = userProfile.CurrentAgent; 437 userAgent = userProfile.CurrentAgent;
438 if (userAgent != null) 438 if (userAgent != null)
439 { 439 {
@@ -462,7 +462,7 @@ namespace OpenSim.Framework.Communications
462 m_log.Warn("[LOGOUT]: Unknown User logged out"); 462 m_log.Warn("[LOGOUT]: Unknown User logged out");
463 } 463 }
464 } 464 }
465 465
466 public void CreateAgent(UserProfileData profile, LLSD request) 466 public void CreateAgent(UserProfileData profile, LLSD request)
467 { 467 {
468 UserAgentData agent = new UserAgentData(); 468 UserAgentData agent = new UserAgentData();
@@ -516,7 +516,7 @@ namespace OpenSim.Framework.Communications
516 #endregion 516 #endregion
517 517
518 /// <summary> 518 /// <summary>
519 /// 519 ///
520 /// </summary> 520 /// </summary>
521 /// <param name="user"></param> 521 /// <param name="user"></param>
522 public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 522 public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
@@ -598,7 +598,7 @@ namespace OpenSim.Framework.Communications
598 598
599 /// Appearance 599 /// Appearance
600 /// TODO: stubs for now to get us to a compiling state gently 600 /// TODO: stubs for now to get us to a compiling state gently
601 public AvatarAppearance GetUserAppearance(LLUUID user) 601 public AvatarAppearance GetUserAppearance(LLUUID user)
602 { 602 {
603 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 603 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
604 { 604 {
@@ -643,7 +643,7 @@ namespace OpenSim.Framework.Communications
643 } 643 }
644 } 644 }
645 } 645 }
646 646
647 public void RemoveAttachment(LLUUID user, LLUUID item) 647 public void RemoveAttachment(LLUUID user, LLUUID item)
648 { 648 {
649 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 649 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
@@ -658,7 +658,7 @@ namespace OpenSim.Framework.Communications
658 } 658 }
659 } 659 }
660 } 660 }
661 661
662 public List<LLUUID> GetAttachments(LLUUID user) 662 public List<LLUUID> GetAttachments(LLUUID user)
663 { 663 {
664 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 664 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 79fe1d4..74e64e3 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Framework.Console
58 } 58 }
59 59
60 /// <summary> 60 /// <summary>
61 /// derive an ansi color from a string, ignoring the darker colors. 61 /// derive an ansi color from a string, ignoring the darker colors.
62 /// This is used to help automatically bin component tags with colors 62 /// This is used to help automatically bin component tags with colors
63 /// in various print functions. 63 /// in various print functions.
64 /// </summary> 64 /// </summary>
@@ -195,7 +195,7 @@ namespace OpenSim.Framework.Console
195 System.Console.WriteLine(args); 195 System.Console.WriteLine(args);
196 } 196 }
197 } 197 }
198 } 198 }
199 catch (ObjectDisposedException) 199 catch (ObjectDisposedException)
200 { 200 {
201 } 201 }
@@ -232,7 +232,7 @@ namespace OpenSim.Framework.Console
232 { 232 {
233 } 233 }
234 } 234 }
235 235
236 public string ReadLine() 236 public string ReadLine()
237 { 237 {
238 try 238 try
@@ -245,7 +245,7 @@ namespace OpenSim.Framework.Console
245 return String.Empty; 245 return String.Empty;
246 } 246 }
247 } 247 }
248 248
249 public int Read() 249 public int Read()
250 { 250 {
251 return System.Console.Read(); 251 return System.Console.Read();
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs
index d381179..ddd6d9a 100644
--- a/OpenSim/Framework/Console/OpenSimAppender.cs
+++ b/OpenSim/Framework/Console/OpenSimAppender.cs
@@ -40,32 +40,32 @@ namespace OpenSim.Framework.Console
40 string loggingMessage = RenderLoggingEvent(le); 40 string loggingMessage = RenderLoggingEvent(le);
41 41
42 string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)"; 42 string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
43 43
44 Regex RE = new Regex(regex, RegexOptions.Multiline); 44 Regex RE = new Regex(regex, RegexOptions.Multiline);
45 MatchCollection matches = RE.Matches(loggingMessage); 45 MatchCollection matches = RE.Matches(loggingMessage);
46 // Get some direct matches $1 $4 is a 46 // Get some direct matches $1 $4 is a
47 if (matches.Count == 1) 47 if (matches.Count == 1)
48 { 48 {
49 System.Console.Write(matches[0].Groups["Front"].Value); 49 System.Console.Write(matches[0].Groups["Front"].Value);
50 System.Console.Write("["); 50 System.Console.Write("[");
51 51
52 WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value); 52 WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), matches[0].Groups["Category"].Value);
53 System.Console.Write("]:"); 53 System.Console.Write("]:");
54 54
55 if (le.Level == Level.Error) 55 if (le.Level == Level.Error)
56 { 56 {
57 WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value); 57 WriteColorText(ConsoleColor.Red, matches[0].Groups["End"].Value);
58 } 58 }
59 else if (le.Level == Level.Warn) 59 else if (le.Level == Level.Warn)
60 { 60 {
61 WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value); 61 WriteColorText(ConsoleColor.Yellow, matches[0].Groups["End"].Value);
62 } 62 }
63 else 63 else
64 { 64 {
65 System.Console.Write(matches[0].Groups["End"].Value); 65 System.Console.Write(matches[0].Groups["End"].Value);
66 } 66 }
67 System.Console.WriteLine(); 67 System.Console.WriteLine();
68 } 68 }
69 else 69 else
70 { 70 {
71 System.Console.Write(loggingMessage); 71 System.Console.Write(loggingMessage);
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 098e721..343b5a6 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Framework
156 } 156 }
157 157
158 /// <summary> 158 /// <summary>
159 /// 159 ///
160 /// </summary> 160 /// </summary>
161 public IScene Scene 161 public IScene Scene
162 { 162 {
@@ -181,7 +181,7 @@ namespace OpenSim.Framework
181 } 181 }
182 182
183 /// <summary> 183 /// <summary>
184 /// 184 ///
185 /// </summary> 185 /// </summary>
186 public uint PacketNumber 186 public uint PacketNumber
187 { 187 {
@@ -190,7 +190,7 @@ namespace OpenSim.Framework
190 } 190 }
191 191
192 /// <summary> 192 /// <summary>
193 /// 193 ///
194 /// </summary> 194 /// </summary>
195 public sbyte DiscardLevel 195 public sbyte DiscardLevel
196 { 196 {
@@ -199,7 +199,7 @@ namespace OpenSim.Framework
199 } 199 }
200 200
201 /// <summary> 201 /// <summary>
202 /// 202 ///
203 /// </summary> 203 /// </summary>
204 public LLUUID RequestedAssetID 204 public LLUUID RequestedAssetID
205 { 205 {
@@ -213,7 +213,7 @@ namespace OpenSim.Framework
213 private List<Wearable> m_nowWearing = new List<Wearable>(); 213 private List<Wearable> m_nowWearing = new List<Wearable>();
214 214
215 /// <summary> 215 /// <summary>
216 /// 216 ///
217 /// </summary> 217 /// </summary>
218 public List<Wearable> NowWearing 218 public List<Wearable> NowWearing
219 { 219 {
@@ -381,7 +381,7 @@ namespace OpenSim.Framework
381 public delegate void ImprovedInstantMessage(IClientAPI remoteclient, 381 public delegate void ImprovedInstantMessage(IClientAPI remoteclient,
382 LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, 382 LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp,
383 string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, 383 string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID,
384 LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... 384 LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down...
385 // especially if we're ever going to implement groups, presence, estate message dialogs... 385 // especially if we're ever going to implement groups, presence, estate message dialogs...
386 386
387 public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 387 public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart,
@@ -607,7 +607,7 @@ namespace OpenSim.Framework
607 public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); 607 public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID);
608 608
609 public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID); 609 public delegate void ForceReleaseControls(IClientAPI remoteClient, LLUUID agentID);
610 610
611 //Estate Requests 611 //Estate Requests
612 public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice); 612 public delegate void DetailedEstateDataRequest(IClientAPI remoteClient, LLUUID invoice);
613 public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges); 613 public delegate void SetEstateFlagsRequest(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, int matureLevel, bool restrictPushObject, bool allowParcelChanges);
@@ -764,7 +764,7 @@ namespace OpenSim.Framework
764 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 764 event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
765 event ParcelSelectObjects OnParcelSelectObjects; 765 event ParcelSelectObjects OnParcelSelectObjects;
766 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 766 event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
767 event ParcelAbandonRequest OnParcelAbandonRequest; 767 event ParcelAbandonRequest OnParcelAbandonRequest;
768 event RegionInfoRequest OnRegionInfoRequest; 768 event RegionInfoRequest OnRegionInfoRequest;
769 event EstateCovenantRequest OnEstateCovenantRequest; 769 event EstateCovenantRequest OnEstateCovenantRequest;
770 770
@@ -808,7 +808,7 @@ namespace OpenSim.Framework
808 event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; 808 event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
809 809
810 810
811 811
812 [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] 812 [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")]
813 void OutPacket(Packet newPack, ThrottleOutPacketType packType); 813 void OutPacket(Packet newPack, ThrottleOutPacketType packType);
814 void SendWearables(AvatarWearable[] wearables, int serial); 814 void SendWearables(AvatarWearable[] wearables, int serial);
@@ -858,16 +858,16 @@ namespace OpenSim.Framework
858 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint); 858 void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint);
859 void SetChildAgentThrottle(byte[] throttle); 859 void SetChildAgentThrottle(byte[] throttle);
860 860
861 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 861 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
862 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, 862 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel,
863 uint flags, 863 uint flags,
864 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, 864 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
865 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId); 865 byte clickAction, byte[] textureanim, bool attachment, uint AttachPoint, LLUUID AssetId);
866
867 866
868 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 867
868 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
869 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, 869 LLVector3 pos, LLVector3 vel, LLVector3 acc, LLQuaternion rotation, LLVector3 rvel,
870 uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 870 uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
871 uint parentID, byte[] particleSystem, byte clickAction); 871 uint parentID, byte[] particleSystem, byte clickAction);
872 872
873 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 873 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
@@ -889,7 +889,7 @@ namespace OpenSim.Framework
889 void SendInventoryItemCreateUpdate(InventoryItemBase Item); 889 void SendInventoryItemCreateUpdate(InventoryItemBase Item);
890 890
891 void SendRemoveInventoryItem(LLUUID itemID); 891 void SendRemoveInventoryItem(LLUUID itemID);
892 892
893 void SendTakeControls(int controls, bool passToAgent, bool TakeControls); 893 void SendTakeControls(int controls, bool passToAgent, bool TakeControls);
894 894
895 void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); 895 void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
@@ -950,7 +950,7 @@ namespace OpenSim.Framework
950 void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID); 950 void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID);
951 void SendConfirmXfer(ulong xferID, uint PacketID); 951 void SendConfirmXfer(ulong xferID, uint PacketID);
952 void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName); 952 void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName);
953 953
954 void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec); 954 void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec);
955 955
956 void SendShutdownConnectionNotice(); 956 void SendShutdownConnectionNotice();
@@ -973,9 +973,9 @@ namespace OpenSim.Framework
973 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook); 973 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook);
974 974
975 void SendAdminResponse(LLUUID Token, uint AdminLevel); 975 void SendAdminResponse(LLUUID Token, uint AdminLevel);
976 976
977 void SendGroupMembership(GroupData[] GroupMembership); 977 void SendGroupMembership(GroupData[] GroupMembership);
978 978
979 979
980 byte[] GetThrottlesPacked(float multiplier); 980 byte[] GetThrottlesPacked(float multiplier);
981 981
diff --git a/OpenSim/Framework/IClientAPI2.cs b/OpenSim/Framework/IClientAPI2.cs
index 684f3e8..aa70dc3 100644
--- a/OpenSim/Framework/IClientAPI2.cs
+++ b/OpenSim/Framework/IClientAPI2.cs
@@ -5,14 +5,14 @@ namespace OpenSim.Framework
5 #region Args Classes 5 #region Args Classes
6 public class ICA2_ConnectionArgs : EventArgs 6 public class ICA2_ConnectionArgs : EventArgs
7 { 7 {
8 8
9 } 9 }
10 10
11 public class ICA2_DisconnectionArgs : EventArgs 11 public class ICA2_DisconnectionArgs : EventArgs
12 { 12 {
13 public bool Forced; 13 public bool Forced;
14 14
15 // Static Constructor 15 // Static Constructor
16 // Allows us to recycle these classes later more easily from a pool. 16 // Allows us to recycle these classes later more easily from a pool.
17 public static ICA2_DisconnectionArgs Create(bool forced) 17 public static ICA2_DisconnectionArgs Create(bool forced)
18 { 18 {
diff --git a/OpenSim/Framework/IInventoryData.cs b/OpenSim/Framework/IInventoryData.cs
index f283085..fabcbe2 100644
--- a/OpenSim/Framework/IInventoryData.cs
+++ b/OpenSim/Framework/IInventoryData.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Framework
120 void updateInventoryItem(InventoryItemBase item); 120 void updateInventoryItem(InventoryItemBase item);
121 121
122 /// <summary> 122 /// <summary>
123 /// 123 ///
124 /// </summary> 124 /// </summary>
125 /// <param name="item"></param> 125 /// <param name="item"></param>
126 void deleteInventoryItem(LLUUID item); 126 void deleteInventoryItem(LLUUID item);
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs
index be05094..0b25f7e 100644
--- a/OpenSim/Framework/IUserData.cs
+++ b/OpenSim/Framework/IUserData.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Framework
87 void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey); 87 void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey);
88 88
89 /// <summary> 89 /// <summary>
90 /// Adds a new User profile to the database 90 /// Adds a new User profile to the database
91 /// </summary> 91 /// </summary>
92 /// <param name="user">UserProfile to add</param> 92 /// <param name="user">UserProfile to add</param>
93 void AddNewUserProfile(UserProfileData user); 93 void AddNewUserProfile(UserProfileData user);
@@ -181,8 +181,8 @@ namespace OpenSim.Framework
181 AvatarAppearance GetUserAppearance(LLUUID user); 181 AvatarAppearance GetUserAppearance(LLUUID user);
182 182
183 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 183 void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance);
184 184
185 185
186 void AddAttachment(LLUUID user, LLUUID item); 186 void AddAttachment(LLUUID user, LLUUID item);
187 void RemoveAttachment(LLUUID user, LLUUID item); 187 void RemoveAttachment(LLUUID user, LLUUID item);
188 List<LLUUID> GetAttachments(LLUUID user); 188 List<LLUUID> GetAttachments(LLUUID user);
diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs
index 910f7da..31bb02f 100644
--- a/OpenSim/Framework/InventoryFolderBase.cs
+++ b/OpenSim/Framework/InventoryFolderBase.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework
50 private LLUUID _owner; 50 private LLUUID _owner;
51 51
52 /// <summary> 52 /// <summary>
53 /// The folder this folder is contained in 53 /// The folder this folder is contained in
54 /// </summary> 54 /// </summary>
55 private LLUUID _parentID; 55 private LLUUID _parentID;
56 56
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index dbf2085..8d873db 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Framework
45 private int _assetType; 45 private int _assetType;
46 46
47 /// <summary> 47 /// <summary>
48 /// 48 ///
49 /// </summary> 49 /// </summary>
50 private uint _basePermissions; 50 private uint _basePermissions;
51 51
@@ -69,12 +69,12 @@ namespace OpenSim.Framework
69 private string _description; 69 private string _description;
70 70
71 /// <summary> 71 /// <summary>
72 /// 72 ///
73 /// </summary> 73 /// </summary>
74 private uint _everyOnePermissions; 74 private uint _everyOnePermissions;
75 75
76 /// <summary> 76 /// <summary>
77 /// The folder this item is contained in 77 /// The folder this item is contained in
78 /// </summary> 78 /// </summary>
79 private LLUUID _folder; 79 private LLUUID _folder;
80 80
@@ -93,34 +93,34 @@ namespace OpenSim.Framework
93 /// </summary> 93 /// </summary>
94 private string _name; 94 private string _name;
95 95
96 96
97 /// <summary> 97 /// <summary>
98 /// 98 ///
99 /// </summary> 99 /// </summary>
100 private LLUUID _groupID; 100 private LLUUID _groupID;
101 101
102 /// <summary> 102 /// <summary>
103 /// 103 ///
104 /// </summary> 104 /// </summary>
105 private bool _groupOwned; 105 private bool _groupOwned;
106 106
107 /// <summary> 107 /// <summary>
108 /// 108 ///
109 /// </summary> 109 /// </summary>
110 private int _salePrice; 110 private int _salePrice;
111 111
112 /// <summary> 112 /// <summary>
113 /// 113 ///
114 /// </summary> 114 /// </summary>
115 private byte _saleType; 115 private byte _saleType;
116 116
117 /// <summary> 117 /// <summary>
118 /// 118 ///
119 /// </summary> 119 /// </summary>
120 private uint _flags; 120 private uint _flags;
121 121
122 /// <summary> 122 /// <summary>
123 /// 123 ///
124 /// </summary> 124 /// </summary>
125 public int _creationDate; 125 public int _creationDate;
126 126
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs
index 422c939..c4c5813 100644
--- a/OpenSim/Framework/RegionCommsListener.cs
+++ b/OpenSim/Framework/RegionCommsListener.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Framework
63 #endregion 63 #endregion
64 64
65 /// <summary> 65 /// <summary>
66 /// 66 ///
67 /// </summary> 67 /// </summary>
68 /// <param name="agent"></param> 68 /// <param name="agent"></param>
69 /// <returns></returns> 69 /// <returns></returns>
@@ -171,7 +171,7 @@ namespace OpenSim.Framework
171 } 171 }
172 172
173 /// <summary> 173 /// <summary>
174 /// 174 ///
175 /// </summary> 175 /// </summary>
176 /// <remarks>TODO: Doesnt take any args??</remarks> 176 /// <remarks>TODO: Doesnt take any args??</remarks>
177 /// <returns></returns> 177 /// <returns></returns>
@@ -188,7 +188,7 @@ namespace OpenSim.Framework
188 } 188 }
189 189
190 /// <summary> 190 /// <summary>
191 /// 191 ///
192 /// </summary> 192 /// </summary>
193 /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks> 193 /// <remarks>Added to avoid a unused compiler warning on OnNeighboursUpdate, TODO: Check me</remarks>
194 /// <param name="neighbours"></param> 194 /// <param name="neighbours"></param>
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 158ddde..d9d41d6 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
37 [Serializable] 37 [Serializable]
38 public class SimpleRegionInfo 38 public class SimpleRegionInfo
39 { 39 {
40 // private static readonly log4net.ILog m_log 40 // private static readonly log4net.ILog m_log
41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 41 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42 42
43 protected bool Allow_Alternate_Ports; 43 protected bool Allow_Alternate_Ports;
@@ -114,7 +114,7 @@ namespace OpenSim.Framework
114 114
115 /// <value> 115 /// <value>
116 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. 116 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
117 /// 117 ///
118 /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method? 118 /// XXX Isn't this really doing too much to be a simple getter, rather than an explict method?
119 /// </value> 119 /// </value>
120 public IPEndPoint ExternalEndPoint 120 public IPEndPoint ExternalEndPoint
@@ -187,7 +187,7 @@ namespace OpenSim.Framework
187 187
188 public class RegionInfo : SimpleRegionInfo 188 public class RegionInfo : SimpleRegionInfo
189 { 189 {
190 // private static readonly log4net.ILog m_log 190 // private static readonly log4net.ILog m_log
191 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 191 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
192 192
193 public bool commFailTF = false; 193 public bool commFailTF = false;
@@ -327,7 +327,7 @@ namespace OpenSim.Framework
327 327
328 if (errorMessage != String.Empty) 328 if (errorMessage != String.Empty)
329 { 329 {
330 // a error 330 // a error
331 } 331 }
332 } 332 }
333 333
diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs
index cb0911e..4f56d52 100644
--- a/OpenSim/Framework/Remoting.cs
+++ b/OpenSim/Framework/Remoting.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Framework
87 87
88 /// <summary> 88 /// <summary>
89 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message. 89 /// Signs a new bit of data with the current hash. Returns a byte array which should be affixed to the message.
90 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the 90 /// Signing a piece of data will automatically increment the hash - if you sign data and do not send it, the
91 /// hashes will get out of sync and throw an exception when validation is attempted. 91 /// hashes will get out of sync and throw an exception when validation is attempted.
92 /// </summary> 92 /// </summary>
93 /// <param name="data">The outgoing data</param> 93 /// <param name="data">The outgoing data</param>
diff --git a/OpenSim/Framework/SerializableInventory.cs b/OpenSim/Framework/SerializableInventory.cs
index 81f993c..fcf13a8 100644
--- a/OpenSim/Framework/SerializableInventory.cs
+++ b/OpenSim/Framework/SerializableInventory.cs
@@ -30,7 +30,7 @@ using System.Xml.Serialization;
30 30
31namespace OpenSim.Framework 31namespace OpenSim.Framework
32{ 32{
33 /* 33 /*
34 * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder 34 * .Net has some issues, serializing a dictionary, so we cannot reuse the InventoryFolder
35 * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize 35 * class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
36 * into this simpler class, and then use that. 36 * into this simpler class, and then use that.
diff --git a/OpenSim/Framework/SerializableRegionInfo.cs b/OpenSim/Framework/SerializableRegionInfo.cs
index 44081b2..4965a43 100644
--- a/OpenSim/Framework/SerializableRegionInfo.cs
+++ b/OpenSim/Framework/SerializableRegionInfo.cs
@@ -40,8 +40,8 @@ namespace OpenSim.Framework
40 40
41 /// <value> 41 /// <value>
42 /// The port by which http communication occurs with the region (most noticeably, CAPS communication) 42 /// The port by which http communication occurs with the region (most noticeably, CAPS communication)
43 /// 43 ///
44 /// FIXME: Defaulting to 9000 temporarily (on the basis that this is the http port most region 44 /// FIXME: Defaulting to 9000 temporarily (on the basis that this is the http port most region
45 /// servers are running) until the revision in which this change is made propogates around grids. 45 /// servers are running) until the revision in which this change is made propogates around grids.
46 /// </value> 46 /// </value>
47 protected uint m_httpPort = 9000; 47 protected uint m_httpPort = 9000;
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 50f4e23..1eb1da9 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -82,10 +82,10 @@ namespace OpenSim.Framework.Servers
82 string path = handler.Path; 82 string path = handler.Path;
83 83
84 string handlerKey = GetHandlerKey(httpMethod, path); 84 string handlerKey = GetHandlerKey(httpMethod, path);
85 85
86 if (!m_streamHandlers.ContainsKey(handlerKey)) 86 if (!m_streamHandlers.ContainsKey(handlerKey))
87 { 87 {
88 //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey); 88 //m_log.DebugFormat("[BASE HTTP SERVER]: Adding handler key {0}", handlerKey);
89 m_streamHandlers.Add(handlerKey, handler); 89 m_streamHandlers.Add(handlerKey, handler);
90 } 90 }
91 } 91 }
@@ -135,20 +135,20 @@ namespace OpenSim.Framework.Servers
135 try 135 try
136 { 136 {
137 HttpListenerContext context = (HttpListenerContext) stateinfo; 137 HttpListenerContext context = (HttpListenerContext) stateinfo;
138 138
139 HttpListenerRequest request = context.Request; 139 HttpListenerRequest request = context.Request;
140 HttpListenerResponse response = context.Response; 140 HttpListenerResponse response = context.Response;
141 141
142 response.KeepAlive = false; 142 response.KeepAlive = false;
143 response.SendChunked = false; 143 response.SendChunked = false;
144 144
145 string path = request.RawUrl; 145 string path = request.RawUrl;
146 string handlerKey = GetHandlerKey(request.HttpMethod, path); 146 string handlerKey = GetHandlerKey(request.HttpMethod, path);
147 147
148 //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); 148 //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
149 149
150 IRequestHandler requestHandler; 150 IRequestHandler requestHandler;
151 151
152 if (TryGetStreamHandler(handlerKey, out requestHandler)) 152 if (TryGetStreamHandler(handlerKey, out requestHandler))
153 { 153 {
154 // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler. 154 // Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
@@ -156,13 +156,13 @@ namespace OpenSim.Framework.Servers
156 if (requestHandler is IStreamedRequestHandler) 156 if (requestHandler is IStreamedRequestHandler)
157 { 157 {
158 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; 158 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
159 159
160 buffer = streamedRequestHandler.Handle(path, request.InputStream); 160 buffer = streamedRequestHandler.Handle(path, request.InputStream);
161 } 161 }
162 else 162 else
163 { 163 {
164 IStreamHandler streamHandler = (IStreamHandler) requestHandler; 164 IStreamHandler streamHandler = (IStreamHandler) requestHandler;
165 165
166 using (MemoryStream memoryStream = new MemoryStream()) 166 using (MemoryStream memoryStream = new MemoryStream())
167 { 167 {
168 streamHandler.Handle(path, request.InputStream, memoryStream); 168 streamHandler.Handle(path, request.InputStream, memoryStream);
@@ -170,11 +170,11 @@ namespace OpenSim.Framework.Servers
170 buffer = memoryStream.ToArray(); 170 buffer = memoryStream.ToArray();
171 } 171 }
172 } 172 }
173 173
174 request.InputStream.Close(); 174 request.InputStream.Close();
175 response.ContentType = requestHandler.ContentType; 175 response.ContentType = requestHandler.ContentType;
176 response.ContentLength64 = buffer.LongLength; 176 response.ContentLength64 = buffer.LongLength;
177 177
178 try 178 try
179 { 179 {
180 response.OutputStream.Write(buffer, 0, buffer.Length); 180 response.OutputStream.Write(buffer, 0, buffer.Length);
@@ -273,7 +273,7 @@ namespace OpenSim.Framework.Servers
273 return true; 273 return true;
274 } 274 }
275 } 275 }
276 276
277 /// <summary> 277 /// <summary>
278 /// Try all the registered xmlrpc handlers when an xmlrpc request is received. 278 /// Try all the registered xmlrpc handlers when an xmlrpc request is received.
279 /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method. 279 /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method.
@@ -434,7 +434,7 @@ namespace OpenSim.Framework.Servers
434 { 434 {
435 // This is a test. There's a workable alternative.. as this way sucks. 435 // This is a test. There's a workable alternative.. as this way sucks.
436 // We'd like to put this into a text file parhaps that's easily editable. 436 // We'd like to put this into a text file parhaps that's easily editable.
437 // 437 //
438 // For this test to work, I used the following secondlife.exe parameters 438 // For this test to work, I used the following secondlife.exe parameters
439 // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2 439 // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2
440 // 440 //
@@ -461,7 +461,7 @@ namespace OpenSim.Framework.Servers
461 string[] querystringkeys = request.QueryString.AllKeys; 461 string[] querystringkeys = request.QueryString.AllKeys;
462 string[] rHeaders = request.Headers.AllKeys; 462 string[] rHeaders = request.Headers.AllKeys;
463 463
464 464
465 foreach (string queryname in querystringkeys) 465 foreach (string queryname in querystringkeys)
466 { 466 {
467 keysvals.Add(queryname, request.QueryString[queryname]); 467 keysvals.Add(queryname, request.QueryString[queryname]);
@@ -489,7 +489,7 @@ namespace OpenSim.Framework.Servers
489 { 489 {
490 Hashtable responsedata = requestprocessor(keysvals); 490 Hashtable responsedata = requestprocessor(keysvals);
491 DoHTTPGruntWork(responsedata,response); 491 DoHTTPGruntWork(responsedata,response);
492 492
493 //SendHTML500(response); 493 //SendHTML500(response);
494 } 494 }
495 else 495 else
@@ -519,7 +519,7 @@ namespace OpenSim.Framework.Servers
519 contentType = "text/html"; 519 contentType = "text/html";
520 } 520 }
521 521
522 // We're forgoing the usual error status codes here because the client 522 // We're forgoing the usual error status codes here because the client
523 // ignores anything but 200 and 301 523 // ignores anything but 200 and 301
524 524
525 response.StatusCode = 200; 525 response.StatusCode = 200;
@@ -649,10 +649,10 @@ namespace OpenSim.Framework.Servers
649 649
650 public void RemoveStreamHandler(string httpMethod, string path) 650 public void RemoveStreamHandler(string httpMethod, string path)
651 { 651 {
652 string handlerKey = GetHandlerKey(httpMethod, path); 652 string handlerKey = GetHandlerKey(httpMethod, path);
653 653
654 //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey); 654 //m_log.DebugFormat("[BASE HTTP SERVER]: Removing handler key {0}", handlerKey);
655 655
656 m_streamHandlers.Remove(handlerKey); 656 m_streamHandlers.Remove(handlerKey);
657 } 657 }
658 658
@@ -660,7 +660,7 @@ namespace OpenSim.Framework.Servers
660 { 660 {
661 m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); 661 m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path));
662 } 662 }
663 663
664 public string GetHTTP404(string host) 664 public string GetHTTP404(string host)
665 { 665 {
666 string file = Path.Combine(Util.configDir(), "http_404.html"); 666 string file = Path.Combine(Util.configDir(), "http_404.html");
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 811a0db..fcbc5a1 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -44,16 +44,16 @@ namespace OpenSim.Framework.Servers
44 { 44 {
45 get { return m_httpServer; } 45 get { return m_httpServer; }
46 } 46 }
47 47
48 /// <summary> 48 /// <summary>
49 /// Holds the non-viewer statistics collection object for this service/server 49 /// Holds the non-viewer statistics collection object for this service/server
50 /// </summary> 50 /// </summary>
51 protected IStatsCollector m_stats; 51 protected IStatsCollector m_stats;
52 52
53 public BaseOpenSimServer() 53 public BaseOpenSimServer()
54 { 54 {
55 m_startuptime = DateTime.Now; 55 m_startuptime = DateTime.Now;
56 } 56 }
57 57
58 /// <summary> 58 /// <summary>
59 /// Should be overriden by descendents if they need to perform extra shutdown processing 59 /// Should be overriden by descendents if they need to perform extra shutdown processing
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Servers
66 } 66 }
67 Environment.Exit(0); 67 Environment.Exit(0);
68 } 68 }
69 69
70 /// <summary> 70 /// <summary>
71 /// Runs commands issued by the server console from the operator 71 /// Runs commands issued by the server console from the operator
72 /// </summary> 72 /// </summary>
@@ -75,17 +75,17 @@ namespace OpenSim.Framework.Servers
75 public virtual void RunCmd(string command, string[] cmdparams) 75 public virtual void RunCmd(string command, string[] cmdparams)
76 { 76 {
77 switch (command) 77 switch (command)
78 { 78 {
79 case "help": 79 case "help":
80 Notice("quit - equivalent to shutdown."); 80 Notice("quit - equivalent to shutdown.");
81 81
82 if (m_stats != null) 82 if (m_stats != null)
83 Notice("show stats - statistical information for this server"); 83 Notice("show stats - statistical information for this server");
84 84
85 Notice("show uptime - show server startup and uptime."); 85 Notice("show uptime - show server startup and uptime.");
86 Notice("shutdown - shutdown the server.\n"); 86 Notice("shutdown - shutdown the server.\n");
87 break; 87 break;
88 88
89 case "show": 89 case "show":
90 if (cmdparams.Length > 0) 90 if (cmdparams.Length > 0)
91 { 91 {
@@ -96,10 +96,10 @@ namespace OpenSim.Framework.Servers
96 case "quit": 96 case "quit":
97 case "shutdown": 97 case "shutdown":
98 Shutdown(); 98 Shutdown();
99 break; 99 break;
100 } 100 }
101 } 101 }
102 102
103 /// <summary> 103 /// <summary>
104 /// Outputs to the console information about the region 104 /// Outputs to the console information about the region
105 /// </summary> 105 /// </summary>
@@ -107,18 +107,18 @@ namespace OpenSim.Framework.Servers
107 public virtual void Show(string ShowWhat) 107 public virtual void Show(string ShowWhat)
108 { 108 {
109 switch (ShowWhat) 109 switch (ShowWhat)
110 { 110 {
111 case "stats": 111 case "stats":
112 if (m_stats != null) 112 if (m_stats != null)
113 { 113 {
114 Notice(m_stats.Report()); 114 Notice(m_stats.Report());
115 } 115 }
116 break; 116 break;
117 117
118 case "uptime": 118 case "uptime":
119 Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); 119 Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString());
120 Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); 120 Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString());
121 break; 121 break;
122 } 122 }
123 } 123 }
124 124
diff --git a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs
index 1410afd..05bfaa1 100644
--- a/OpenSim/Framework/Servers/RestObjectPosterResponse.cs
+++ b/OpenSim/Framework/Servers/RestObjectPosterResponse.cs
@@ -38,12 +38,12 @@ namespace OpenSim.Framework.Servers
38 38
39 /// <summary> 39 /// <summary>
40 /// Makes an asynchronous REST request with a callback to invoke with the response. 40 /// Makes an asynchronous REST request with a callback to invoke with the response.
41 /// </summary> 41 /// </summary>
42 public class RestObjectPosterResponse<TResponse> 42 public class RestObjectPosterResponse<TResponse>
43 { 43 {
44// private static readonly log4net.ILog m_log 44// private static readonly log4net.ILog m_log
45// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 45// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public ReturnResponse<TResponse> ResponseCallback; 47 public ReturnResponse<TResponse> ResponseCallback;
48 48
49 public void BeginPostObject<TRequest>(string requestUrl, TRequest obj) 49 public void BeginPostObject<TRequest>(string requestUrl, TRequest obj)
@@ -87,11 +87,11 @@ namespace OpenSim.Framework.Servers
87 TResponse deserial; 87 TResponse deserial;
88 XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); 88 XmlSerializer deserializer = new XmlSerializer(typeof (TResponse));
89 Stream stream = resp.GetResponseStream(); 89 Stream stream = resp.GetResponseStream();
90 90
91 // This is currently a bad debug stanza since it gobbles us the response... 91 // This is currently a bad debug stanza since it gobbles us the response...
92// StreamReader reader = new StreamReader(stream); 92// StreamReader reader = new StreamReader(stream);
93// m_log.DebugFormat("[REST OBJECT POSTER RESPONSE]: Received {0}", reader.ReadToEnd()); 93// m_log.DebugFormat("[REST OBJECT POSTER RESPONSE]: Received {0}", reader.ReadToEnd());
94 94
95 deserial = (TResponse) deserializer.Deserialize(stream); 95 deserial = (TResponse) deserializer.Deserialize(stream);
96 96
97 if (deserial != null && ResponseCallback != null) 97 if (deserial != null && ResponseCallback != null)
diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs
index cab5208..76dbd73 100644
--- a/OpenSim/Framework/Servers/RestStreamHandler.cs
+++ b/OpenSim/Framework/Servers/RestStreamHandler.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Framework.Servers
34 { 34 {
35 private RestMethod m_restMethod; 35 private RestMethod m_restMethod;
36 36
37 public RestMethod Method 37 public RestMethod Method
38 { 38 {
39 get { return m_restMethod; } 39 get { return m_restMethod; }
40 } 40 }
diff --git a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
index 103fbe5..1b8e4ea 100644
--- a/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
+++ b/OpenSim/Framework/Servers/SynchronousRestObjectPoster.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Servers
75 using (WebResponse resp = request.GetResponse()) 75 using (WebResponse resp = request.GetResponse())
76 { 76 {
77 XmlSerializer deserializer = new XmlSerializer(typeof (TResponse)); 77 XmlSerializer deserializer = new XmlSerializer(typeof (TResponse));
78 deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream()); 78 deserial = (TResponse) deserializer.Deserialize(resp.GetResponseStream());
79 } 79 }
80 return deserial; 80 return deserial;
81 } 81 }
diff --git a/OpenSim/Framework/Statistics/AssetStatsCollector.cs b/OpenSim/Framework/Statistics/AssetStatsCollector.cs
index bd36c3f..ed6779d 100644
--- a/OpenSim/Framework/Statistics/AssetStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/AssetStatsCollector.cs
@@ -37,35 +37,35 @@ namespace OpenSim.Framework.Statistics
37 { 37 {
38 private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); 38 private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000);
39 private DateTime startTime = DateTime.Now; 39 private DateTime startTime = DateTime.Now;
40 40
41 private long assetRequestsToday; 41 private long assetRequestsToday;
42 private long assetRequestsNotFoundToday; 42 private long assetRequestsNotFoundToday;
43 private long assetRequestsYesterday; 43 private long assetRequestsYesterday;
44 private long assetRequestsNotFoundYesterday; 44 private long assetRequestsNotFoundYesterday;
45 45
46 public long AssetRequestsToday { get { return assetRequestsToday; } } 46 public long AssetRequestsToday { get { return assetRequestsToday; } }
47 public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } } 47 public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } }
48 public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } 48 public long AssetRequestsYesterday { get { return assetRequestsYesterday; } }
49 public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } } 49 public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } }
50 50
51 public AssetStatsCollector() 51 public AssetStatsCollector()
52 { 52 {
53 ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); 53 ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing);
54 ageStatsTimer.Enabled = true; 54 ageStatsTimer.Enabled = true;
55 } 55 }
56 56
57 private void OnAgeing(object source, ElapsedEventArgs e) 57 private void OnAgeing(object source, ElapsedEventArgs e)
58 { 58 {
59 assetRequestsYesterday = assetRequestsToday; 59 assetRequestsYesterday = assetRequestsToday;
60 60
61 // There is a possibility that an asset request could occur between the execution of these 61 // There is a possibility that an asset request could occur between the execution of these
62 // two statements. But we're better off without the synchronization overhead. 62 // two statements. But we're better off without the synchronization overhead.
63 assetRequestsToday = 0; 63 assetRequestsToday = 0;
64 64
65 assetRequestsNotFoundYesterday = assetRequestsNotFoundToday; 65 assetRequestsNotFoundYesterday = assetRequestsNotFoundToday;
66 assetRequestsNotFoundToday = 0; 66 assetRequestsNotFoundToday = 0;
67 } 67 }
68 68
69 /// <summary> 69 /// <summary>
70 /// Record that an asset request failed to find an asset 70 /// Record that an asset request failed to find an asset
71 /// </summary> 71 /// </summary>
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Statistics
73 { 73 {
74 assetRequestsNotFoundToday++; 74 assetRequestsNotFoundToday++;
75 } 75 }
76 76
77 /// <summary> 77 /// <summary>
78 /// Record that a request was made to the asset server 78 /// Record that a request was made to the asset server
79 /// </summary> 79 /// </summary>
@@ -90,10 +90,10 @@ namespace OpenSim.Framework.Statistics
90 { 90 {
91 double elapsedHours = (DateTime.Now - startTime).TotalHours; 91 double elapsedHours = (DateTime.Now - startTime).TotalHours;
92 if (elapsedHours <= 0) { elapsedHours = 1; } // prevent divide by zero 92 if (elapsedHours <= 0) { elapsedHours = 1; } // prevent divide by zero
93 93
94 long assetRequestsTodayPerHour = (long)Math.Round(AssetRequestsToday / elapsedHours); 94 long assetRequestsTodayPerHour = (long)Math.Round(AssetRequestsToday / elapsedHours);
95 long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0); 95 long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0);
96 96
97 return string.Format( 97 return string.Format(
98@"Asset requests today : {0} ({1} per hour) of which {2} were not found 98@"Asset requests today : {0} ({1} per hour) of which {2} were not found
99Asset requests yesterday : {3} ({4} per hour) of which {5} were not found", 99Asset requests yesterday : {3} ({4} per hour) of which {5} were not found",
diff --git a/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs b/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs
index 768cd22..e468fb2 100644
--- a/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/Interfaces/IStatsCollector.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28namespace OpenSim.Framework.Statistics 28namespace OpenSim.Framework.Statistics
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// Implemented by classes which collect up non-viewer statistical information 31 /// Implemented by classes which collect up non-viewer statistical information
32 /// </summary> 32 /// </summary>
@@ -36,6 +36,6 @@ namespace OpenSim.Framework.Statistics
36 /// Report back collected statistical information. 36 /// Report back collected statistical information.
37 /// </summary> 37 /// </summary>
38 /// <returns></returns> 38 /// <returns></returns>
39 string Report(); 39 string Report();
40 } 40 }
41} 41}
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
index fd021bc..2e7278b 100644
--- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs
@@ -32,20 +32,20 @@ using libsecondlife;
32using OpenSim.Framework.Statistics.Interfaces; 32using OpenSim.Framework.Statistics.Interfaces;
33 33
34namespace OpenSim.Framework.Statistics 34namespace OpenSim.Framework.Statistics
35{ 35{
36 /// <summary> 36 /// <summary>
37 /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane 37 /// Collects sim statistics which aren't already being collected for the linden viewer's statistics pane
38 /// </summary> 38 /// </summary>
39 public class SimExtraStatsCollector : IStatsCollector 39 public class SimExtraStatsCollector : IStatsCollector
40 { 40 {
41 private long assetsInCache; 41 private long assetsInCache;
42 private long texturesInCache; 42 private long texturesInCache;
43 private long assetCacheMemoryUsage; 43 private long assetCacheMemoryUsage;
44 private long textureCacheMemoryUsage; 44 private long textureCacheMemoryUsage;
45 private long blockedMissingTextureRequests; 45 private long blockedMissingTextureRequests;
46 46
47 private long inventoryServiceRetrievalFailures; 47 private long inventoryServiceRetrievalFailures;
48 48
49 public long AssetsInCache { get { return assetsInCache; } } 49 public long AssetsInCache { get { return assetsInCache; } }
50 public long TexturesInCache { get { return texturesInCache; } } 50 public long TexturesInCache { get { return texturesInCache; } }
51 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } 51 public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
@@ -58,47 +58,47 @@ namespace OpenSim.Framework.Statistics
58 /// driver bugs on clients (though this seems less likely). 58 /// driver bugs on clients (though this seems less likely).
59 /// </summary> 59 /// </summary>
60 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } 60 public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
61 61
62 /// <summary> 62 /// <summary>
63 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not 63 /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
64 /// cover situations where the inventory service accepts the request but never returns any data, since 64 /// cover situations where the inventory service accepts the request but never returns any data, since
65 /// we do not yet timeout this situation. 65 /// we do not yet timeout this situation.
66 /// </summary> 66 /// </summary>
67 public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } 67 public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
68 68
69 /// <summary> 69 /// <summary>
70 /// Retain a dictionary of all packet queues stats reporters 70 /// Retain a dictionary of all packet queues stats reporters
71 /// </summary> 71 /// </summary>
72 private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors 72 private IDictionary<LLUUID, PacketQueueStatsCollector> packetQueueStatsCollectors
73 = new Dictionary<LLUUID, PacketQueueStatsCollector>(); 73 = new Dictionary<LLUUID, PacketQueueStatsCollector>();
74 74
75 public void AddAsset(AssetBase asset) 75 public void AddAsset(AssetBase asset)
76 { 76 {
77 assetsInCache++; 77 assetsInCache++;
78 assetCacheMemoryUsage += asset.Data.Length; 78 assetCacheMemoryUsage += asset.Data.Length;
79 } 79 }
80 80
81 public void AddTexture(AssetBase image) 81 public void AddTexture(AssetBase image)
82 { 82 {
83 if (image.Data != null) 83 if (image.Data != null)
84 { 84 {
85 texturesInCache++; 85 texturesInCache++;
86 86
87 // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates 87 // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
88 textureCacheMemoryUsage += image.Data.Length; 88 textureCacheMemoryUsage += image.Data.Length;
89 } 89 }
90 } 90 }
91 91
92 public void AddBlockedMissingTextureRequest() 92 public void AddBlockedMissingTextureRequest()
93 { 93 {
94 blockedMissingTextureRequests++; 94 blockedMissingTextureRequests++;
95 } 95 }
96 96
97 public void AddInventoryServiceRetrievalFailure() 97 public void AddInventoryServiceRetrievalFailure()
98 { 98 {
99 inventoryServiceRetrievalFailures++; 99 inventoryServiceRetrievalFailures++;
100 } 100 }
101 101
102 /// <summary> 102 /// <summary>
103 /// Register as a packet queue stats provider 103 /// Register as a packet queue stats provider
104 /// </summary> 104 /// </summary>
@@ -111,7 +111,7 @@ namespace OpenSim.Framework.Statistics
111 packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider); 111 packetQueueStatsCollectors[uuid] = new PacketQueueStatsCollector(provider);
112 } 112 }
113 } 113 }
114 114
115 /// <summary> 115 /// <summary>
116 /// Deregister a packet queue stats provider 116 /// Deregister a packet queue stats provider
117 /// </summary> 117 /// </summary>
@@ -129,25 +129,25 @@ namespace OpenSim.Framework.Statistics
129 /// </summary> 129 /// </summary>
130 /// <returns></returns> 130 /// <returns></returns>
131 public string Report() 131 public string Report()
132 { 132 {
133 StringBuilder sb = new StringBuilder(Environment.NewLine); 133 StringBuilder sb = new StringBuilder(Environment.NewLine);
134 sb.Append("ASSET STATISTICS"); 134 sb.Append("ASSET STATISTICS");
135 sb.Append(Environment.NewLine); 135 sb.Append(Environment.NewLine);
136 sb.Append( 136 sb.Append(
137 string.Format( 137 string.Format(
138@"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine, 138@"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine,
139 AssetsInCache, AssetCacheMemoryUsage / 1024.0)); 139 AssetsInCache, AssetCacheMemoryUsage / 1024.0));
140 140
141 sb.Append(Environment.NewLine); 141 sb.Append(Environment.NewLine);
142 sb.Append("TEXTURE STATISTICS"); 142 sb.Append("TEXTURE STATISTICS");
143 sb.Append(Environment.NewLine); 143 sb.Append(Environment.NewLine);
144 sb.Append( 144 sb.Append(
145 string.Format( 145 string.Format(
146@"Texture cache contains {0,6} textures using {1,10:0.000}K 146@"Texture cache contains {0,6} textures using {1,10:0.000}K
147Blocked requests for missing textures: {2}" + Environment.NewLine, 147Blocked requests for missing textures: {2}" + Environment.NewLine,
148 TexturesInCache, TextureCacheMemoryUsage / 1024.0, 148 TexturesInCache, TextureCacheMemoryUsage / 1024.0,
149 BlockedMissingTextureRequests)); 149 BlockedMissingTextureRequests));
150 150
151 sb.Append(Environment.NewLine); 151 sb.Append(Environment.NewLine);
152 sb.Append("INVENTORY STATISTICS"); 152 sb.Append("INVENTORY STATISTICS");
153 sb.Append(Environment.NewLine); 153 sb.Append(Environment.NewLine);
@@ -155,26 +155,26 @@ Blocked requests for missing textures: {2}" + Environment.NewLine,
155 string.Format( 155 string.Format(
156 "Initial inventory caching failures: {0}" + Environment.NewLine, 156 "Initial inventory caching failures: {0}" + Environment.NewLine,
157 InventoryServiceRetrievalFailures)); 157 InventoryServiceRetrievalFailures));
158 158
159 sb.Append(Environment.NewLine); 159 sb.Append(Environment.NewLine);
160 sb.Append("PACKET QUEUE STATISTICS"); 160 sb.Append("PACKET QUEUE STATISTICS");
161 sb.Append(Environment.NewLine); 161 sb.Append(Environment.NewLine);
162 sb.Append("Agent UUID "); 162 sb.Append("Agent UUID ");
163 sb.Append( 163 sb.Append(
164 string.Format( 164 string.Format(
165 " {0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}", 165 " {0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7}",
166 "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset")); 166 "Send", "In", "Out", "Resend", "Land", "Wind", "Cloud", "Task", "Texture", "Asset"));
167 sb.Append(Environment.NewLine); 167 sb.Append(Environment.NewLine);
168 168
169 foreach (LLUUID key in packetQueueStatsCollectors.Keys) 169 foreach (LLUUID key in packetQueueStatsCollectors.Keys)
170 { 170 {
171 sb.Append(string.Format("{0}: ", key)); 171 sb.Append(string.Format("{0}: ", key));
172 sb.Append(packetQueueStatsCollectors[key].Report()); 172 sb.Append(packetQueueStatsCollectors[key].Report());
173 sb.Append(Environment.NewLine); 173 sb.Append(Environment.NewLine);
174 } 174 }
175 175
176 return sb.ToString(); 176 return sb.ToString();
177 } 177 }
178 } 178 }
179 179
180 /// <summary> 180 /// <summary>
@@ -183,16 +183,16 @@ Blocked requests for missing textures: {2}" + Environment.NewLine,
183 public class PacketQueueStatsCollector : IStatsCollector 183 public class PacketQueueStatsCollector : IStatsCollector
184 { 184 {
185 private IPullStatsProvider m_statsProvider; 185 private IPullStatsProvider m_statsProvider;
186 186
187 public PacketQueueStatsCollector(IPullStatsProvider provider) 187 public PacketQueueStatsCollector(IPullStatsProvider provider)
188 { 188 {
189 m_statsProvider = provider; 189 m_statsProvider = provider;
190 } 190 }
191 191
192 /// <summary> 192 /// <summary>
193 /// Report back collected statistical information. 193 /// Report back collected statistical information.
194 /// </summary> 194 /// </summary>
195 /// <returns></returns> 195 /// <returns></returns>
196 public string Report() 196 public string Report()
197 { 197 {
198 return m_statsProvider.GetStats(); 198 return m_statsProvider.GetStats();
diff --git a/OpenSim/Framework/Statistics/StatsManager.cs b/OpenSim/Framework/Statistics/StatsManager.cs
index 3c97dde..41de3f3 100644
--- a/OpenSim/Framework/Statistics/StatsManager.cs
+++ b/OpenSim/Framework/Statistics/StatsManager.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28namespace OpenSim.Framework.Statistics 28namespace OpenSim.Framework.Statistics
29{ 29{
30 /// <summary> 30 /// <summary>
31 /// Singleton used to provide access to statistics reporters 31 /// Singleton used to provide access to statistics reporters
32 /// </summary> 32 /// </summary>
@@ -34,44 +34,44 @@ namespace OpenSim.Framework.Statistics
34 { 34 {
35 private static AssetStatsCollector assetStats; 35 private static AssetStatsCollector assetStats;
36 private static UserStatsCollector userStats; 36 private static UserStatsCollector userStats;
37 private static SimExtraStatsCollector simExtraStats; 37 private static SimExtraStatsCollector simExtraStats;
38 38
39 public static AssetStatsCollector AssetStats { get { return assetStats; } } 39 public static AssetStatsCollector AssetStats { get { return assetStats; } }
40 public static UserStatsCollector UserStats { get { return userStats; } } 40 public static UserStatsCollector UserStats { get { return userStats; } }
41 public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } 41 public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } }
42 42
43 private StatsManager() {} 43 private StatsManager() {}
44 44
45 /// <summary> 45 /// <summary>
46 /// Start collecting statistics related to assets. 46 /// Start collecting statistics related to assets.
47 /// Should only be called once. 47 /// Should only be called once.
48 /// </summary> 48 /// </summary>
49 public static AssetStatsCollector StartCollectingAssetStats() 49 public static AssetStatsCollector StartCollectingAssetStats()
50 { 50 {
51 assetStats = new AssetStatsCollector(); 51 assetStats = new AssetStatsCollector();
52 52
53 return assetStats; 53 return assetStats;
54 } 54 }
55 55
56 /// <summary> 56 /// <summary>
57 /// Start collecting statistics related to users. 57 /// Start collecting statistics related to users.
58 /// Should only be called once. 58 /// Should only be called once.
59 /// </summary> 59 /// </summary>
60 public static UserStatsCollector StartCollectingUserStats() 60 public static UserStatsCollector StartCollectingUserStats()
61 { 61 {
62 userStats = new UserStatsCollector(); 62 userStats = new UserStatsCollector();
63 63
64 return userStats; 64 return userStats;
65 } 65 }
66 66
67 /// <summary> 67 /// <summary>
68 /// Start collecting extra sim statistics apart from those collected for the client. 68 /// Start collecting extra sim statistics apart from those collected for the client.
69 /// Should only be called once. 69 /// Should only be called once.
70 /// </summary> 70 /// </summary>
71 public static SimExtraStatsCollector StartCollectingSimExtraStats() 71 public static SimExtraStatsCollector StartCollectingSimExtraStats()
72 { 72 {
73 simExtraStats = new SimExtraStatsCollector(); 73 simExtraStats = new SimExtraStatsCollector();
74 74
75 return simExtraStats; 75 return simExtraStats;
76 } 76 }
77 } 77 }
diff --git a/OpenSim/Framework/Statistics/UserStatsCollector.cs b/OpenSim/Framework/Statistics/UserStatsCollector.cs
index f0f0417..c7fe7c2 100644
--- a/OpenSim/Framework/Statistics/UserStatsCollector.cs
+++ b/OpenSim/Framework/Statistics/UserStatsCollector.cs
@@ -35,43 +35,43 @@ namespace OpenSim.Framework.Statistics
35 public class UserStatsCollector : IStatsCollector 35 public class UserStatsCollector : IStatsCollector
36 { 36 {
37 private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); 37 private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000);
38 38
39 private int successfulLoginsToday; 39 private int successfulLoginsToday;
40 public int SuccessfulLoginsToday { get { return successfulLoginsToday; } } 40 public int SuccessfulLoginsToday { get { return successfulLoginsToday; } }
41 41
42 private int successfulLoginsYesterday; 42 private int successfulLoginsYesterday;
43 public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } } 43 public int SuccessfulLoginsYesterday { get { return successfulLoginsYesterday; } }
44 44
45 private int successfulLogins; 45 private int successfulLogins;
46 public int SuccessfulLogins { get { return successfulLogins; } } 46 public int SuccessfulLogins { get { return successfulLogins; } }
47 47
48 private int logouts; 48 private int logouts;
49 public int Logouts { get { return logouts; } } 49 public int Logouts { get { return logouts; } }
50 50
51 public UserStatsCollector() 51 public UserStatsCollector()
52 { 52 {
53 ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing); 53 ageStatsTimer.Elapsed += new ElapsedEventHandler(OnAgeing);
54 ageStatsTimer.Enabled = true; 54 ageStatsTimer.Enabled = true;
55 } 55 }
56 56
57 private void OnAgeing(object source, ElapsedEventArgs e) 57 private void OnAgeing(object source, ElapsedEventArgs e)
58 { 58 {
59 successfulLoginsYesterday = successfulLoginsToday; 59 successfulLoginsYesterday = successfulLoginsToday;
60 60
61 // There is a possibility that an asset request could occur between the execution of these 61 // There is a possibility that an asset request could occur between the execution of these
62 // two statements. But we're better off without the synchronization overhead. 62 // two statements. But we're better off without the synchronization overhead.
63 successfulLoginsToday = 0; 63 successfulLoginsToday = 0;
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Record a successful login 67 /// Record a successful login
68 /// </summary> 68 /// </summary>
69 public void AddSuccessfulLogin() 69 public void AddSuccessfulLogin()
70 { 70 {
71 successfulLogins++; 71 successfulLogins++;
72 successfulLoginsToday++; 72 successfulLoginsToday++;
73 } 73 }
74 74
75 public void AddLogout() 75 public void AddLogout()
76 { 76 {
77 logouts++; 77 logouts++;
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index d01c4c1..f92d150 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Framework
38{ 38{
39 /// <summary> 39 /// <summary>
40 /// A dictionary for task inventory. 40 /// A dictionary for task inventory.
41 /// 41 ///
42 /// This class is not thread safe. Callers must synchronize on Dictionary methods. 42 /// This class is not thread safe. Callers must synchronize on Dictionary methods.
43 /// </summary> 43 /// </summary>
44 public class TaskInventoryDictionary : Dictionary<LLUUID, TaskInventoryItem>, 44 public class TaskInventoryDictionary : Dictionary<LLUUID, TaskInventoryItem>,
@@ -72,10 +72,10 @@ namespace OpenSim.Framework
72 // 72 //
73 // System.TypeInitializationException: An exception was thrown by the type initializer for OpenSim.Framework.TaskInventoryDictionary ---> System.ArgumentOutOfRangeException: < 0 73 // System.TypeInitializationException: An exception was thrown by the type initializer for OpenSim.Framework.TaskInventoryDictionary ---> System.ArgumentOutOfRangeException: < 0
74 // Parameter name: length 74 // Parameter name: length
75 // at System.String.Substring (Int32 startIndex, Int32 length) [0x00088] in /build/buildd/mono-1.2.4/mcs/class/corlib/System/String.cs:381 75 // at System.String.Substring (Int32 startIndex, Int32 length) [0x00088] in /build/buildd/mono-1.2.4/mcs/class/corlib/System/String.cs:381
76 // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217 76 // at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type runtimeType, System.String xmlDataType) [0x001f6] in /build/buildd/mono-1.2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:217
77 // ... 77 // ...
78// private static XmlSerializer tiiSerializer 78// private static XmlSerializer tiiSerializer
79// = new XmlSerializer(typeof(Dictionary<LLUUID, TaskInventoryItem>.ValueCollection)); 79// = new XmlSerializer(typeof(Dictionary<LLUUID, TaskInventoryItem>.ValueCollection));
80 80
81 // see IXmlSerializable 81 // see IXmlSerializable
@@ -110,7 +110,7 @@ namespace OpenSim.Framework
110 m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name); 110 m_log.DebugFormat("[TASK INVENTORY]: Skipping empty element {0}", reader.Name);
111 } 111 }
112 112
113 // For some .net implementations, this last read is necessary so that we advance beyond the end tag 113 // For some .net implementations, this last read is necessary so that we advance beyond the end tag
114 // of the element wrapping this object so that the rest of the serialization can complete normally. 114 // of the element wrapping this object so that the rest of the serialization can complete normally.
115 reader.Read(); 115 reader.Read();
116 116
@@ -221,7 +221,7 @@ namespace OpenSim.Framework
221 public uint NextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL; 221 public uint NextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL;
222 public LLUUID OwnerID = LLUUID.Zero; 222 public LLUUID OwnerID = LLUUID.Zero;
223 public uint OwnerMask = FULL_MASK_PERMISSIONS_GENERAL; 223 public uint OwnerMask = FULL_MASK_PERMISSIONS_GENERAL;
224 public LLUUID ParentID = LLUUID.Zero; //parent folder id 224 public LLUUID ParentID = LLUUID.Zero; //parent folder id
225 public LLUUID ParentPartID = LLUUID.Zero; 225 public LLUUID ParentPartID = LLUUID.Zero;
226 public LLUUID PermsGranter; 226 public LLUUID PermsGranter;
227 public int PermsMask; 227 public int PermsMask;
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 5577140..8e5b02d 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -165,10 +165,10 @@ namespace OpenSim.Framework
165 // (but those probably wont work anyway) 165 // (but those probably wont work anyway)
166 return file; 166 return file;
167 } 167 }
168 168
169 /// <summary> 169 /// <summary>
170 /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes. 170 /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
171 /// 171 ///
172 /// Please don't delete me even if I appear currently unused! 172 /// Please don't delete me even if I appear currently unused!
173 /// </summary> 173 /// </summary>
174 /// <param name="rawXml"></param> 174 /// <param name="rawXml"></param>
@@ -177,22 +177,22 @@ namespace OpenSim.Framework
177 { 177 {
178 XmlDocument xd = new XmlDocument(); 178 XmlDocument xd = new XmlDocument();
179 xd.LoadXml(rawXml); 179 xd.LoadXml(rawXml);
180 180
181 StringBuilder sb = new StringBuilder(); 181 StringBuilder sb = new StringBuilder();
182 StringWriter sw = new StringWriter(sb); 182 StringWriter sw = new StringWriter(sb);
183 183
184 XmlTextWriter xtw = new XmlTextWriter(sw); 184 XmlTextWriter xtw = new XmlTextWriter(sw);
185 xtw.Formatting = Formatting.Indented; 185 xtw.Formatting = Formatting.Indented;
186 186
187 try 187 try
188 { 188 {
189 xd.WriteTo(xtw); 189 xd.WriteTo(xtw);
190 } 190 }
191 finally 191 finally
192 { 192 {
193 xtw.Close(); 193 xtw.Close();
194 } 194 }
195 195
196 return sb.ToString(); 196 return sb.ToString();
197 } 197 }
198 198
@@ -284,11 +284,11 @@ namespace OpenSim.Framework
284 /// Convert a variable length field (byte array) to a string, with a 284 /// Convert a variable length field (byte array) to a string, with a
285 /// field name prepended to each line of the output 285 /// field name prepended to each line of the output
286 /// </summary> 286 /// </summary>
287 /// <remarks>If the byte array has unprintable characters in it, a 287 /// <remarks>If the byte array has unprintable characters in it, a
288 /// hex dump will be put in the string instead</remarks> 288 /// hex dump will be put in the string instead</remarks>
289 /// <param name="bytes">The byte array to convert to a string</param> 289 /// <param name="bytes">The byte array to convert to a string</param>
290 /// <param name="fieldName">A field name to prepend to each line of output</param> 290 /// <param name="fieldName">A field name to prepend to each line of output</param>
291 /// <returns>An ASCII string or a string containing a hex dump, minus 291 /// <returns>An ASCII string or a string containing a hex dump, minus
292 /// the null terminator</returns> 292 /// the null terminator</returns>
293 public static string FieldToString(byte[] bytes, string fieldName) 293 public static string FieldToString(byte[] bytes, string fieldName)
294 { 294 {