aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AvatarWearable.cs2
-rw-r--r--OpenSim/Framework/Capabilities/CapsUtil.cs2
-rw-r--r--OpenSim/Framework/Client/IClientIM.cs2
-rw-r--r--OpenSim/Framework/ClientManager.cs4
-rw-r--r--OpenSim/Framework/CnmMemoryCache.cs40
-rw-r--r--OpenSim/Framework/CnmSynchronizedCache.cs26
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs10
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs38
-rw-r--r--OpenSim/Framework/Communications/Clients/RegionClient.cs16
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs9
-rw-r--r--OpenSim/Framework/Communications/IAvatarService.cs2
-rw-r--r--OpenSim/Framework/Communications/IGridServices.cs92
-rw-r--r--OpenSim/Framework/Communications/IHyperlink.cs38
-rw-r--r--OpenSim/Framework/Communications/IUserAdminService.cs2
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs18
-rw-r--r--OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs6
-rw-r--r--OpenSim/Framework/Communications/Osp/OspResolver.cs12
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs7
-rw-r--r--OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs6
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs5
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs12
-rw-r--r--OpenSim/Framework/Communications/Tests/LoginServiceTests.cs2
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs34
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs10
-rw-r--r--OpenSim/Framework/Console/RemoteConsole.cs19
-rw-r--r--OpenSim/Framework/GridConfig.cs6
-rw-r--r--OpenSim/Framework/IAssetCache.cs22
-rw-r--r--OpenSim/Framework/IClientAPI.cs6
-rw-r--r--OpenSim/Framework/ICnmCache.cs24
-rw-r--r--OpenSim/Framework/IRegionCommsListener.cs3
-rw-r--r--OpenSim/Framework/IScene.cs4
-rw-r--r--OpenSim/Framework/ISceneObject.cs2
-rw-r--r--OpenSim/Framework/InventoryFolderBase.cs2
-rw-r--r--OpenSim/Framework/InventoryFolderImpl.cs4
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs40
-rw-r--r--OpenSim/Framework/InventoryNodeBase.cs12
-rw-r--r--OpenSim/Framework/NetworkServersInfo.cs5
-rw-r--r--OpenSim/Framework/RegionCommsListener.cs13
-rw-r--r--OpenSim/Framework/RegionInfo.cs73
-rw-r--r--OpenSim/Framework/Serialization/ArchiveConstants.cs5
-rw-r--r--OpenSim/Framework/Serialization/External/LandDataSerializer.cs191
-rw-r--r--OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs6
-rw-r--r--OpenSim/Framework/Serialization/External/UserProfileSerializer.cs4
-rw-r--r--OpenSim/Framework/Serialization/TarArchiveWriter.cs3
-rw-r--r--OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs131
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs12
-rw-r--r--OpenSim/Framework/Servers/CheckSumServer.cs26
-rw-r--r--OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs112
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs11
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs3
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs6
-rw-r--r--OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs95
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs6
-rw-r--r--OpenSim/Framework/SimStats.cs14
-rw-r--r--OpenSim/Framework/TaskInventoryDictionary.cs2
-rw-r--r--OpenSim/Framework/ThreadTracker.cs6
-rw-r--r--OpenSim/Framework/UserConfig.cs2
-rw-r--r--OpenSim/Framework/UserProfileData.cs2
-rw-r--r--OpenSim/Framework/Util.cs65
62 files changed, 891 insertions, 447 deletions
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index 5071594..4a5253c 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Framework
59 59
60 // Body 60 // Body
61 defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); 61 defaultWearables[0].ItemID = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
62 defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); 62 defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
63 63
64 // Skin 64 // Skin
65 defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"); 65 defaultWearables[1].ItemID = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
diff --git a/OpenSim/Framework/Capabilities/CapsUtil.cs b/OpenSim/Framework/Capabilities/CapsUtil.cs
index 46dbd3d..0334e4b 100644
--- a/OpenSim/Framework/Capabilities/CapsUtil.cs
+++ b/OpenSim/Framework/Capabilities/CapsUtil.cs
@@ -28,7 +28,7 @@
28using OpenMetaverse; 28using OpenMetaverse;
29 29
30namespace OpenSim.Framework.Capabilities 30namespace OpenSim.Framework.Capabilities
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// Capabilities utility methods 33 /// Capabilities utility methods
34 /// </summary> 34 /// </summary>
diff --git a/OpenSim/Framework/Client/IClientIM.cs b/OpenSim/Framework/Client/IClientIM.cs
index 81b1d9e..3df86d0 100644
--- a/OpenSim/Framework/Client/IClientIM.cs
+++ b/OpenSim/Framework/Client/IClientIM.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Client
57 // Porting Guide from old IM 57 // Porting Guide from old IM
58 // SendIM(...) 58 // SendIM(...)
59 // Loses FromAgentSession - this should be added by implementers manually. 59 // Loses FromAgentSession - this should be added by implementers manually.
60 // 60 //
61 61
62 public interface IClientIM 62 public interface IClientIM
63 { 63 {
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index db532e0..094a3ff 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -177,9 +177,9 @@ namespace OpenSim.Framework
177 } 177 }
178 178
179 public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args) 179 public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args)
180 { 180 {
181 // TODO: don't create new blocks if recycling an old packet 181 // TODO: don't create new blocks if recycling an old packet
182 List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); 182 List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>();
183 for (int i = 0; i < args.Count; i++) 183 for (int i = 0; i < args.Count; i++)
184 { 184 {
185 ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); 185 ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock();
diff --git a/OpenSim/Framework/CnmMemoryCache.cs b/OpenSim/Framework/CnmMemoryCache.cs
index db91801..92af331 100644
--- a/OpenSim/Framework/CnmMemoryCache.cs
+++ b/OpenSim/Framework/CnmMemoryCache.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Framework
70 70
71 /// <summary> 71 /// <summary>
72 /// How many operations between time checks. 72 /// How many operations between time checks.
73 /// </summary> 73 /// </summary>
74 private const int DefaultOperationsBetweenTimeChecks = 40; 74 private const int DefaultOperationsBetweenTimeChecks = 40;
75 75
76 /// <summary> 76 /// <summary>
@@ -168,7 +168,7 @@ namespace OpenSim.Framework
168 private int m_version; 168 private int m_version;
169 169
170 /// <summary> 170 /// <summary>
171 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class. 171 /// Initializes a new instance of the <see cref="CnmMemoryCache{TKey,TValue}"/> class.
172 /// </summary> 172 /// </summary>
173 public CnmMemoryCache() 173 public CnmMemoryCache()
174 : this(DefaultMaxSize) 174 : this(DefaultMaxSize)
@@ -277,7 +277,7 @@ namespace OpenSim.Framework
277 /// </param> 277 /// </param>
278 protected virtual void AddToNewGeneration(int bucketIndex, TKey key, TValue value, long size) 278 protected virtual void AddToNewGeneration(int bucketIndex, TKey key, TValue value, long size)
279 { 279 {
280 // Add to newest generation 280 // Add to newest generation
281 if (!m_newGeneration.Set(bucketIndex, key, value, size)) 281 if (!m_newGeneration.Set(bucketIndex, key, value, size))
282 { 282 {
283 // Failed to add new generation 283 // Failed to add new generation
@@ -311,7 +311,7 @@ namespace OpenSim.Framework
311 /// Bucket index is remainder when element key's hash value is divided by bucket count. 311 /// Bucket index is remainder when element key's hash value is divided by bucket count.
312 /// </para> 312 /// </para>
313 /// <para> 313 /// <para>
314 /// For example: key's hash is 72, bucket count is 5, element's bucket index is 72 % 5 = 2. 314 /// For example: key's hash is 72, bucket count is 5, element's bucket index is 72 % 5 = 2.
315 /// </para> 315 /// </para>
316 /// </remarks> 316 /// </remarks>
317 protected virtual int GetBucketIndex(TKey key) 317 protected virtual int GetBucketIndex(TKey key)
@@ -367,7 +367,7 @@ namespace OpenSim.Framework
367 /// </summary> 367 /// </summary>
368 private void RecycleGenerations() 368 private void RecycleGenerations()
369 { 369 {
370 // Rotate old generation to new generation, new generation to old generation 370 // Rotate old generation to new generation, new generation to old generation
371 IGeneration temp = m_newGeneration; 371 IGeneration temp = m_newGeneration;
372 m_newGeneration = m_oldGeneration; 372 m_newGeneration = m_oldGeneration;
373 m_newGeneration.Clear(); 373 m_newGeneration.Clear();
@@ -522,7 +522,7 @@ namespace OpenSim.Framework
522 /// <summary> 522 /// <summary>
523 /// Index of first element's in element chain. 523 /// Index of first element's in element chain.
524 /// </summary> 524 /// </summary>
525 /// <value> 525 /// <value>
526 /// -1 if there is no element in bucket; otherwise first element's index in the element chain. 526 /// -1 if there is no element in bucket; otherwise first element's index in the element chain.
527 /// </value> 527 /// </value>
528 /// <remarks> 528 /// <remarks>
@@ -692,7 +692,7 @@ namespace OpenSim.Framework
692 /// </summary> 692 /// </summary>
693 /// <value> 693 /// <value>
694 /// 0 if element is free; otherwise larger than 0. 694 /// 0 if element is free; otherwise larger than 0.
695 /// </value> 695 /// </value>
696 public long Size; 696 public long Size;
697 697
698 /// <summary> 698 /// <summary>
@@ -771,7 +771,7 @@ namespace OpenSim.Framework
771 /// </returns> 771 /// </returns>
772 /// <exception cref="InvalidOperationException"> 772 /// <exception cref="InvalidOperationException">
773 /// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called. 773 /// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called.
774 /// </exception> 774 /// </exception>
775 public KeyValuePair<TKey, TValue> Current 775 public KeyValuePair<TKey, TValue> Current
776 { 776 {
777 get 777 get
@@ -1405,10 +1405,10 @@ namespace OpenSim.Framework
1405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1405 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1406 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1407 /// </para> 1407 /// </para>
1408 /// </remarks> 1408 /// </remarks>
1409 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1409 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
1410 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/> 1410 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
1411 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> 1411 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
1412 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> 1412 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
1413 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 1413 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
1414 public bool IsSizeLimited 1414 public bool IsSizeLimited
@@ -1438,7 +1438,7 @@ namespace OpenSim.Framework
1438 } 1438 }
1439 1439
1440 /// <summary> 1440 /// <summary>
1441 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 1441 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
1442 /// </summary> 1442 /// </summary>
1443 /// <value> 1443 /// <value>
1444 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 1444 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
@@ -1449,7 +1449,7 @@ namespace OpenSim.Framework
1449 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from 1449 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
1450 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 1450 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
1451 /// stay longer in cache. 1451 /// stay longer in cache.
1452 /// </remarks> 1452 /// </remarks>
1453 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 1453 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
1454 /// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/> 1454 /// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/>
1455 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> 1455 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
@@ -1503,7 +1503,7 @@ namespace OpenSim.Framework
1503 /// <seealso cref="ICnmCache{TKey,TValue}.Set"/> 1503 /// <seealso cref="ICnmCache{TKey,TValue}.Set"/>
1504 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 1504 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
1505 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/> 1505 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
1506 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> 1506 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
1507 public long MaxElementSize 1507 public long MaxElementSize
1508 { 1508 {
1509 get { return m_maxElementSize; } 1509 get { return m_maxElementSize; }
@@ -1517,7 +1517,7 @@ namespace OpenSim.Framework
1517 /// <value> 1517 /// <value>
1518 /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>. 1518 /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>.
1519 /// </value> 1519 /// </value>
1520 /// <remarks> 1520 /// <remarks>
1521 /// <para> 1521 /// <para>
1522 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 1522 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
1523 /// </para> 1523 /// </para>
@@ -1562,10 +1562,10 @@ namespace OpenSim.Framework
1562 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 1562 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
1563 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 1563 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
1564 /// </para> 1564 /// </para>
1565 /// </remarks> 1565 /// </remarks>
1566 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 1566 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
1567 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 1567 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
1568 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> 1568 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
1569 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> 1569 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
1570 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 1570 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
1571 public long Size 1571 public long Size
@@ -1576,9 +1576,9 @@ namespace OpenSim.Framework
1576 /// <summary> 1576 /// <summary>
1577 /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. 1577 /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
1578 /// </summary> 1578 /// </summary>
1579 /// <value> 1579 /// <value>
1580 /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. 1580 /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
1581 /// </value> 1581 /// </value>
1582 /// <remarks> 1582 /// <remarks>
1583 /// <para> 1583 /// <para>
1584 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 1584 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
@@ -1630,7 +1630,7 @@ namespace OpenSim.Framework
1630 /// </para> 1630 /// </para>
1631 /// <para> 1631 /// <para>
1632 /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements 1632 /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements
1633 /// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache. 1633 /// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache.
1634 /// </para> 1634 /// </para>
1635 /// </remarks> 1635 /// </remarks>
1636 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 1636 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
@@ -1810,7 +1810,7 @@ namespace OpenSim.Framework
1810 /// </summary> 1810 /// </summary>
1811 /// <returns> 1811 /// <returns>
1812 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 1812 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
1813 /// the specified key; otherwise, <see langword="false"/>. 1813 /// the specified key; otherwise, <see langword="false"/>.
1814 /// </returns> 1814 /// </returns>
1815 /// <param name="key"> 1815 /// <param name="key">
1816 /// The key whose <paramref name="value"/> to get. 1816 /// The key whose <paramref name="value"/> to get.
diff --git a/OpenSim/Framework/CnmSynchronizedCache.cs b/OpenSim/Framework/CnmSynchronizedCache.cs
index c09900e..2bafbe9 100644
--- a/OpenSim/Framework/CnmSynchronizedCache.cs
+++ b/OpenSim/Framework/CnmSynchronizedCache.cs
@@ -142,7 +142,7 @@ namespace OpenSim.Framework
142 /// </returns> 142 /// </returns>
143 /// <exception cref="InvalidOperationException"> 143 /// <exception cref="InvalidOperationException">
144 /// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called. 144 /// The enumerator has reach end of collection or <see cref="MoveNext"/> is not called.
145 /// </exception> 145 /// </exception>
146 public KeyValuePair<TKey, TValue> Current 146 public KeyValuePair<TKey, TValue> Current
147 { 147 {
148 get { return m_enumerator.Current; } 148 get { return m_enumerator.Current; }
@@ -327,10 +327,10 @@ namespace OpenSim.Framework
327 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 327 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
328 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 328 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
329 /// </para> 329 /// </para>
330 /// </remarks> 330 /// </remarks>
331 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 331 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
332 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/> 332 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
333 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> 333 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
334 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> 334 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
335 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 335 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
336 public bool IsSizeLimited 336 public bool IsSizeLimited
@@ -366,7 +366,7 @@ namespace OpenSim.Framework
366 } 366 }
367 367
368 /// <summary> 368 /// <summary>
369 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 369 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
370 /// </summary> 370 /// </summary>
371 /// <value> 371 /// <value>
372 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 372 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
@@ -377,7 +377,7 @@ namespace OpenSim.Framework
377 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from 377 /// or <see cref="ICnmCache{TKey,TValue}.TryGetValue"/> methods in <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> , then element is automatically removed from
378 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 378 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
379 /// stay longer in cache. 379 /// stay longer in cache.
380 /// </remarks> 380 /// </remarks>
381 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 381 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
382 /// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/> 382 /// <seealso cref="ICnmCache{TKey,TValue}.PurgeExpired"/>
383 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> 383 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
@@ -440,7 +440,7 @@ namespace OpenSim.Framework
440 /// <seealso cref="ICnmCache{TKey,TValue}.Set"/> 440 /// <seealso cref="ICnmCache{TKey,TValue}.Set"/>
441 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 441 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
442 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/> 442 /// <seealso cref="ICnmCache{TKey,TValue}.Size"/>
443 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> 443 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
444 public long MaxElementSize 444 public long MaxElementSize
445 { 445 {
446 get 446 get
@@ -458,7 +458,7 @@ namespace OpenSim.Framework
458 /// <value> 458 /// <value>
459 /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>. 459 /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>.
460 /// </value> 460 /// </value>
461 /// <remarks> 461 /// <remarks>
462 /// <para> 462 /// <para>
463 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 463 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
464 /// </para> 464 /// </para>
@@ -507,10 +507,10 @@ namespace OpenSim.Framework
507 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 507 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
508 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 508 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
509 /// </para> 509 /// </para>
510 /// </remarks> 510 /// </remarks>
511 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/> 511 /// <seealso cref="ICnmCache{TKey,TValue}.MaxElementSize"/>
512 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/> 512 /// <seealso cref="ICnmCache{TKey,TValue}.IsSizeLimited"/>
513 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/> 513 /// <seealso cref="ICnmCache{TKey,TValue}.MaxSize"/>
514 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/> 514 /// <seealso cref="ICnmCache{TKey,TValue}.IsCountLimited"/>
515 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/> 515 /// <seealso cref="ICnmCache{TKey,TValue}.ExpirationTime"/>
516 public long Size 516 public long Size
@@ -527,9 +527,9 @@ namespace OpenSim.Framework
527 /// <summary> 527 /// <summary>
528 /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. 528 /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
529 /// </summary> 529 /// </summary>
530 /// <value> 530 /// <value>
531 /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. 531 /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
532 /// </value> 532 /// </value>
533 /// <remarks> 533 /// <remarks>
534 /// <para> 534 /// <para>
535 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 535 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
@@ -584,7 +584,7 @@ namespace OpenSim.Framework
584 /// </para> 584 /// </para>
585 /// <para> 585 /// <para>
586 /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements 586 /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements
587 /// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache. 587 /// may stay longer than <see cref="ICnmCache{TKey,TValue}.ExpirationTime"/> in the cache.
588 /// </para> 588 /// </para>
589 /// </remarks> 589 /// </remarks>
590 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/> 590 /// <seealso cref="ICnmCache{TKey,TValue}.IsTimeLimited"/>
@@ -704,7 +704,7 @@ namespace OpenSim.Framework
704 /// </summary> 704 /// </summary>
705 /// <returns> 705 /// <returns>
706 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 706 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
707 /// the specified key; otherwise, <see langword="false"/>. 707 /// the specified key; otherwise, <see langword="false"/>.
708 /// </returns> 708 /// </returns>
709 /// <param name="key"> 709 /// <param name="key">
710 /// The key whose <paramref name="value"/> to get. 710 /// The key whose <paramref name="value"/> to get.
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 238810a..aa71536 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache
55 /// Stores user profile and inventory data received from backend services for a particular user. 55 /// Stores user profile and inventory data received from backend services for a particular user.
56 /// </summary> 56 /// </summary>
57 public class CachedUserInfo 57 public class CachedUserInfo
58 { 58 {
59 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 59 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 //// <value> 61 //// <value>
@@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications.Cache
190 resolvedFolders.Add(folder); 190 resolvedFolders.Add(folder);
191 resolvedFolderDictionary[folder.ID] = folder; 191 resolvedFolderDictionary[folder.ID] = folder;
192 parentFolder.AddChildFolder(folder); 192 parentFolder.AddChildFolder(folder);
193 } 193 }
194 } 194 }
195 } // foreach (folder in pendingCategorizationFolders[parentFolder.ID]) 195 } // foreach (folder in pendingCategorizationFolders[parentFolder.ID])
196 196
@@ -219,7 +219,7 @@ namespace OpenSim.Framework.Communications.Cache
219 /// <summary> 219 /// <summary>
220 /// Fetch inventory for this user. 220 /// Fetch inventory for this user.
221 /// </summary> 221 /// </summary>
222 /// This has to be executed as a separate step once user information is retreived. 222 /// This has to be executed as a separate step once user information is retreived.
223 /// This will occur synchronously if the inventory service is in the same process as this class, and 223 /// This will occur synchronously if the inventory service is in the same process as this class, and
224 /// asynchronously otherwise. 224 /// asynchronously otherwise.
225 public void FetchInventory() 225 public void FetchInventory()
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Cache
422 /// 422 ///
423 /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE 423 /// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
424 /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing, 424 /// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
425 /// and needs to be changed. 425 /// and needs to be changed.
426 /// 426 ///
427 /// <param name="folderID"></param> 427 /// <param name="folderID"></param>
428 /// <param name="type"></param> 428 /// <param name="type"></param>
@@ -500,7 +500,7 @@ namespace OpenSim.Framework.Communications.Cache
500 InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID); 500 InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID);
501 501
502 if (oldParentFolder != null) 502 if (oldParentFolder != null)
503 { 503 {
504 oldParentFolder.RemoveChildFolder(folderID); 504 oldParentFolder.RemoveChildFolder(folderID);
505 parentFolder.AddChildFolder(folder); 505 parentFolder.AddChildFolder(folder);
506 } 506 }
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 7f1c7e9..9e12d948 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
60 /// User profiles indexed by name 60 /// User profiles indexed by name
61 /// </summary> 61 /// </summary>
62 private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName 62 private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName
63 = new Dictionary<string, CachedUserInfo>(); 63 = new Dictionary<string, CachedUserInfo>();
64 64
65 /// <summary> 65 /// <summary>
66 /// The root library folder. 66 /// The root library folder.
@@ -123,35 +123,35 @@ namespace OpenSim.Framework.Communications.Cache
123 /// <summary> 123 /// <summary>
124 /// Get details of the given user. 124 /// Get details of the given user.
125 /// </summary> 125 /// </summary>
126 /// If the user isn't in cache then the user is requested from the profile service. 126 /// If the user isn't in cache then the user is requested from the profile service.
127 /// <param name="userID"></param> 127 /// <param name="userID"></param>
128 /// <returns>null if no user details are found</returns> 128 /// <returns>null if no user details are found</returns>
129 public CachedUserInfo GetUserDetails(string fname, string lname) 129 public CachedUserInfo GetUserDetails(string fname, string lname)
130 { 130 {
131 lock (m_userProfilesByName) 131 lock (m_userProfilesByName)
132 { 132 {
133 CachedUserInfo userInfo; 133 CachedUserInfo userInfo;
134 134
135 if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) 135 if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
136 { 136 {
137 return userInfo; 137 return userInfo;
138 } 138 }
139 else 139 else
140 { 140 {
141 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); 141 UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname);
142 142
143 if (userProfile != null) 143 if (userProfile != null)
144 return AddToCaches(userProfile); 144 return AddToCaches(userProfile);
145 else 145 else
146 return null; 146 return null;
147 } 147 }
148 } 148 }
149 } 149 }
150 150
151 /// <summary> 151 /// <summary>
152 /// Get details of the given user. 152 /// Get details of the given user.
153 /// </summary> 153 /// </summary>
154 /// If the user isn't in cache then the user is requested from the profile service. 154 /// If the user isn't in cache then the user is requested from the profile service.
155 /// <param name="userID"></param> 155 /// <param name="userID"></param>
156 /// <returns>null if no user details are found</returns> 156 /// <returns>null if no user details are found</returns>
157 public CachedUserInfo GetUserDetails(UUID userID) 157 public CachedUserInfo GetUserDetails(UUID userID)
@@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache
185 // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via 185 // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via
186 // returning a read only class from the cache). 186 // returning a read only class from the cache).
187// public bool StoreProfile(UserProfileData userProfile) 187// public bool StoreProfile(UserProfileData userProfile)
188// { 188// {
189// lock (m_userProfilesById) 189// lock (m_userProfilesById)
190// { 190// {
191// CachedUserInfo userInfo = GetUserDetails(userProfile.ID); 191// CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
192// 192//
193// if (userInfo != null) 193// if (userInfo != null)
194// { 194// {
195// userInfo.m_userProfile = userProfile; 195// userInfo.m_userProfile = userProfile;
196// m_commsManager.UserService.UpdateUserProfile(userProfile); 196// m_commsManager.UserService.UpdateUserProfile(userProfile);
197// 197//
198// return true; 198// return true;
199// } 199// }
200// } 200// }
201// 201//
202// return false; 202// return false;
203// } 203// }
204 204
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache
220 } 220 }
221 } 221 }
222 222
223 return createdUserInfo; 223 return createdUserInfo;
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache
234 { 234 {
235 if (m_userProfilesById.ContainsKey(userId)) 235 if (m_userProfilesById.ContainsKey(userId))
236 { 236 {
237 CachedUserInfo userInfo = m_userProfilesById[userId]; 237 CachedUserInfo userInfo = m_userProfilesById[userId];
238 m_userProfilesById.Remove(userId); 238 m_userProfilesById.Remove(userId);
239 239
240 lock (m_userProfilesByName) 240 lock (m_userProfilesByName)
@@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache
244 244
245 return true; 245 return true;
246 } 246 }
247 } 247 }
248 248
249 return false; 249 return false;
250 } 250 }
diff --git a/OpenSim/Framework/Communications/Clients/RegionClient.cs b/OpenSim/Framework/Communications/Clients/RegionClient.cs
index 73e2db0..3419ce2 100644
--- a/OpenSim/Framework/Communications/Clients/RegionClient.cs
+++ b/OpenSim/Framework/Communications/Clients/RegionClient.cs
@@ -35,6 +35,8 @@ using System.Text;
35using OpenMetaverse; 35using OpenMetaverse;
36using OpenMetaverse.StructuredData; 36using OpenMetaverse.StructuredData;
37 37
38using GridRegion = OpenSim.Services.Interfaces.GridRegion;
39
38using log4net; 40using log4net;
39 41
40namespace OpenSim.Framework.Communications.Clients 42namespace OpenSim.Framework.Communications.Clients
@@ -43,7 +45,7 @@ namespace OpenSim.Framework.Communications.Clients
43 { 45 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 47
46 public bool DoCreateChildAgentCall(RegionInfo region, AgentCircuitData aCircuit, string authKey, out string reason) 48 public bool DoCreateChildAgentCall(GridRegion region, AgentCircuitData aCircuit, string authKey, out string reason)
47 { 49 {
48 reason = String.Empty; 50 reason = String.Empty;
49 51
@@ -166,7 +168,7 @@ namespace OpenSim.Framework.Communications.Clients
166 168
167 } 169 }
168 170
169 public bool DoChildAgentUpdateCall(RegionInfo region, IAgentData cAgentData) 171 public bool DoChildAgentUpdateCall(GridRegion region, IAgentData cAgentData)
170 { 172 {
171 // Eventually, we want to use a caps url instead of the agentID 173 // Eventually, we want to use a caps url instead of the agentID
172 string uri = string.Empty; 174 string uri = string.Empty;
@@ -260,7 +262,7 @@ namespace OpenSim.Framework.Communications.Clients
260 return true; 262 return true;
261 } 263 }
262 264
263 public bool DoRetrieveRootAgentCall(RegionInfo region, UUID id, out IAgentData agent) 265 public bool DoRetrieveRootAgentCall(GridRegion region, UUID id, out IAgentData agent)
264 { 266 {
265 agent = null; 267 agent = null;
266 // Eventually, we want to use a caps url instead of the agentID 268 // Eventually, we want to use a caps url instead of the agentID
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Communications.Clients
348 } 350 }
349 351
350 352
351 public bool DoCloseAgentCall(RegionInfo region, UUID id) 353 public bool DoCloseAgentCall(GridRegion region, UUID id)
352 { 354 {
353 string uri = string.Empty; 355 string uri = string.Empty;
354 try 356 try
@@ -391,7 +393,7 @@ namespace OpenSim.Framework.Communications.Clients
391 return true; 393 return true;
392 } 394 }
393 395
394 public bool DoCreateObjectCall(RegionInfo region, ISceneObject sog, string sogXml2, bool allowScriptCrossing) 396 public bool DoCreateObjectCall(GridRegion region, ISceneObject sog, string sogXml2, bool allowScriptCrossing)
395 { 397 {
396 ulong regionHandle = GetRegionHandle(region.RegionHandle); 398 ulong regionHandle = GetRegionHandle(region.RegionHandle);
397 string uri 399 string uri
@@ -474,7 +476,7 @@ namespace OpenSim.Framework.Communications.Clients
474 476
475 } 477 }
476 478
477 public bool DoCreateObjectCall(RegionInfo region, UUID userID, UUID itemID) 479 public bool DoCreateObjectCall(GridRegion region, UUID userID, UUID itemID)
478 { 480 {
479 ulong regionHandle = GetRegionHandle(region.RegionHandle); 481 ulong regionHandle = GetRegionHandle(region.RegionHandle);
480 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + UUID.Zero + "/" + regionHandle.ToString() + "/"; 482 string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + UUID.Zero + "/" + regionHandle.ToString() + "/";
@@ -646,7 +648,7 @@ namespace OpenSim.Framework.Communications.Clients
646 return false; 648 return false;
647 } 649 }
648 650
649 public virtual void SendUserInformation(RegionInfo regInfo, AgentCircuitData aCircuit) 651 public virtual void SendUserInformation(GridRegion regInfo, AgentCircuitData aCircuit)
650 { 652 {
651 } 653 }
652 654
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index e9a6adb..2410f31 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -59,11 +59,6 @@ namespace OpenSim.Framework.Communications
59 } 59 }
60 protected IMessagingService m_messageService; 60 protected IMessagingService m_messageService;
61 61
62 public IGridServices GridService
63 {
64 get { return m_gridService; }
65 }
66 protected IGridServices m_gridService;
67 62
68 public UserProfileCacheService UserProfileCacheService 63 public UserProfileCacheService UserProfileCacheService
69 { 64 {
@@ -95,8 +90,8 @@ namespace OpenSim.Framework.Communications
95 public IUserAdminService UserAdminService 90 public IUserAdminService UserAdminService
96 { 91 {
97 get { return m_userAdminService; } 92 get { return m_userAdminService; }
98 } 93 }
99 protected IUserAdminService m_userAdminService; 94 protected IUserAdminService m_userAdminService;
100 95
101 /// <summary> 96 /// <summary>
102 /// Constructor 97 /// Constructor
diff --git a/OpenSim/Framework/Communications/IAvatarService.cs b/OpenSim/Framework/Communications/IAvatarService.cs
index 4afc58f..760aa62 100644
--- a/OpenSim/Framework/Communications/IAvatarService.cs
+++ b/OpenSim/Framework/Communications/IAvatarService.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
42 /// Update avatar appearance information 42 /// Update avatar appearance information
43 /// </summary> 43 /// </summary>
44 /// <param name="user"></param> 44 /// <param name="user"></param>
45 /// <param name="appearance"></param> 45 /// <param name="appearance"></param>
46 void UpdateUserAppearance(UUID user, AvatarAppearance appearance); 46 void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
47 } 47 }
48} 48}
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs
deleted file mode 100644
index 6365919..0000000
--- a/OpenSim/Framework/Communications/IGridServices.cs
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
29using OpenMetaverse;
30
31namespace OpenSim.Framework.Communications
32{
33 public interface IGridServices
34 {
35 string gdebugRegionName { get; set; }
36
37 /// <summary>
38 /// If true, then regions will accept logins from the user service. If false, then they will not.
39 /// </summary>
40 bool RegionLoginsEnabled { get; set; }
41
42 /// <summary>
43 /// Register a region with the grid service.
44 /// </summary>
45 /// <param name="regionInfos"> </param>
46 /// <returns></returns>
47 /// <exception cref="System.Exception">Thrown if region registration failed</exception>
48 RegionCommsListener RegisterRegion(RegionInfo regionInfos);
49
50 /// <summary>
51 /// Deregister a region with the grid service.
52 /// </summary>
53 /// <param name="regionInfo"></param>
54 /// <returns></returns>
55 /// <exception cref="System.Exception">Thrown if region deregistration failed</exception>
56 bool DeregisterRegion(RegionInfo regionInfo);
57
58 /// <summary>
59 /// Get information about the regions neighbouring the given co-ordinates.
60 /// </summary>
61 /// <param name="x"></param>
62 /// <param name="y"></param>
63 /// <returns></returns>
64 List<SimpleRegionInfo> RequestNeighbours(uint x, uint y);
65
66 RegionInfo RequestNeighbourInfo(ulong regionHandle);
67 RegionInfo RequestNeighbourInfo(UUID regionID);
68 RegionInfo RequestNeighbourInfo(string name);
69 RegionInfo RequestNeighbourInfo(string host, uint port);
70
71 RegionInfo RequestClosestRegion(string regionName);
72 Dictionary<string, string> GetGridSettings();
73 List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY);
74 // not complete yet, only contains the fields needed for ParcelInfoReqeust
75 LandData RequestLandData(ulong regionHandle, uint x, uint y);
76
77 /// <summary>
78 /// Get information about regions starting with the provided name.
79 /// </summary>
80 /// <param name="name">
81 /// The name to match against.
82 /// </param>
83 /// <param name="maxNumber">
84 /// The maximum number of results to return.
85 /// </param>
86 /// <returns>
87 /// A list of <see cref="RegionInfo"/>s of regions with matching name. If the
88 /// grid-server couldn't be contacted or returned an error, return null.
89 /// </returns>
90 List<RegionInfo> RequestNamedRegions(string name, int maxNumber);
91 }
92}
diff --git a/OpenSim/Framework/Communications/IHyperlink.cs b/OpenSim/Framework/Communications/IHyperlink.cs
deleted file mode 100644
index 5057386..0000000
--- a/OpenSim/Framework/Communications/IHyperlink.cs
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28namespace OpenSim.Framework.Communications
29{
30 public interface IHyperlink
31 {
32 bool IsHyperlinkRegion(ulong handle);
33 RegionInfo GetHyperlinkRegion(ulong handle);
34 ulong FindRegionHandle(ulong handle);
35 bool SendUserInformation(RegionInfo region, AgentCircuitData aCircuit);
36 void AdjustUserInformation(AgentCircuitData aCircuit);
37 }
38}
diff --git a/OpenSim/Framework/Communications/IUserAdminService.cs b/OpenSim/Framework/Communications/IUserAdminService.cs
index 15b989d..423b49b 100644
--- a/OpenSim/Framework/Communications/IUserAdminService.cs
+++ b/OpenSim/Framework/Communications/IUserAdminService.cs
@@ -66,6 +66,6 @@ namespace OpenSim.Framework.Communications
66 /// <param name="lastName"></param> 66 /// <param name="lastName"></param>
67 /// <param name="newPassword"></param> 67 /// <param name="newPassword"></param>
68 /// <returns>true if the update was successful, false otherwise</returns> 68 /// <returns>true if the update was successful, false otherwise</returns>
69 bool ResetUserPassword(string firstName, string lastName, string newPassword); 69 bool ResetUserPassword(string firstName, string lastName, string newPassword);
70 } 70 }
71} 71}
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index 725225d..dfa059d 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -128,18 +128,30 @@ namespace OpenSim.Framework.Communications
128 /// 128 ///
129 /// <param name="friendlistowner">The agent for whom we're retreiving the friends Data.</param> 129 /// <param name="friendlistowner">The agent for whom we're retreiving the friends Data.</param>
130 /// <returns> 130 /// <returns>
131 /// A List of FriendListItems that contains info about the user's friends. 131 /// A List of FriendListItems that contains info about the user's friends.
132 /// Always returns a list even if the user has no friends 132 /// Always returns a list even if the user has no friends
133 /// </returns> 133 /// </returns>
134 List<FriendListItem> GetUserFriendList(UUID friendlistowner); 134 List<FriendListItem> GetUserFriendList(UUID friendlistowner);
135 135
136 // This probably shouldn't be here, it belongs to IAuthentication 136 // This probably shouldn't be here, it belongs to IAuthentication
137 // But since Scenes only have IUserService references, I'm placing it here for now. 137 // But since Scenes only have IUserService references, I'm placing it here for now.
138 bool VerifySession(UUID userID, UUID sessionID); 138 bool VerifySession(UUID userID, UUID sessionID);
139 139
140 /// <summary>
141 /// Authenticate a user by their password.
142 /// </summary>
143 ///
144 /// This is used by callers outside the login process that want to
145 /// verify a user who has given their password.
146 ///
147 /// This should probably also be in IAuthentication but is here for the same reasons as VerifySession() is
148 ///
149 /// <param name="userID"></param>
150 /// <param name="password"></param>
151 /// <returns></returns>
152 bool AuthenticateUserByPassword(UUID userID, string password);
140 153
141 // Temporary Hack until we move everything to the new service model 154 // Temporary Hack until we move everything to the new service model
142 void SetInventoryService(IInventoryService invService); 155 void SetInventoryService(IInventoryService invService);
143
144 } 156 }
145} 157}
diff --git a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
index 98d0e0f..e96c5e8 100644
--- a/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
+++ b/OpenSim/Framework/Communications/Osp/OspInventoryWrapperPlugin.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Osp
47 47
48 public string Name { get { return "OspInventoryWrapperPlugin"; } } 48 public string Name { get { return "OspInventoryWrapperPlugin"; } }
49 public string Version { get { return "0.1"; } } 49 public string Version { get { return "0.1"; } }
50 public void Initialise() {} 50 public void Initialise() {}
51 public void Initialise(string connect) {} 51 public void Initialise(string connect) {}
52 public void Dispose() {} 52 public void Dispose() {}
53 53
@@ -80,9 +80,9 @@ namespace OpenSim.Framework.Communications.Osp
80 } 80 }
81 81
82 protected InventoryItemBase PostProcessItem(InventoryItemBase item) 82 protected InventoryItemBase PostProcessItem(InventoryItemBase item)
83 { 83 {
84 item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager); 84 item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
85 return item; 85 return item;
86 } 86 }
87 87
88 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); } 88 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }
diff --git a/OpenSim/Framework/Communications/Osp/OspResolver.cs b/OpenSim/Framework/Communications/Osp/OspResolver.cs
index e98317a..32f0efc 100644
--- a/OpenSim/Framework/Communications/Osp/OspResolver.cs
+++ b/OpenSim/Framework/Communications/Osp/OspResolver.cs
@@ -33,13 +33,13 @@ using OpenSim.Framework;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
34 34
35namespace OpenSim.Framework.Communications.Osp 35namespace OpenSim.Framework.Communications.Osp
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for 38 /// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for
39 /// identifying user profiles or supplying a simple name if no profile is available. 39 /// identifying user profiles or supplying a simple name if no profile is available.
40 /// </summary> 40 /// </summary>
41 public class OspResolver 41 public class OspResolver
42 { 42 {
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 public const string OSPA_PREFIX = "ospa:"; 45 public const string OSPA_PREFIX = "ospa:";
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Osp
73 { 73 {
74 return 74 return
75 OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName; 75 OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName;
76 } 76 }
77 77
78 /// <summary> 78 /// <summary>
79 /// Resolve an osp string into the most suitable internal OpenSim identifier. 79 /// Resolve an osp string into the most suitable internal OpenSim identifier.
@@ -89,13 +89,13 @@ namespace OpenSim.Framework.Communications.Osp
89 /// is returned. 89 /// is returned.
90 /// </returns> 90 /// </returns>
91 public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager) 91 public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager)
92 { 92 {
93 if (!ospa.StartsWith(OSPA_PREFIX)) 93 if (!ospa.StartsWith(OSPA_PREFIX))
94 return UUID.Zero; 94 return UUID.Zero;
95 95
96 m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa); 96 m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa);
97 97
98 string ospaMeat = ospa.Substring(OSPA_PREFIX.Length); 98 string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
99 string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY); 99 string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY);
100 100
101 foreach (string tuple in ospaTuples) 101 foreach (string tuple in ospaTuples)
@@ -162,7 +162,7 @@ namespace OpenSim.Framework.Communications.Osp
162 tempUserProfile.ID = HashName(tempUserProfile.Name); 162 tempUserProfile.ID = HashName(tempUserProfile.Name);
163 163
164 m_log.DebugFormat( 164 m_log.DebugFormat(
165 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID); 165 "[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
166 commsManager.UserService.AddTemporaryUserProfile(tempUserProfile); 166 commsManager.UserService.AddTemporaryUserProfile(tempUserProfile);
167 167
168 return tempUserProfile.ID; 168 return tempUserProfile.ID;
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index bf59f8e..922cd49 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -1072,7 +1072,7 @@ namespace OpenSim.Framework.Communications.Services
1072 /// <param name="user"></param> 1072 /// <param name="user"></param>
1073 /// <param name="response"></param> 1073 /// <param name="response"></param>
1074 /// <param name="remoteClient"></param> 1074 /// <param name="remoteClient"></param>
1075 /// <returns>true if the region was successfully contacted, false otherwise</returns> 1075 /// <returns>true if the region was successfully contacted, false otherwise</returns>
1076 protected abstract bool PrepareLoginToRegion( 1076 protected abstract bool PrepareLoginToRegion(
1077 RegionInfo regionInfo, UserProfileData user, LoginResponse response, IPEndPoint client); 1077 RegionInfo regionInfo, UserProfileData user, LoginResponse response, IPEndPoint client);
1078 1078
@@ -1221,11 +1221,13 @@ namespace OpenSim.Framework.Communications.Services
1221 { 1221 {
1222 return Util.CreateUnknownUserErrorResponse(); 1222 return Util.CreateUnknownUserErrorResponse();
1223 } 1223 }
1224
1224 UUID.TryParse((string)requestData["session_id"], out guess_sid); 1225 UUID.TryParse((string)requestData["session_id"], out guess_sid);
1225 if (guess_sid == UUID.Zero) 1226 if (guess_sid == UUID.Zero)
1226 { 1227 {
1227 return Util.CreateUnknownUserErrorResponse(); 1228 return Util.CreateUnknownUserErrorResponse();
1228 } 1229 }
1230
1229 if (m_userManager.VerifySession(guess_aid, guess_sid)) 1231 if (m_userManager.VerifySession(guess_aid, guess_sid))
1230 { 1232 {
1231 authed = "TRUE"; 1233 authed = "TRUE";
@@ -1243,6 +1245,5 @@ namespace OpenSim.Framework.Communications.Services
1243 response.Value = responseData; 1245 response.Value = responseData;
1244 return response; 1246 return response;
1245 } 1247 }
1246
1247 } 1248 }
1248} 1249} \ No newline at end of file
diff --git a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
index 43f1440..2413055 100644
--- a/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
+++ b/OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs
@@ -33,9 +33,9 @@ using OpenMetaverse;
33using OpenSim.Data; 33using OpenSim.Data;
34 34
35namespace OpenSim.Framework.Communications 35namespace OpenSim.Framework.Communications
36{ 36{
37 /// <summary> 37 /// <summary>
38 /// Plugin for managing temporary user profiles. 38 /// Plugin for managing temporary user profiles.
39 /// </summary> 39 /// </summary>
40 public class TemporaryUserProfilePlugin : IUserDataPlugin 40 public class TemporaryUserProfilePlugin : IUserDataPlugin
41 { 41 {
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications
45 45
46 public string Name { get { return "TemporaryUserProfilePlugin"; } } 46 public string Name { get { return "TemporaryUserProfilePlugin"; } }
47 public string Version { get { return "0.1"; } } 47 public string Version { get { return "0.1"; } }
48 public void Initialise() {} 48 public void Initialise() {}
49 public void Initialise(string connect) {} 49 public void Initialise(string connect) {}
50 public void Dispose() {} 50 public void Dispose() {}
51 51
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
index ac0dc6d..caaebd7 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -149,6 +149,11 @@ namespace OpenSim.Framework.Communications.Tests
149 { 149 {
150 throw new NotImplementedException(); 150 throw new NotImplementedException();
151 } 151 }
152
153 public virtual bool AuthenticateUserByPassword(UUID userID, string password)
154 {
155 throw new NotImplementedException();
156 }
152 } 157 }
153 } 158 }
154} 159}
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
index e5d8895..830c877 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Communications.Tests
133 133
134 timedOut = true; 134 timedOut = true;
135 lock (this) 135 lock (this)
136 { 136 {
137 UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); 137 UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
138 Monitor.Wait(this, 60000); 138 Monitor.Wait(this, 60000);
139 } 139 }
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Communications.Tests
150 CachedUserInfo userInfo; 150 CachedUserInfo userInfo;
151 151
152 lock (this) 152 lock (this)
153 { 153 {
154 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); 154 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
155 Monitor.Wait(this, 60000); 155 Monitor.Wait(this, 60000);
156 } 156 }
@@ -171,7 +171,7 @@ namespace OpenSim.Framework.Communications.Tests
171 CachedUserInfo userInfo; 171 CachedUserInfo userInfo;
172 172
173 lock (this) 173 lock (this)
174 { 174 {
175 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); 175 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
176 Monitor.Wait(this, 60000); 176 Monitor.Wait(this, 60000);
177 } 177 }
@@ -206,7 +206,7 @@ namespace OpenSim.Framework.Communications.Tests
206 CachedUserInfo userInfo; 206 CachedUserInfo userInfo;
207 207
208 lock (this) 208 lock (this)
209 { 209 {
210 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); 210 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
211 Monitor.Wait(this, 60000); 211 Monitor.Wait(this, 60000);
212 } 212 }
@@ -271,7 +271,7 @@ namespace OpenSim.Framework.Communications.Tests
271 CachedUserInfo userInfo; 271 CachedUserInfo userInfo;
272 272
273 lock (this) 273 lock (this)
274 { 274 {
275 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); 275 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
276 Monitor.Wait(this, 60000); 276 Monitor.Wait(this, 60000);
277 } 277 }
@@ -311,7 +311,7 @@ namespace OpenSim.Framework.Communications.Tests
311 CachedUserInfo userInfo; 311 CachedUserInfo userInfo;
312 312
313 lock (this) 313 lock (this)
314 { 314 {
315 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived); 315 userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
316 Monitor.Wait(this, 60000); 316 Monitor.Wait(this, 60000);
317 } 317 }
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
index 0a9d2ae..e891d9c 100644
--- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
@@ -318,7 +318,7 @@ namespace OpenSim.Framework.Communications.Tests
318 { 318 {
319 TestHelper.InMethod(); 319 TestHelper.InMethod();
320 320
321 //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()"); 321 //Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
322 //log4net.Config.XmlConfigurator.Configure(); 322 //log4net.Config.XmlConfigurator.Configure();
323 323
324 string error_already_logged = "You appear to be already logged in. " + 324 string error_already_logged = "You appear to be already logged in. " +
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 58174a0..bf4f331 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -44,7 +44,8 @@ namespace OpenSim.Framework.Communications
44 /// <summary> 44 /// <summary>
45 /// Base class for user management (create, read, etc) 45 /// Base class for user management (create, read, etc)
46 /// </summary> 46 /// </summary>
47 public abstract class UserManagerBase : IUserService, IUserAdminService, IAvatarService, IMessagingService, IAuthentication 47 public abstract class UserManagerBase
48 : IUserService, IUserAdminService, IAvatarService, IMessagingService, IAuthentication
48 { 49 {
49 private static readonly ILog m_log 50 private static readonly ILog m_log
50 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -649,15 +650,17 @@ namespace OpenSim.Framework.Communications
649 public virtual UUID AddUser( 650 public virtual UUID AddUser(
650 string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) 651 string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID)
651 { 652 {
652 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
653 653
654 UserProfileData user = new UserProfileData(); 654 UserProfileData user = new UserProfileData();
655
656 user.PasswordSalt = Util.Md5Hash(UUID.Random().ToString());
657 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + user.PasswordSalt);
658
655 user.HomeLocation = new Vector3(128, 128, 100); 659 user.HomeLocation = new Vector3(128, 128, 100);
656 user.ID = SetUUID; 660 user.ID = SetUUID;
657 user.FirstName = firstName; 661 user.FirstName = firstName;
658 user.SurName = lastName; 662 user.SurName = lastName;
659 user.PasswordHash = md5PasswdHash; 663 user.PasswordHash = md5PasswdHash;
660 user.PasswordSalt = String.Empty;
661 user.Created = Util.UnixTimeSinceEpoch(); 664 user.Created = Util.UnixTimeSinceEpoch();
662 user.HomeLookAt = new Vector3(100, 100, 100); 665 user.HomeLookAt = new Vector3(100, 100, 100);
663 user.HomeRegionX = regX; 666 user.HomeRegionX = regX;
@@ -891,7 +894,10 @@ namespace OpenSim.Framework.Communications
891 894
892 if (userProfile != null && userProfile.CurrentAgent != null) 895 if (userProfile != null && userProfile.CurrentAgent != null)
893 { 896 {
894 m_log.DebugFormat("[USER AUTH]: Verifying session {0} for {1}; current session {2}", sessionID, userID, userProfile.CurrentAgent.SessionID); 897 m_log.DebugFormat(
898 "[USER AUTH]: Verifying session {0} for {1}; current session {2}",
899 sessionID, userID, userProfile.CurrentAgent.SessionID);
900
895 if (userProfile.CurrentAgent.SessionID == sessionID) 901 if (userProfile.CurrentAgent.SessionID == sessionID)
896 { 902 {
897 return true; 903 return true;
@@ -901,6 +907,26 @@ namespace OpenSim.Framework.Communications
901 return false; 907 return false;
902 } 908 }
903 909
910 public virtual bool AuthenticateUserByPassword(UUID userID, string password)
911 {
912// m_log.DebugFormat("[USER AUTH]: Authenticating user {0} given password {1}", userID, password);
913
914 UserProfileData userProfile = GetUserProfile(userID);
915
916 if (null == userProfile)
917 return false;
918
919 string md5PasswordHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + userProfile.PasswordSalt);
920
921// m_log.DebugFormat(
922// "[USER AUTH]: Submitted hash {0}, stored hash {1}", md5PasswordHash, userProfile.PasswordHash);
923
924 if (md5PasswordHash == userProfile.PasswordHash)
925 return true;
926 else
927 return false;
928 }
929
904 #endregion 930 #endregion
905 } 931 }
906} 932}
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 06136ff..9671bc2 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Console
88 /// <param name="helpParts">Parsed parts of the help string. If empty then general help is returned.</param> 88 /// <param name="helpParts">Parsed parts of the help string. If empty then general help is returned.</param>
89 /// <returns></returns> 89 /// <returns></returns>
90 public List<string> GetHelp(string[] cmd) 90 public List<string> GetHelp(string[] cmd)
91 { 91 {
92 List<string> help = new List<string>(); 92 List<string> help = new List<string>();
93 List<string> helpParts = new List<string>(cmd); 93 List<string> helpParts = new List<string>(cmd);
94 94
@@ -115,7 +115,7 @@ namespace OpenSim.Framework.Console
115 /// <param name="helpParts"></param> 115 /// <param name="helpParts"></param>
116 /// <returns></returns> 116 /// <returns></returns>
117 private List<string> CollectHelp(List<string> helpParts) 117 private List<string> CollectHelp(List<string> helpParts)
118 { 118 {
119 string originalHelpRequest = string.Join(" ", helpParts.ToArray()); 119 string originalHelpRequest = string.Join(" ", helpParts.ToArray());
120 List<string> help = new List<string>(); 120 List<string> help = new List<string>();
121 121
@@ -132,7 +132,7 @@ namespace OpenSim.Framework.Console
132 if (dict[helpPart] is Dictionary<string, Object>) 132 if (dict[helpPart] is Dictionary<string, Object>)
133 dict = (Dictionary<string, object>)dict[helpPart]; 133 dict = (Dictionary<string, object>)dict[helpPart];
134 134
135 helpParts.RemoveAt(0); 135 helpParts.RemoveAt(0);
136 } 136 }
137 137
138 // There was a command for the given help string 138 // There was a command for the given help string
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Console
149 } 149 }
150 150
151 return help; 151 return help;
152 } 152 }
153 153
154 private List<string> CollectHelp(Dictionary<string, object> dict) 154 private List<string> CollectHelp(Dictionary<string, object> dict)
155 { 155 {
@@ -180,7 +180,7 @@ namespace OpenSim.Framework.Console
180 /// <param name="longhelp"></param> 180 /// <param name="longhelp"></param>
181 /// <param name="fn"></param> 181 /// <param name="fn"></param>
182 public void AddCommand(string module, bool shared, string command, 182 public void AddCommand(string module, bool shared, string command,
183 string help, string longhelp, CommandDelegate fn) 183 string help, string longhelp, CommandDelegate fn)
184 { 184 {
185 AddCommand(module, shared, command, help, longhelp, 185 AddCommand(module, shared, command, help, longhelp,
186 String.Empty, fn); 186 String.Empty, fn);
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index 67bff4c..c27072c 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -197,8 +197,8 @@ namespace OpenSim.Framework.Console
197 197
198 string uri = "/ReadResponses/" + sessionID.ToString() + "/"; 198 string uri = "/ReadResponses/" + sessionID.ToString() + "/";
199 199
200 m_Server.AddPollServiceHTTPHandler(uri, HandleHttpCloseSession, 200 m_Server.AddPollServiceHTTPHandler(uri, HandleHttpPoll,
201 new PollServiceEventArgs(HasEvents, GetEvents, NoEvents, 201 new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents,
202 sessionID)); 202 sessionID));
203 203
204 XmlDocument xmldoc = new XmlDocument(); 204 XmlDocument xmldoc = new XmlDocument();
@@ -230,6 +230,11 @@ namespace OpenSim.Framework.Console
230 return reply; 230 return reply;
231 } 231 }
232 232
233 private Hashtable HandleHttpPoll(Hashtable request)
234 {
235 return new Hashtable();
236 }
237
233 private Hashtable HandleHttpCloseSession(Hashtable request) 238 private Hashtable HandleHttpCloseSession(Hashtable request)
234 { 239 {
235 DoExpire(); 240 DoExpire();
@@ -365,7 +370,7 @@ namespace OpenSim.Framework.Console
365 } 370 }
366 } 371 }
367 372
368 private bool HasEvents(UUID sessionID) 373 private bool HasEvents(UUID RequestID, UUID sessionID)
369 { 374 {
370 ConsoleConnection c = null; 375 ConsoleConnection c = null;
371 376
@@ -381,19 +386,19 @@ namespace OpenSim.Framework.Console
381 return false; 386 return false;
382 } 387 }
383 388
384 private Hashtable GetEvents(UUID sessionID, string request) 389 private Hashtable GetEvents(UUID RequestID, UUID sessionID, string request)
385 { 390 {
386 ConsoleConnection c = null; 391 ConsoleConnection c = null;
387 392
388 lock (m_Connections) 393 lock (m_Connections)
389 { 394 {
390 if (!m_Connections.ContainsKey(sessionID)) 395 if (!m_Connections.ContainsKey(sessionID))
391 return NoEvents(); 396 return NoEvents(RequestID, UUID.Zero);
392 c = m_Connections[sessionID]; 397 c = m_Connections[sessionID];
393 } 398 }
394 c.last = System.Environment.TickCount; 399 c.last = System.Environment.TickCount;
395 if (c.lastLineSeen >= m_LineNumber) 400 if (c.lastLineSeen >= m_LineNumber)
396 return NoEvents(); 401 return NoEvents(RequestID, UUID.Zero);
397 402
398 Hashtable result = new Hashtable(); 403 Hashtable result = new Hashtable();
399 404
@@ -435,7 +440,7 @@ namespace OpenSim.Framework.Console
435 return result; 440 return result;
436 } 441 }
437 442
438 private Hashtable NoEvents() 443 private Hashtable NoEvents(UUID RequestID, UUID id)
439 { 444 {
440 Hashtable result = new Hashtable(); 445 Hashtable result = new Hashtable();
441 446
diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs
index 9aa5d03..3a43a14 100644
--- a/OpenSim/Framework/GridConfig.cs
+++ b/OpenSim/Framework/GridConfig.cs
@@ -90,13 +90,13 @@ namespace OpenSim.Framework
90 90
91 m_configMember.addConfigurationOption("allow_forceful_banlines", 91 m_configMember.addConfigurationOption("allow_forceful_banlines",
92 ConfigurationOption.ConfigurationTypes.TYPE_STRING, 92 ConfigurationOption.ConfigurationTypes.TYPE_STRING,
93 "Allow Forceful Banlines", "TRUE", true); 93 "Allow Forceful Banlines", "TRUE", true);
94 94
95 m_configMember.addConfigurationOption("allow_region_registration", 95 m_configMember.addConfigurationOption("allow_region_registration",
96 ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, 96 ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
97 "Allow regions to register immediately upon grid server startup? true/false", 97 "Allow regions to register immediately upon grid server startup? true/false",
98 "True", 98 "True",
99 false); 99 false);
100 m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 100 m_configMember.addConfigurationOption("console_user", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
101 "Remote console access user name [Default: disabled]", "", false); 101 "Remote console access user name [Default: disabled]", "", false);
102 102
@@ -147,7 +147,7 @@ namespace OpenSim.Framework
147 break; 147 break;
148 case "allow_region_registration": 148 case "allow_region_registration":
149 AllowRegionRegistration = (bool)configuration_result; 149 AllowRegionRegistration = (bool)configuration_result;
150 break; 150 break;
151 case "console_user": 151 case "console_user":
152 ConsoleUser = (string)configuration_result; 152 ConsoleUser = (string)configuration_result;
153 break; 153 break;
diff --git a/OpenSim/Framework/IAssetCache.cs b/OpenSim/Framework/IAssetCache.cs
index 751fdd5..654180d 100644
--- a/OpenSim/Framework/IAssetCache.cs
+++ b/OpenSim/Framework/IAssetCache.cs
@@ -34,23 +34,23 @@ namespace OpenSim.Framework
34 34
35 /// <summary> 35 /// <summary>
36 /// Interface to the local asset cache. This is the mechanism through which assets can be added and requested. 36 /// Interface to the local asset cache. This is the mechanism through which assets can be added and requested.
37 /// </summary> 37 /// </summary>
38 public interface IAssetCache : IPlugin 38 public interface IAssetCache : IPlugin
39 { 39 {
40 /// <value> 40 /// <value>
41 /// The 'server' from which assets can be requested and to which assets are persisted. 41 /// The 'server' from which assets can be requested and to which assets are persisted.
42 /// </value> 42 /// </value>
43 43
44 void Initialise(ConfigSettings cs); 44 void Initialise(ConfigSettings cs);
45 45
46 /// <summary> 46 /// <summary>
47 /// Report statistical data to the log. 47 /// Report statistical data to the log.
48 /// </summary> 48 /// </summary>
49 void ShowState(); 49 void ShowState();
50 50
51 /// <summary> 51 /// <summary>
52 /// Clear the asset cache. 52 /// Clear the asset cache.
53 /// </summary> 53 /// </summary>
54 void Clear(); 54 void Clear();
55 55
56 /// <summary> 56 /// <summary>
@@ -58,7 +58,7 @@ namespace OpenSim.Framework
58 /// </summary> 58 /// </summary>
59 /// <param name="assetId"></param> 59 /// <param name="assetId"></param>
60 /// <param name="asset"></param> 60 /// <param name="asset"></param>
61 /// <returns>true if the asset was in the cache, false if it was not</returns> 61 /// <returns>true if the asset was in the cache, false if it was not</returns>
62 bool TryGetCachedAsset(UUID assetID, out AssetBase asset); 62 bool TryGetCachedAsset(UUID assetID, out AssetBase asset);
63 63
64 /// <summary> 64 /// <summary>
@@ -69,7 +69,7 @@ namespace OpenSim.Framework
69 /// <param name="isTexture"></param> 69 /// <param name="isTexture"></param>
70 /// A callback invoked when the asset has either been found or not found. 70 /// A callback invoked when the asset has either been found or not found.
71 /// If the asset was found this is called with the asset UUID and the asset data 71 /// If the asset was found this is called with the asset UUID and the asset data
72 /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> 72 /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param>
73 void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture); 73 void GetAsset(UUID assetID, AssetRequestCallback callback, bool isTexture);
74 74
75 /// <summary> 75 /// <summary>
@@ -84,13 +84,13 @@ namespace OpenSim.Framework
84 /// 84 ///
85 /// <param name="assetID"></param> 85 /// <param name="assetID"></param>
86 /// <param name="isTexture"></param> 86 /// <param name="isTexture"></param>
87 /// <returns>null if the asset could not be retrieved</returns> 87 /// <returns>null if the asset could not be retrieved</returns>
88 AssetBase GetAsset(UUID assetID, bool isTexture); 88 AssetBase GetAsset(UUID assetID, bool isTexture);
89 89
90 /// <summary> 90 /// <summary>
91 /// Add an asset to both the persistent store and the cache. 91 /// Add an asset to both the persistent store and the cache.
92 /// </summary> 92 /// </summary>
93 /// <param name="asset"></param> 93 /// <param name="asset"></param>
94 void AddAsset(AssetBase asset); 94 void AddAsset(AssetBase asset);
95 95
96 /// <summary> 96 /// <summary>
@@ -100,14 +100,14 @@ namespace OpenSim.Framework
100 /// of the asset cache. This is needed because the osdynamic 100 /// of the asset cache. This is needed because the osdynamic
101 /// texture code grows the asset cache without bounds. The 101 /// texture code grows the asset cache without bounds. The
102 /// real solution here is a much better cache archicture, but 102 /// real solution here is a much better cache archicture, but
103 /// this is a stop gap measure until we have such a thing. 103 /// this is a stop gap measure until we have such a thing.
104 void ExpireAsset(UUID assetID); 104 void ExpireAsset(UUID assetID);
105 105
106 /// <summary> 106 /// <summary>
107 /// Handle an asset request from the client. The result will be sent back asynchronously. 107 /// Handle an asset request from the client. The result will be sent back asynchronously.
108 /// </summary> 108 /// </summary>
109 /// <param name="userInfo"></param> 109 /// <param name="userInfo"></param>
110 /// <param name="transferRequest"></param> 110 /// <param name="transferRequest"></param>
111 void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest); 111 void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest);
112 } 112 }
113 113
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 91a5d5c..d3bd9e7 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -810,7 +810,7 @@ namespace OpenSim.Framework
810 /// </summary> 810 /// </summary>
811 void Start(); 811 void Start();
812 812
813 void Stop(); 813 void Stop();
814 814
815 // void ActivateGesture(UUID assetId, UUID gestureId); 815 // void ActivateGesture(UUID assetId, UUID gestureId);
816 816
@@ -824,7 +824,7 @@ namespace OpenSim.Framework
824 /// </summary> 824 /// </summary>
825 /// <param name="agentID">The id of the agent associated with the appearance</param> 825 /// <param name="agentID">The id of the agent associated with the appearance</param>
826 /// <param name="visualParams"></param> 826 /// <param name="visualParams"></param>
827 /// <param name="textureEntry"></param> 827 /// <param name="textureEntry"></param>
828 void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry); 828 void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry);
829 829
830 void SendStartPingCheck(byte seq); 830 void SendStartPingCheck(byte seq);
@@ -833,7 +833,7 @@ namespace OpenSim.Framework
833 /// Tell the client that an object has been deleted 833 /// Tell the client that an object has been deleted
834 /// </summary> 834 /// </summary>
835 /// <param name="regionHandle"></param> 835 /// <param name="regionHandle"></param>
836 /// <param name="localID"></param> 836 /// <param name="localID"></param>
837 void SendKillObject(ulong regionHandle, uint localID); 837 void SendKillObject(ulong regionHandle, uint localID);
838 838
839 void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs); 839 void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs);
diff --git a/OpenSim/Framework/ICnmCache.cs b/OpenSim/Framework/ICnmCache.cs
index a1ac322..27b9c56 100644
--- a/OpenSim/Framework/ICnmCache.cs
+++ b/OpenSim/Framework/ICnmCache.cs
@@ -180,16 +180,16 @@ namespace OpenSim.Framework
180 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 180 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
181 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 181 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
182 /// </para> 182 /// </para>
183 /// </remarks> 183 /// </remarks>
184 /// <seealso cref="MaxElementSize"/> 184 /// <seealso cref="MaxElementSize"/>
185 /// <seealso cref="Size"/> 185 /// <seealso cref="Size"/>
186 /// <seealso cref="MaxSize"/> 186 /// <seealso cref="MaxSize"/>
187 /// <seealso cref="IsCountLimited"/> 187 /// <seealso cref="IsCountLimited"/>
188 /// <seealso cref="IsTimeLimited"/> 188 /// <seealso cref="IsTimeLimited"/>
189 bool IsSizeLimited { get; } 189 bool IsSizeLimited { get; }
190 190
191 /// <summary> 191 /// <summary>
192 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time. 192 /// Gets a value indicating whether elements stored to <see cref="ICnmCache{TKey,TValue}"/> have limited inactivity time.
193 /// </summary> 193 /// </summary>
194 /// <value> 194 /// <value>
195 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements; 195 /// <see langword="true"/> if the <see cref="ICnmCache{TKey,TValue}"/> has a fixed total size of elements;
@@ -200,7 +200,7 @@ namespace OpenSim.Framework
200 /// or <see cref="TryGetValue"/> methods in <see cref="ExpirationTime"/> , then element is automatically removed from 200 /// or <see cref="TryGetValue"/> methods in <see cref="ExpirationTime"/> , then element is automatically removed from
201 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may 201 /// the cache. Depending on implementation of the <see cref="ICnmCache{TKey,TValue}"/>, some of the elements may
202 /// stay longer in cache. 202 /// stay longer in cache.
203 /// </remarks> 203 /// </remarks>
204 /// <seealso cref="ExpirationTime"/> 204 /// <seealso cref="ExpirationTime"/>
205 /// <seealso cref="PurgeExpired"/> 205 /// <seealso cref="PurgeExpired"/>
206 /// <seealso cref="IsCountLimited"/> 206 /// <seealso cref="IsCountLimited"/>
@@ -237,7 +237,7 @@ namespace OpenSim.Framework
237 /// <seealso cref="Set"/> 237 /// <seealso cref="Set"/>
238 /// <seealso cref="IsSizeLimited"/> 238 /// <seealso cref="IsSizeLimited"/>
239 /// <seealso cref="Size"/> 239 /// <seealso cref="Size"/>
240 /// <seealso cref="MaxSize"/> 240 /// <seealso cref="MaxSize"/>
241 long MaxElementSize { get; } 241 long MaxElementSize { get; }
242 242
243 /// <summary> 243 /// <summary>
@@ -246,7 +246,7 @@ namespace OpenSim.Framework
246 /// <value> 246 /// <value>
247 /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>. 247 /// Maximal allowed total size for elements stored to <see cref="ICnmCache{TKey,TValue}"/>.
248 /// </value> 248 /// </value>
249 /// <remarks> 249 /// <remarks>
250 /// <para> 250 /// <para>
251 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure. 251 /// Normally size is total bytes used by elements in the cache. But it can be any other suitable unit of measure.
252 /// </para> 252 /// </para>
@@ -278,10 +278,10 @@ namespace OpenSim.Framework
278 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements, 278 /// When adding an new element to <see cref="ICnmCache{TKey,TValue}"/> that is limiting total size of elements,
279 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element. 279 /// <see cref="ICnmCache{TKey,TValue}"/> will remove less recently used elements until it can fit an new element.
280 /// </para> 280 /// </para>
281 /// </remarks> 281 /// </remarks>
282 /// <seealso cref="MaxElementSize"/> 282 /// <seealso cref="MaxElementSize"/>
283 /// <seealso cref="IsSizeLimited"/> 283 /// <seealso cref="IsSizeLimited"/>
284 /// <seealso cref="MaxSize"/> 284 /// <seealso cref="MaxSize"/>
285 /// <seealso cref="IsCountLimited"/> 285 /// <seealso cref="IsCountLimited"/>
286 /// <seealso cref="ExpirationTime"/> 286 /// <seealso cref="ExpirationTime"/>
287 long Size { get; } 287 long Size { get; }
@@ -289,9 +289,9 @@ namespace OpenSim.Framework
289 /// <summary> 289 /// <summary>
290 /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. 290 /// Gets an object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
291 /// </summary> 291 /// </summary>
292 /// <value> 292 /// <value>
293 /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>. 293 /// An object that can be used to synchronize access to the <see cref="ICnmCache{TKey,TValue}"/>.
294 /// </value> 294 /// </value>
295 /// <remarks> 295 /// <remarks>
296 /// <para> 296 /// <para>
297 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/> 297 /// To get synchronized (thread safe) access to <see cref="ICnmCache{TKey,TValue}"/>, use <see cref="CnmSynchronizedCache{TKey,TValue}"/>
@@ -322,7 +322,7 @@ namespace OpenSim.Framework
322 /// </para> 322 /// </para>
323 /// <para> 323 /// <para>
324 /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements 324 /// Depending on <see cref="ICnmCache{TKey,TValue}"/> implementation, some of expired elements
325 /// may stay longer than <see cref="ExpirationTime"/> in the cache. 325 /// may stay longer than <see cref="ExpirationTime"/> in the cache.
326 /// </para> 326 /// </para>
327 /// </remarks> 327 /// </remarks>
328 /// <seealso cref="IsTimeLimited"/> 328 /// <seealso cref="IsTimeLimited"/>
@@ -418,7 +418,7 @@ namespace OpenSim.Framework
418 /// </summary> 418 /// </summary>
419 /// <returns> 419 /// <returns>
420 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with 420 /// <see langword="true"/>if the <see cref="ICnmCache{TKey,TValue}"/> contains an element with
421 /// the specified key; otherwise, <see langword="false"/>. 421 /// the specified key; otherwise, <see langword="false"/>.
422 /// </returns> 422 /// </returns>
423 /// <param name="key"> 423 /// <param name="key">
424 /// The key whose <paramref name="value"/> to get. 424 /// The key whose <paramref name="value"/> to get.
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs
index ba4c616..307c6bc 100644
--- a/OpenSim/Framework/IRegionCommsListener.cs
+++ b/OpenSim/Framework/IRegionCommsListener.cs
@@ -46,8 +46,6 @@ namespace OpenSim.Framework
46 46
47 public delegate bool CloseAgentConnection(UUID agentID); 47 public delegate bool CloseAgentConnection(UUID agentID);
48 48
49 public delegate bool RegionUp(RegionInfo region);
50
51 public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData); 49 public delegate bool ChildAgentUpdate(ChildAgentDataUpdate cAgentData);
52 50
53 public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message); 51 public delegate void LogOffUser(UUID agentID, UUID regionSecret, string message);
@@ -65,7 +63,6 @@ namespace OpenSim.Framework
65 event AcknowledgePrimCross OnAcknowledgePrimCrossed; 63 event AcknowledgePrimCross OnAcknowledgePrimCrossed;
66 event UpdateNeighbours OnNeighboursUpdate; 64 event UpdateNeighbours OnNeighboursUpdate;
67 event CloseAgentConnection OnCloseAgentConnection; 65 event CloseAgentConnection OnCloseAgentConnection;
68 event RegionUp OnRegionUp;
69 event ChildAgentUpdate OnChildAgentUpdate; 66 event ChildAgentUpdate OnChildAgentUpdate;
70 event LogOffUser OnLogOffUser; 67 event LogOffUser OnLogOffUser;
71 event GetLandData OnGetLandData; 68 event GetLandData OnGetLandData;
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 2e2c703..489653f 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Framework
55 GodTakeCopy = 5, 55 GodTakeCopy = 5,
56 Delete = 6, 56 Delete = 6,
57 Return = 9 57 Return = 9
58 }; 58 };
59 59
60 public interface IScene 60 public interface IScene
61 { 61 {
@@ -74,7 +74,7 @@ namespace OpenSim.Framework
74 void CloseAllAgents(uint circuitcode); 74 void CloseAllAgents(uint circuitcode);
75 75
76 void Restart(int seconds); 76 void Restart(int seconds);
77 bool OtherRegionUp(RegionInfo thisRegion); 77 //RegionInfo OtherRegionUp(RegionInfo thisRegion);
78 78
79 string GetSimulatorVersion(); 79 string GetSimulatorVersion();
80 80
diff --git a/OpenSim/Framework/ISceneObject.cs b/OpenSim/Framework/ISceneObject.cs
index db19527..4fc3e01 100644
--- a/OpenSim/Framework/ISceneObject.cs
+++ b/OpenSim/Framework/ISceneObject.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Framework
32{ 32{
33 public interface ISceneObject 33 public interface ISceneObject
34 { 34 {
35 UUID UUID { get; } 35 UUID UUID { get; }
36 ISceneObject CloneForNewScene(); 36 ISceneObject CloneForNewScene();
37 string ToXml2(); 37 string ToXml2();
38 string ExtraToXmlString(); 38 string ExtraToXmlString();
diff --git a/OpenSim/Framework/InventoryFolderBase.cs b/OpenSim/Framework/InventoryFolderBase.cs
index 3eef6f6..a12183c 100644
--- a/OpenSim/Framework/InventoryFolderBase.cs
+++ b/OpenSim/Framework/InventoryFolderBase.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Framework
89 ID = id; 89 ID = id;
90 Name = name; 90 Name = name;
91 Owner = owner; 91 Owner = owner;
92 ParentID = parent; 92 ParentID = parent;
93 } 93 }
94 94
95 public InventoryFolderBase(UUID id, string name, UUID owner, short type, UUID parent, ushort version) 95 public InventoryFolderBase(UUID id, string name, UUID owner, short type, UUID parent, ushort version)
diff --git a/OpenSim/Framework/InventoryFolderImpl.cs b/OpenSim/Framework/InventoryFolderImpl.cs
index 00462f9..29c7682 100644
--- a/OpenSim/Framework/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/InventoryFolderImpl.cs
@@ -304,7 +304,7 @@ namespace OpenSim.Framework
304 304
305 /// <summary> 305 /// <summary>
306 /// Find a folder given a PATH_DELIMITER delimited path starting from this folder 306 /// Find a folder given a PATH_DELIMITER delimited path starting from this folder
307 /// </summary> 307 /// </summary>
308 /// 308 ///
309 /// This method does not handle paths that contain multiple delimitors 309 /// This method does not handle paths that contain multiple delimitors
310 /// 310 ///
@@ -314,7 +314,7 @@ namespace OpenSim.Framework
314 /// FIXME: Delimitors which occur in names themselves are not currently escapable. 314 /// FIXME: Delimitors which occur in names themselves are not currently escapable.
315 /// 315 ///
316 /// <param name="path"> 316 /// <param name="path">
317 /// The path to the required folder. 317 /// The path to the required folder.
318 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned. 318 /// It this is empty or consists only of the PATH_DELIMTER then this folder itself is returned.
319 /// </param> 319 /// </param>
320 /// <returns>null if the folder is not found</returns> 320 /// <returns>null if the folder is not found</returns>
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 7150c82..aeb01e2 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -34,10 +34,10 @@ namespace OpenSim.Framework
34 /// Inventory Item - contains all the properties associated with an individual inventory piece. 34 /// Inventory Item - contains all the properties associated with an individual inventory piece.
35 /// </summary> 35 /// </summary>
36 public class InventoryItemBase : InventoryNodeBase, ICloneable 36 public class InventoryItemBase : InventoryNodeBase, ICloneable
37 { 37 {
38 /// <value> 38 /// <value>
39 /// The inventory type of the item. This is slightly different from the asset type in some situations. 39 /// The inventory type of the item. This is slightly different from the asset type in some situations.
40 /// </value> 40 /// </value>
41 public int InvType 41 public int InvType
42 { 42 {
43 get 43 get
@@ -54,7 +54,7 @@ namespace OpenSim.Framework
54 54
55 /// <value> 55 /// <value>
56 /// The folder this item is contained in 56 /// The folder this item is contained in
57 /// </value> 57 /// </value>
58 public UUID Folder 58 public UUID Folder
59 { 59 {
60 get 60 get
@@ -71,7 +71,7 @@ namespace OpenSim.Framework
71 71
72 /// <value> 72 /// <value>
73 /// The creator of this item 73 /// The creator of this item
74 /// </value> 74 /// </value>
75 public string CreatorId 75 public string CreatorId
76 { 76 {
77 get 77 get
@@ -114,7 +114,7 @@ namespace OpenSim.Framework
114 { 114 {
115 m_creatorIdAsUuid = value; 115 m_creatorIdAsUuid = value;
116 } 116 }
117 } 117 }
118 protected UUID m_creatorIdAsUuid = UUID.Zero; 118 protected UUID m_creatorIdAsUuid = UUID.Zero;
119 119
120 /// <value> 120 /// <value>
@@ -130,13 +130,13 @@ namespace OpenSim.Framework
130 set 130 set
131 { 131 {
132 m_description = value; 132 m_description = value;
133 } 133 }
134 } 134 }
135 protected string m_description = String.Empty; 135 protected string m_description = String.Empty;
136 136
137 /// <value> 137 /// <value>
138 /// 138 ///
139 /// </value> 139 /// </value>
140 public uint NextPermissions 140 public uint NextPermissions
141 { 141 {
142 get 142 get
@@ -153,7 +153,7 @@ namespace OpenSim.Framework
153 153
154 /// <value> 154 /// <value>
155 /// A mask containing permissions for the current owner (cannot be enforced) 155 /// A mask containing permissions for the current owner (cannot be enforced)
156 /// </value> 156 /// </value>
157 public uint CurrentPermissions 157 public uint CurrentPermissions
158 { 158 {
159 get 159 get
@@ -170,7 +170,7 @@ namespace OpenSim.Framework
170 170
171 /// <value> 171 /// <value>
172 /// 172 ///
173 /// </value> 173 /// </value>
174 public uint BasePermissions 174 public uint BasePermissions
175 { 175 {
176 get 176 get
@@ -187,7 +187,7 @@ namespace OpenSim.Framework
187 187
188 /// <value> 188 /// <value>
189 /// 189 ///
190 /// </value> 190 /// </value>
191 public uint EveryOnePermissions 191 public uint EveryOnePermissions
192 { 192 {
193 get 193 get
@@ -204,7 +204,7 @@ namespace OpenSim.Framework
204 204
205 /// <value> 205 /// <value>
206 /// 206 ///
207 /// </value> 207 /// </value>
208 public uint GroupPermissions 208 public uint GroupPermissions
209 { 209 {
210 get 210 get
@@ -221,7 +221,7 @@ namespace OpenSim.Framework
221 221
222 /// <value> 222 /// <value>
223 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) 223 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
224 /// </value> 224 /// </value>
225 public int AssetType 225 public int AssetType
226 { 226 {
227 get 227 get
@@ -238,7 +238,7 @@ namespace OpenSim.Framework
238 238
239 /// <value> 239 /// <value>
240 /// The UUID of the associated asset on the asset server 240 /// The UUID of the associated asset on the asset server
241 /// </value> 241 /// </value>
242 public UUID AssetID 242 public UUID AssetID
243 { 243 {
244 get 244 get
@@ -255,7 +255,7 @@ namespace OpenSim.Framework
255 255
256 /// <value> 256 /// <value>
257 /// 257 ///
258 /// </value> 258 /// </value>
259 public UUID GroupID 259 public UUID GroupID
260 { 260 {
261 get 261 get
@@ -272,13 +272,13 @@ namespace OpenSim.Framework
272 272
273 /// <value> 273 /// <value>
274 /// 274 ///
275 /// </value> 275 /// </value>
276 public bool GroupOwned 276 public bool GroupOwned
277 { 277 {
278 get 278 get
279 { 279 {
280 return m_groupOwned; 280 return m_groupOwned;
281 } 281 }
282 282
283 set 283 set
284 { 284 {
@@ -289,7 +289,7 @@ namespace OpenSim.Framework
289 289
290 /// <value> 290 /// <value>
291 /// 291 ///
292 /// </value> 292 /// </value>
293 public int SalePrice 293 public int SalePrice
294 { 294 {
295 get 295 get
@@ -306,7 +306,7 @@ namespace OpenSim.Framework
306 306
307 /// <value> 307 /// <value>
308 /// 308 ///
309 /// </value> 309 /// </value>
310 public byte SaleType 310 public byte SaleType
311 { 311 {
312 get 312 get
@@ -323,7 +323,7 @@ namespace OpenSim.Framework
323 323
324 /// <value> 324 /// <value>
325 /// 325 ///
326 /// </value> 326 /// </value>
327 public uint Flags 327 public uint Flags
328 { 328 {
329 get 329 get
@@ -340,7 +340,7 @@ namespace OpenSim.Framework
340 340
341 /// <value> 341 /// <value>
342 /// 342 ///
343 /// </value> 343 /// </value>
344 public int CreationDate 344 public int CreationDate
345 { 345 {
346 get 346 get
diff --git a/OpenSim/Framework/InventoryNodeBase.cs b/OpenSim/Framework/InventoryNodeBase.cs
index f49cce1..31c3fd1 100644
--- a/OpenSim/Framework/InventoryNodeBase.cs
+++ b/OpenSim/Framework/InventoryNodeBase.cs
@@ -31,12 +31,12 @@ namespace OpenSim.Framework
31{ 31{
32 /// <summary> 32 /// <summary>
33 /// Common base class for inventory nodes of different types (files, folders, etc.) 33 /// Common base class for inventory nodes of different types (files, folders, etc.)
34 /// </summary> 34 /// </summary>
35 public class InventoryNodeBase 35 public class InventoryNodeBase
36 { 36 {
37 /// <summary> 37 /// <summary>
38 /// The name of the node (64 characters or less) 38 /// The name of the node (64 characters or less)
39 /// </summary> 39 /// </summary>
40 public virtual string Name 40 public virtual string Name
41 { 41 {
42 get { return m_name; } 42 get { return m_name; }
@@ -51,17 +51,17 @@ namespace OpenSim.Framework
51 { 51 {
52 get { return m_id; } 52 get { return m_id; }
53 set { m_id = value; } 53 set { m_id = value; }
54 } 54 }
55 private UUID m_id; 55 private UUID m_id;
56 56
57 /// <summary> 57 /// <summary>
58 /// The agent who's inventory this is contained by 58 /// The agent who's inventory this is contained by
59 /// </summary> 59 /// </summary>
60 public virtual UUID Owner 60 public virtual UUID Owner
61 { 61 {
62 get { return m_owner; } 62 get { return m_owner; }
63 set { m_owner = value; } 63 set { m_owner = value; }
64 } 64 }
65 private UUID m_owner; 65 private UUID m_owner;
66 } 66 }
67} 67}
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs
index 3b00af3..f720222 100644
--- a/OpenSim/Framework/NetworkServersInfo.cs
+++ b/OpenSim/Framework/NetworkServersInfo.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Framework
32{ 32{
33 public class NetworkServersInfo 33 public class NetworkServersInfo
34 { 34 {
35 public string AssetSendKey = String.Empty; 35 public string AssetSendKey = String.Empty;
36 public string AssetURL = "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString() + "/"; 36 public string AssetURL = "http://127.0.0.1:" + ConfigSettings.DefaultAssetServerHttpPort.ToString() + "/";
37 37
38 public string GridRecvKey = String.Empty; 38 public string GridRecvKey = String.Empty;
@@ -102,8 +102,7 @@ namespace OpenSim.Framework
102 ConfigSettings.DefaultInventoryServerHttpPort.ToString()); 102 ConfigSettings.DefaultInventoryServerHttpPort.ToString());
103 secureInventoryServer = config.Configs["Network"].GetBoolean("secure_inventory_server", true); 103 secureInventoryServer = config.Configs["Network"].GetBoolean("secure_inventory_server", true);
104 104
105 MessagingURL = config.Configs["Network"].GetString("messaging_server_url", 105 MessagingURL = config.Configs["Network"].GetString("messaging_server_url", string.Empty);
106 "http://127.0.0.1:" + ConfigSettings.DefaultMessageServerHttpPort);
107 } 106 }
108 } 107 }
109} 108}
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs
index 016c78c..90200d6 100644
--- a/OpenSim/Framework/RegionCommsListener.cs
+++ b/OpenSim/Framework/RegionCommsListener.cs
@@ -47,7 +47,6 @@ namespace OpenSim.Framework
47 private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser 47 private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser
48 private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate; 48 private UpdateNeighbours handlerNeighboursUpdate = null; // OnNeighboursUpdate;
49 private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; 49 private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion;
50 private RegionUp handlerRegionUp = null; // OnRegionUp;
51 private LogOffUser handlerLogOffUser = null; 50 private LogOffUser handlerLogOffUser = null;
52 private GetLandData handlerGetLandData = null; 51 private GetLandData handlerGetLandData = null;
53 52
@@ -62,7 +61,6 @@ namespace OpenSim.Framework
62 public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed; 61 public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
63 public event AcknowledgePrimCross OnAcknowledgePrimCrossed; 62 public event AcknowledgePrimCross OnAcknowledgePrimCrossed;
64 public event CloseAgentConnection OnCloseAgentConnection; 63 public event CloseAgentConnection OnCloseAgentConnection;
65 public event RegionUp OnRegionUp;
66 public event ChildAgentUpdate OnChildAgentUpdate; 64 public event ChildAgentUpdate OnChildAgentUpdate;
67 public event LogOffUser OnLogOffUser; 65 public event LogOffUser OnLogOffUser;
68 public event GetLandData OnGetLandData; 66 public event GetLandData OnGetLandData;
@@ -108,17 +106,6 @@ namespace OpenSim.Framework
108 return false; 106 return false;
109 } 107 }
110 108
111 public virtual bool TriggerRegionUp(RegionInfo region)
112 {
113 handlerRegionUp = OnRegionUp;
114 if (handlerRegionUp != null)
115 {
116 handlerRegionUp(region);
117 return true;
118 }
119 return false;
120 }
121
122 public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData) 109 public virtual bool TriggerChildAgentUpdate(ChildAgentDataUpdate cAgentData)
123 { 110 {
124 handlerChildAgentUpdate = OnChildAgentUpdate; 111 handlerChildAgentUpdate = OnChildAgentUpdate;
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 3896a6e..d3a5357 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using System.Net; 30using System.Net;
30using System.Net.Sockets; 31using System.Net.Sockets;
31using System.Xml; 32using System.Xml;
@@ -63,6 +64,13 @@ namespace OpenSim.Framework
63 } 64 }
64 protected string m_serverURI; 65 protected string m_serverURI;
65 66
67 public string RegionName
68 {
69 get { return m_regionName; }
70 set { m_regionName = value; }
71 }
72 protected string m_regionName = String.Empty;
73
66 protected bool Allow_Alternate_Ports; 74 protected bool Allow_Alternate_Ports;
67 public bool m_allow_alternate_ports; 75 public bool m_allow_alternate_ports;
68 protected string m_externalHostName; 76 protected string m_externalHostName;
@@ -100,6 +108,7 @@ namespace OpenSim.Framework
100 108
101 public SimpleRegionInfo(RegionInfo ConvertFrom) 109 public SimpleRegionInfo(RegionInfo ConvertFrom)
102 { 110 {
111 m_regionName = ConvertFrom.RegionName;
103 m_regionLocX = ConvertFrom.RegionLocX; 112 m_regionLocX = ConvertFrom.RegionLocX;
104 m_regionLocY = ConvertFrom.RegionLocY; 113 m_regionLocY = ConvertFrom.RegionLocY;
105 m_internalEndPoint = ConvertFrom.InternalEndPoint; 114 m_internalEndPoint = ConvertFrom.InternalEndPoint;
@@ -197,6 +206,67 @@ namespace OpenSim.Framework
197 { 206 {
198 return m_internalEndPoint.Port; 207 return m_internalEndPoint.Port;
199 } 208 }
209
210 public Dictionary<string, object> ToKeyValuePairs()
211 {
212 Dictionary<string, object> kvp = new Dictionary<string, object>();
213 kvp["uuid"] = RegionID.ToString();
214 kvp["locX"] = RegionLocX.ToString();
215 kvp["locY"] = RegionLocY.ToString();
216 kvp["external_ip_address"] = ExternalEndPoint.Address.ToString();
217 kvp["external_port"] = ExternalEndPoint.Port.ToString();
218 kvp["external_host_name"] = ExternalHostName;
219 kvp["http_port"] = HttpPort.ToString();
220 kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
221 kvp["internal_port"] = InternalEndPoint.Port.ToString();
222 kvp["alternate_ports"] = m_allow_alternate_ports.ToString();
223 kvp["server_uri"] = ServerURI;
224
225 return kvp;
226 }
227
228 public SimpleRegionInfo(Dictionary<string, object> kvp)
229 {
230 if ((kvp["external_ip_address"] != null) && (kvp["external_port"] != null))
231 {
232 int port = 0;
233 Int32.TryParse((string)kvp["external_port"], out port);
234 IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["external_ip_address"]), port);
235 ExternalEndPoint = ep;
236 }
237 else
238 ExternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
239
240 if (kvp["external_host_name"] != null)
241 ExternalHostName = (string)kvp["external_host_name"];
242
243 if (kvp["http_port"] != null)
244 {
245 UInt32 port = 0;
246 UInt32.TryParse((string)kvp["http_port"], out port);
247 HttpPort = port;
248 }
249
250 if ((kvp["internal_ip_address"] != null) && (kvp["internal_port"] != null))
251 {
252 int port = 0;
253 Int32.TryParse((string)kvp["internal_port"], out port);
254 IPEndPoint ep = new IPEndPoint(IPAddress.Parse((string)kvp["internal_ip_address"]), port);
255 InternalEndPoint = ep;
256 }
257 else
258 InternalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0);
259
260 if (kvp["alternate_ports"] != null)
261 {
262 bool alts = false;
263 Boolean.TryParse((string)kvp["alternate_ports"], out alts);
264 m_allow_alternate_ports = alts;
265 }
266
267 if (kvp["server_uri"] != null)
268 ServerURI = (string)kvp["server_uri"];
269 }
200 } 270 }
201 271
202 public class RegionInfo : SimpleRegionInfo 272 public class RegionInfo : SimpleRegionInfo
@@ -222,7 +292,6 @@ namespace OpenSim.Framework
222 public UUID originRegionID = UUID.Zero; 292 public UUID originRegionID = UUID.Zero;
223 public string proxyUrl = ""; 293 public string proxyUrl = "";
224 public int ProxyOffset = 0; 294 public int ProxyOffset = 0;
225 public string RegionName = String.Empty;
226 public string regionSecret = UUID.Random().ToString(); 295 public string regionSecret = UUID.Random().ToString();
227 296
228 public string osSecret; 297 public string osSecret;
@@ -971,7 +1040,7 @@ namespace OpenSim.Framework
971 public static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI) 1040 public static RegionInfo Create(UUID regionID, string regionName, uint regX, uint regY, string externalHostName, uint httpPort, uint simPort, uint remotingPort, string serverURI)
972 { 1041 {
973 RegionInfo regionInfo; 1042 RegionInfo regionInfo;
974 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort); 1043 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort);
975 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName); 1044 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName);
976 regionInfo.RemotingPort = remotingPort; 1045 regionInfo.RemotingPort = remotingPort;
977 regionInfo.RemotingAddress = externalHostName; 1046 regionInfo.RemotingAddress = externalHostName;
diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs
index f6dedec..1cd80db 100644
--- a/OpenSim/Framework/Serialization/ArchiveConstants.cs
+++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs
@@ -66,6 +66,11 @@ namespace OpenSim.Framework.Serialization
66 public const string SETTINGS_PATH = "settings/"; 66 public const string SETTINGS_PATH = "settings/";
67 67
68 /// <value> 68 /// <value>
69 /// Path for region settings.
70 /// </value>
71 public const string LANDDATA_PATH = "landdata/";
72
73 /// <value>
69 /// Path for user profiles 74 /// Path for user profiles
70 /// </value> 75 /// </value>
71 public const string USERS_PATH = "userprofiles/"; 76 public const string USERS_PATH = "userprofiles/";
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
new file mode 100644
index 0000000..a3bc5d1
--- /dev/null
+++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
@@ -0,0 +1,191 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.IO;
31using System.Text;
32using System.Xml;
33using OpenMetaverse;
34using OpenSim.Framework;
35
36namespace OpenSim.Framework.Serialization.External
37{
38 /// <summary>
39 /// Serialize and deserialize LandData as an external format.
40 /// </summary>
41 public class LandDataSerializer
42 {
43 protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
44
45 /// <summary>
46 /// Reify/deserialize landData
47 /// </summary>
48 /// <param name="serializedLandData"></param>
49 /// <returns></returns>
50 /// <exception cref="System.Xml.XmlException"></exception>
51 public static LandData Deserialize(byte[] serializedLandData)
52 {
53 return Deserialize(m_utf8Encoding.GetString(serializedLandData, 0, serializedLandData.Length));
54 }
55
56 /// <summary>
57 /// Reify/deserialize landData
58 /// </summary>
59 /// <param name="serializedLandData"></param>
60 /// <returns></returns>
61 /// <exception cref="System.Xml.XmlException"></exception>
62 public static LandData Deserialize(string serializedLandData)
63 {
64 LandData landData = new LandData();
65
66 StringReader sr = new StringReader(serializedLandData);
67 XmlTextReader xtr = new XmlTextReader(sr);
68
69 xtr.ReadStartElement("LandData");
70
71 landData.Area = Convert.ToInt32( xtr.ReadElementString("Area"));
72 landData.AuctionID = Convert.ToUInt32( xtr.ReadElementString("AuctionID"));
73 landData.AuthBuyerID = UUID.Parse( xtr.ReadElementString("AuthBuyerID"));
74 landData.Category = (ParcelCategory)Convert.ToSByte( xtr.ReadElementString("Category"));
75 landData.ClaimDate = Convert.ToInt32( xtr.ReadElementString("ClaimDate"));
76 landData.ClaimPrice = Convert.ToInt32( xtr.ReadElementString("ClaimPrice"));
77 landData.GlobalID = UUID.Parse( xtr.ReadElementString("GlobalID"));
78 landData.GroupID = UUID.Parse( xtr.ReadElementString("GroupID"));
79 landData.IsGroupOwned = Convert.ToBoolean( xtr.ReadElementString("IsGroupOwned"));
80 landData.Bitmap = Convert.FromBase64String( xtr.ReadElementString("Bitmap"));
81 landData.Description = xtr.ReadElementString("Description");
82 landData.Flags = Convert.ToUInt32( xtr.ReadElementString("Flags"));
83 landData.LandingType = Convert.ToByte( xtr.ReadElementString("LandingType"));
84 landData.Name = xtr.ReadElementString("Name");
85 landData.Status = (ParcelStatus)Convert.ToSByte( xtr.ReadElementString("Status"));
86 landData.LocalID = Convert.ToInt32( xtr.ReadElementString("LocalID"));
87 landData.MediaAutoScale = Convert.ToByte( xtr.ReadElementString("MediaAutoScale"));
88 landData.MediaID = UUID.Parse( xtr.ReadElementString("MediaID"));
89 landData.MediaURL = xtr.ReadElementString("MediaURL");
90 landData.MusicURL = xtr.ReadElementString("MusicURL");
91 landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID"));
92
93 landData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
94 xtr.Read();
95 if (xtr.Name != "ParcelAccessList")
96 throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name));
97
98 if (!xtr.IsEmptyElement)
99 {
100 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
101 {
102 ParcelManager.ParcelAccessEntry pae = new ParcelManager.ParcelAccessEntry();
103
104 xtr.ReadStartElement("ParcelAccessEntry");
105 pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID"));
106 pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time"));
107 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList"));
108 xtr.ReadEndElement();
109
110 landData.ParcelAccessList.Add(pae);
111 }
112 }
113 xtr.Read();
114
115 landData.PassHours = Convert.ToSingle( xtr.ReadElementString("PassHours"));
116 landData.PassPrice = Convert.ToInt32( xtr.ReadElementString("PassPrice"));
117 landData.SalePrice = Convert.ToInt32( xtr.ReadElementString("SalePrice"));
118 landData.SnapshotID = UUID.Parse( xtr.ReadElementString("SnapshotID"));
119 landData.UserLocation = Vector3.Parse( xtr.ReadElementString("UserLocation"));
120 landData.UserLookAt = Vector3.Parse( xtr.ReadElementString("UserLookAt"));
121 landData.Dwell = Convert.ToInt32( xtr.ReadElementString("Dwell"));
122 landData.OtherCleanTime = Convert.ToInt32( xtr.ReadElementString("OtherCleanTime"));
123
124 xtr.ReadEndElement();
125
126 xtr.Close();
127 sr.Close();
128
129 return landData;
130 }
131
132 public static string Serialize(LandData landData)
133 {
134 StringWriter sw = new StringWriter();
135 XmlTextWriter xtw = new XmlTextWriter(sw);
136 xtw.Formatting = Formatting.Indented;
137
138 xtw.WriteStartDocument();
139 xtw.WriteStartElement("LandData");
140
141 xtw.WriteElementString("Area", Convert.ToString(landData.Area));
142 xtw.WriteElementString("AuctionID", Convert.ToString(landData.AuctionID));
143 xtw.WriteElementString("AuthBuyerID", landData.AuthBuyerID.ToString());
144 xtw.WriteElementString("Category", Convert.ToString((sbyte)landData.Category));
145 xtw.WriteElementString("ClaimDate", Convert.ToString(landData.ClaimDate));
146 xtw.WriteElementString("ClaimPrice", Convert.ToString(landData.ClaimPrice));
147 xtw.WriteElementString("GlobalID", landData.GlobalID.ToString());
148 xtw.WriteElementString("GroupID", landData.GroupID.ToString());
149 xtw.WriteElementString("IsGroupOwned", Convert.ToString(landData.IsGroupOwned));
150 xtw.WriteElementString("Bitmap", Convert.ToBase64String(landData.Bitmap));
151 xtw.WriteElementString("Description", landData.Description);
152 xtw.WriteElementString("Flags", Convert.ToString((uint)landData.Flags));
153 xtw.WriteElementString("LandingType", Convert.ToString((byte)landData.LandingType));
154 xtw.WriteElementString("Name", landData.Name);
155 xtw.WriteElementString("Status", Convert.ToString((sbyte)landData.Status));
156 xtw.WriteElementString("LocalID", landData.LocalID.ToString());
157 xtw.WriteElementString("MediaAutoScale", Convert.ToString(landData.MediaAutoScale));
158 xtw.WriteElementString("MediaID", landData.MediaID.ToString());
159 xtw.WriteElementString("MediaURL", landData.MediaURL);
160 xtw.WriteElementString("MusicURL", landData.MusicURL);
161 xtw.WriteElementString("OwnerID", landData.OwnerID.ToString());
162
163 xtw.WriteStartElement("ParcelAccessList");
164 foreach (ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList)
165 {
166 xtw.WriteStartElement("ParcelAccessEntry");
167 xtw.WriteElementString("AgentID", pal.AgentID.ToString());
168 xtw.WriteElementString("Time", pal.Time.ToString("s"));
169 xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags));
170 xtw.WriteEndElement();
171 }
172 xtw.WriteEndElement();
173
174 xtw.WriteElementString("PassHours", Convert.ToString(landData.PassHours));
175 xtw.WriteElementString("PassPrice", Convert.ToString(landData.PassPrice));
176 xtw.WriteElementString("SalePrice", Convert.ToString(landData.SalePrice));
177 xtw.WriteElementString("SnapshotID", landData.SnapshotID.ToString());
178 xtw.WriteElementString("UserLocation", landData.UserLocation.ToString());
179 xtw.WriteElementString("UserLookAt", landData.UserLookAt.ToString());
180 xtw.WriteElementString("Dwell", Convert.ToString(landData.Dwell));
181 xtw.WriteElementString("OtherCleanTime", Convert.ToString(landData.OtherCleanTime));
182
183 xtw.WriteEndElement();
184
185 xtw.Close();
186 sw.Close();
187
188 return sw.ToString();
189 }
190 }
191}
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
index 274f41f..b5901e1 100644
--- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Framework.Serialization.External
158 settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString()); 158 settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString());
159 break; 159 break;
160 } 160 }
161 } 161 }
162 162
163 xtr.ReadEndElement(); 163 xtr.ReadEndElement();
164 xtr.ReadStartElement("Terrain"); 164 xtr.ReadStartElement("Terrain");
@@ -200,8 +200,8 @@ namespace OpenSim.Framework.Serialization.External
200 200
201 xtw.WriteStartElement("RegionSettings"); 201 xtw.WriteStartElement("RegionSettings");
202 202
203 xtw.WriteStartElement("General"); 203 xtw.WriteStartElement("General");
204 xtw.WriteElementString("AllowDamage", settings.AllowDamage.ToString()); 204 xtw.WriteElementString("AllowDamage", settings.AllowDamage.ToString());
205 xtw.WriteElementString("AllowLandResell", settings.AllowLandResell.ToString()); 205 xtw.WriteElementString("AllowLandResell", settings.AllowLandResell.ToString());
206 xtw.WriteElementString("AllowLandJoinDivide", settings.AllowLandJoinDivide.ToString()); 206 xtw.WriteElementString("AllowLandJoinDivide", settings.AllowLandJoinDivide.ToString());
207 xtw.WriteElementString("BlockFly", settings.BlockFly.ToString()); 207 xtw.WriteElementString("BlockFly", settings.BlockFly.ToString());
diff --git a/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs b/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs
index eb77e65..fb269b7 100644
--- a/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/UserProfileSerializer.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Serialization.External
36 /// Serialize and deserialize region settings as an external format. 36 /// Serialize and deserialize region settings as an external format.
37 /// </summary> 37 /// </summary>
38 public class UserProfileSerializer 38 public class UserProfileSerializer
39 { 39 {
40 public const int MAJOR_VERSION = 0; 40 public const int MAJOR_VERSION = 0;
41 public const int MINOR_VERSION = 1; 41 public const int MINOR_VERSION = 1;
42 42
@@ -65,6 +65,6 @@ namespace OpenSim.Framework.Serialization.External
65 sw.Close(); 65 sw.Close();
66 66
67 return sw.ToString(); 67 return sw.ToString();
68 } 68 }
69 } 69 }
70} \ No newline at end of file 70} \ No newline at end of file
diff --git a/OpenSim/Framework/Serialization/TarArchiveWriter.cs b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
index 7040870..20d0f7e 100644
--- a/OpenSim/Framework/Serialization/TarArchiveWriter.cs
+++ b/OpenSim/Framework/Serialization/TarArchiveWriter.cs
@@ -40,6 +40,7 @@ namespace OpenSim.Framework.Serialization
40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 41
42 protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding(); 42 protected static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding();
43 protected static UTF8Encoding m_utf8Encoding = new UTF8Encoding();
43 44
44 /// <summary> 45 /// <summary>
45 /// Binary writer for the underlying stream 46 /// Binary writer for the underlying stream
@@ -71,7 +72,7 @@ namespace OpenSim.Framework.Serialization
71 /// <param name="data"></param> 72 /// <param name="data"></param>
72 public void WriteFile(string filePath, string data) 73 public void WriteFile(string filePath, string data)
73 { 74 {
74 WriteFile(filePath, m_asciiEncoding.GetBytes(data)); 75 WriteFile(filePath, m_utf8Encoding.GetBytes(data));
75 } 76 }
76 77
77 /// <summary> 78 /// <summary>
diff --git a/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
new file mode 100644
index 0000000..14e0462
--- /dev/null
+++ b/OpenSim/Framework/Serialization/Tests/LandDataSerializerTests.cs
@@ -0,0 +1,131 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using OpenSim.Framework;
31using OpenSim.Framework.Serialization.External;
32using OpenMetaverse;
33using OpenMetaverse.StructuredData;
34using NUnit.Framework;
35
36namespace OpenSim.Framework.Serialization.Tests
37{
38 [TestFixture]
39 public class LandDataSerializerTest
40 {
41 private LandData land;
42 private LandData landWithParcelAccessList;
43
44 private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
45 private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
46
47
48
49
50 [SetUp]
51 public void setup()
52 {
53 // setup LandData object
54 this.land = new LandData();
55 this.land.AABBMax = new Vector3(0, 0, 0);
56 this.land.AABBMin = new Vector3(128, 128, 128);
57 this.land.Area = 128;
58 this.land.AuctionID = 0;
59 this.land.AuthBuyerID = new UUID();
60 this.land.Category = ParcelCategory.Residential;
61 this.land.ClaimDate = 0;
62 this.land.ClaimPrice = 0;
63 this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50");
64 this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5");
65 this.land.GroupPrims = 0;
66 this.land.Description = "land data to test LandDataSerializer";
67 this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat);
68 this.land.LandingType = (byte)LandingType.Direct;
69 this.land.Name = "LandDataSerializerTest Land";
70 this.land.Status = ParcelStatus.Leased;
71 this.land.LocalID = 0;
72 this.land.MediaAutoScale = (byte)0x01;
73 this.land.MediaID = new UUID("d4452578-2f25-4b97-a81b-819af559cfd7");
74 this.land.MediaURL = "http://videos.opensimulator.org/bumblebee.mp4";
75 this.land.OwnerID = new UUID("1b8eedf9-6d15-448b-8015-24286f1756bf");
76
77 this.landWithParcelAccessList = this.land.Copy();
78 this.landWithParcelAccessList.ParcelAccessList.Clear();
79
80 ParcelManager.ParcelAccessEntry pae0 = new ParcelManager.ParcelAccessEntry();
81 pae0.AgentID = new UUID("62d65d45-c91a-4f77-862c-46557d978b6c");
82 pae0.Flags = AccessList.Ban;
83 pae0.Time = new DateTime(2009, 10, 01);
84 this.landWithParcelAccessList.ParcelAccessList.Add(pae0);
85
86 ParcelManager.ParcelAccessEntry pae1 = new ParcelManager.ParcelAccessEntry();
87 pae1.AgentID = new UUID("ec2a8d18-2378-4fe0-8b68-2a31b57c481e");
88 pae1.Flags = AccessList.Access;
89 pae1.Time = new DateTime(2010, 10, 20);
90 this.landWithParcelAccessList.ParcelAccessList.Add(pae1);
91 }
92
93 /// <summary>
94 /// Test the LandDataSerializer.Serialize() method
95 /// </summary>
96 [Test]
97 public void LandDataSerializerSerializeTest()
98 {
99 string serialized = LandDataSerializer.Serialize(this.land);
100 Assert.That(serialized.Length > 0, "Serialize(LandData) returned empty string");
101 Assert.That(serialized == LandDataSerializerTest.preSerialized,
102 "result of Serialize(LandData) does not match expected result");
103
104 string serializedWithParcelAccessList = LandDataSerializer.Serialize(this.landWithParcelAccessList);
105 Assert.That(serializedWithParcelAccessList.Length > 0,
106 "Serialize(LandData) returned empty string for LandData object with ParcelAccessList");
107 Assert.That(serializedWithParcelAccessList == LandDataSerializerTest.preSerializedWithParcelAccessList,
108 "result of Serialize(LandData) does not match expected result (pre-serialized with parcel access list");
109 }
110
111 /// <summary>
112 /// Test the LandDataSerializer.Deserialize() method
113 /// </summary>
114 [Test]
115 public void TestLandDataSerializerDeserializeFromStringTest()
116 {
117 LandData reifiedLandData = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerialized);
118 Assert.That(reifiedLandData != null, "Deserialize(string) returned null");
119 Assert.That(reifiedLandData.GlobalID == this.land.GlobalID, "Reified LandData.GlobalID != original LandData.GlobalID");
120 Assert.That(reifiedLandData.Name == this.land.Name, "Reified LandData.Name != original LandData.Name");
121
122 LandData reifiedLandDataWithParcelAccessList = LandDataSerializer.Deserialize(LandDataSerializerTest.preSerializedWithParcelAccessList);
123 Assert.That(reifiedLandDataWithParcelAccessList != null,
124 "Deserialize(string) returned null (pre-serialized with parcel access list)");
125 Assert.That(reifiedLandDataWithParcelAccessList.GlobalID == this.landWithParcelAccessList.GlobalID,
126 "Reified LandData.GlobalID != original LandData.GlobalID (pre-serialized with parcel access list)");
127 Assert.That(reifiedLandDataWithParcelAccessList.Name == this.landWithParcelAccessList.Name,
128 "Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)");
129 }
130 }
131}
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 7a244ff..632b551 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Framework.Servers
158 m_consoleAppender.Threshold = Level.All; 158 m_consoleAppender.Threshold = Level.All;
159 159
160 Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold)); 160 Notice(String.Format("Console log level is {0}", m_consoleAppender.Threshold));
161 } 161 }
162 162
163 m_console.Commands.AddCommand("base", false, "quit", 163 m_console.Commands.AddCommand("base", false, "quit",
164 "quit", 164 "quit",
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Servers
196 196
197 /// <summary> 197 /// <summary>
198 /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing 198 /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
199 /// </summary> 199 /// </summary>
200 public virtual void ShutdownSpecific() {} 200 public virtual void ShutdownSpecific() {}
201 201
202 /// <summary> 202 /// <summary>
@@ -286,7 +286,7 @@ namespace OpenSim.Framework.Servers
286 /// </summary> 286 /// </summary>
287 public virtual void Startup() 287 public virtual void Startup()
288 { 288 {
289 m_log.Info("[STARTUP]: Beginning startup processing"); 289 m_log.Info("[STARTUP]: Beginning startup processing");
290 290
291 EnhanceVersionInformation(); 291 EnhanceVersionInformation();
292 292
@@ -301,7 +301,7 @@ namespace OpenSim.Framework.Servers
301 301
302 /// <summary> 302 /// <summary>
303 /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing 303 /// Should be overriden and referenced by descendents if they need to perform extra shutdown processing
304 /// </summary> 304 /// </summary>
305 public virtual void Shutdown() 305 public virtual void Shutdown()
306 { 306 {
307 ShutdownSpecific(); 307 ShutdownSpecific();
@@ -367,7 +367,7 @@ namespace OpenSim.Framework.Servers
367 } 367 }
368 368
369 public virtual void HandleShow(string module, string[] cmd) 369 public virtual void HandleShow(string module, string[] cmd)
370 { 370 {
371 List<string> args = new List<string>(cmd); 371 List<string> args = new List<string>(cmd);
372 372
373 args.RemoveAt(0); 373 args.RemoveAt(0);
@@ -375,7 +375,7 @@ namespace OpenSim.Framework.Servers
375 string[] showParams = args.ToArray(); 375 string[] showParams = args.ToArray();
376 376
377 switch (showParams[0]) 377 switch (showParams[0])
378 { 378 {
379 case "info": 379 case "info":
380 Notice("Version: " + m_version); 380 Notice("Version: " + m_version);
381 Notice("Startup directory: " + m_startupDirectory); 381 Notice("Startup directory: " + m_startupDirectory);
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs
deleted file mode 100644
index ad5281d..0000000
--- a/OpenSim/Framework/Servers/CheckSumServer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
diff --git a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
index 48e1370..e52ef9e 100644
--- a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
@@ -182,7 +182,7 @@ namespace OpenSim.Framework.Servers.HttpServer
182 "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e); 182 "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e);
183 } 183 }
184 184
185 }, null); 185 }, null);
186 } 186 }
187 } 187 }
188} 188}
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 771ae05..6c63c6c 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Servers.HttpServer
110 110
111 public BaseHttpServer(uint port, bool ssl) : this (port) 111 public BaseHttpServer(uint port, bool ssl) : this (port)
112 { 112 {
113 m_ssl = ssl; 113 m_ssl = ssl;
114 } 114 }
115 115
116 public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl) 116 public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl)
@@ -156,7 +156,7 @@ namespace OpenSim.Framework.Servers.HttpServer
156 lock (m_rpcHandlers) 156 lock (m_rpcHandlers)
157 { 157 {
158 m_rpcHandlers[method] = handler; 158 m_rpcHandlers[method] = handler;
159 m_rpcHandlersKeepAlive[method] = keepAlive; // default 159 m_rpcHandlersKeepAlive[method] = keepAlive; // default
160 } 160 }
161 161
162 return true; 162 return true;
@@ -256,13 +256,51 @@ namespace OpenSim.Framework.Servers.HttpServer
256 IHttpClientContext context = (IHttpClientContext)source; 256 IHttpClientContext context = (IHttpClientContext)source;
257 IHttpRequest request = args.Request; 257 IHttpRequest request = args.Request;
258 258
259
260 PollServiceEventArgs psEvArgs; 259 PollServiceEventArgs psEvArgs;
260
261 if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs)) 261 if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs))
262 { 262 {
263 263 PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request);
264 m_PollServiceManager.Enqueue(new PollServiceHttpRequest(psEvArgs, context, request)); 264
265 //DoHTTPGruntWork(psEvArgs.NoEvents(),new OSHttpResponse(new HttpResponse(context, request))); 265 if (psEvArgs.Request != null)
266 {
267 OSHttpRequest req = new OSHttpRequest(context, request);
268
269 Stream requestStream = req.InputStream;
270
271 Encoding encoding = Encoding.UTF8;
272 StreamReader reader = new StreamReader(requestStream, encoding);
273
274 string requestBody = reader.ReadToEnd();
275
276 Hashtable keysvals = new Hashtable();
277 Hashtable headervals = new Hashtable();
278
279 string[] querystringkeys = req.QueryString.AllKeys;
280 string[] rHeaders = req.Headers.AllKeys;
281
282 keysvals.Add("body", requestBody);
283 keysvals.Add("uri", req.RawUrl);
284 keysvals.Add("content-type", req.ContentType);
285 keysvals.Add("http-method", req.HttpMethod);
286
287 foreach (string queryname in querystringkeys)
288 {
289 keysvals.Add(queryname, req.QueryString[queryname]);
290 }
291
292 foreach (string headername in rHeaders)
293 {
294 headervals[headername] = req.Headers[headername];
295 }
296
297 keysvals.Add("headers",headervals);
298 keysvals.Add("querystringkeys", querystringkeys);
299
300 psEvArgs.Request(psreq.RequestID, keysvals);
301 }
302
303 m_PollServiceManager.Enqueue(psreq);
266 } 304 }
267 else 305 else
268 { 306 {
@@ -275,49 +313,17 @@ namespace OpenSim.Framework.Servers.HttpServer
275 { 313 {
276 OSHttpRequest req = new OSHttpRequest(context, request); 314 OSHttpRequest req = new OSHttpRequest(context, request);
277 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context); 315 OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request),context);
278 //resp.KeepAlive = req.KeepAlive;
279 //m_log.Info("[Debug BASE HTTP SERVER]: Got Request");
280 //HttpServerContextObj objstate= new HttpServerContextObj(req,resp);
281 //ThreadPool.QueueUserWorkItem(new WaitCallback(ConvertIHttpClientContextToOSHttp), (object)objstate);
282 HandleRequest(req, resp); 316 HandleRequest(req, resp);
283 } 317 }
284 318
285 public void ConvertIHttpClientContextToOSHttp(object stateinfo) 319 public void ConvertIHttpClientContextToOSHttp(object stateinfo)
286 { 320 {
287 HttpServerContextObj objstate = (HttpServerContextObj)stateinfo; 321 HttpServerContextObj objstate = (HttpServerContextObj)stateinfo;
288 //OSHttpRequest request = new OSHttpRequest(objstate.context,objstate.req);
289 //OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(objstate.context, objstate.req));
290 322
291 OSHttpRequest request = objstate.oreq; 323 OSHttpRequest request = objstate.oreq;
292 OSHttpResponse resp = objstate.oresp; 324 OSHttpResponse resp = objstate.oresp;
293 //OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(objstate.context, objstate.req));
294 325
295 /* 326 HandleRequest(request,resp);
296 request.AcceptTypes = objstate.req.AcceptTypes;
297 request.ContentLength = (long)objstate.req.ContentLength;
298 request.Headers = objstate.req.Headers;
299 request.HttpMethod = objstate.req.Method;
300 request.InputStream = objstate.req.Body;
301 foreach (string str in request.Headers)
302 {
303 if (str.ToLower().Contains("content-type: "))
304 {
305 request.ContentType = str.Substring(13, str.Length - 13);
306 break;
307 }
308 }
309 //request.KeepAlive = objstate.req.
310 foreach (HttpServer.HttpInput httpinput in objstate.req.QueryString)
311 {
312 request.QueryString.Add(httpinput.Name, httpinput[httpinput.Name]);
313 }
314
315 //request.Query = objstate.req.//objstate.req.QueryString;
316 //foreach (
317 //request.QueryString = objstate.req.QueryString;
318
319 */
320 HandleRequest(request,resp);
321 } 327 }
322 328
323 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) 329 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
@@ -332,6 +338,7 @@ namespace OpenSim.Framework.Servers.HttpServer
332 // probability event; if a request is matched it is normally expected to be 338 // probability event; if a request is matched it is normally expected to be
333 // handled 339 // handled
334 //m_log.Debug("[BASE HTTP SERVER]: Handling Request" + request.RawUrl); 340 //m_log.Debug("[BASE HTTP SERVER]: Handling Request" + request.RawUrl);
341
335 IHttpAgentHandler agentHandler; 342 IHttpAgentHandler agentHandler;
336 343
337 if (TryGetAgentHandler(request, response, out agentHandler)) 344 if (TryGetAgentHandler(request, response, out agentHandler))
@@ -342,10 +349,11 @@ namespace OpenSim.Framework.Servers.HttpServer
342 } 349 }
343 } 350 }
344 351
345 IRequestHandler requestHandler;
346 //response.KeepAlive = true; 352 //response.KeepAlive = true;
347 response.SendChunked = false; 353 response.SendChunked = false;
348 354
355 IRequestHandler requestHandler;
356
349 string path = request.RawUrl; 357 string path = request.RawUrl;
350 string handlerKey = GetHandlerKey(request.HttpMethod, path); 358 string handlerKey = GetHandlerKey(request.HttpMethod, path);
351 359
@@ -359,6 +367,7 @@ namespace OpenSim.Framework.Servers.HttpServer
359 367
360 response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type. 368 response.ContentType = requestHandler.ContentType; // Lets do this defaulting before in case handler has varying content type.
361 369
370
362 if (requestHandler is IStreamedRequestHandler) 371 if (requestHandler is IStreamedRequestHandler)
363 { 372 {
364 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; 373 IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
@@ -404,6 +413,7 @@ namespace OpenSim.Framework.Servers.HttpServer
404 // } 413 // }
405 414
406 keysvals.Add("requestbody", requestBody); 415 keysvals.Add("requestbody", requestBody);
416 keysvals.Add("headers",headervals);
407 if (keysvals.Contains("method")) 417 if (keysvals.Contains("method"))
408 { 418 {
409 //m_log.Warn("[HTTP]: Contains Method"); 419 //m_log.Warn("[HTTP]: Contains Method");
@@ -702,7 +712,7 @@ namespace OpenSim.Framework.Servers.HttpServer
702 lock (m_rpcHandlers) 712 lock (m_rpcHandlers)
703 { 713 {
704 methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); 714 methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method);
705 } 715 }
706 716
707 if (methodWasFound) 717 if (methodWasFound)
708 { 718 {
@@ -726,8 +736,11 @@ namespace OpenSim.Framework.Servers.HttpServer
726 else 736 else
727 { 737 {
728 xmlRpcResponse = new XmlRpcResponse(); 738 xmlRpcResponse = new XmlRpcResponse();
739
729 // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php 740 // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
730 xmlRpcResponse.SetFault(-32601, String.Format("Requested method [{0}] not found", methodName)); 741 xmlRpcResponse.SetFault(
742 XmlRpcErrorCodes.SERVER_ERROR_METHOD,
743 String.Format("Requested method [{0}] not found", methodName));
731 } 744 }
732 745
733 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); 746 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
@@ -747,6 +760,7 @@ namespace OpenSim.Framework.Servers.HttpServer
747 response.SendChunked = false; 760 response.SendChunked = false;
748 response.ContentLength64 = buf.Length; 761 response.ContentLength64 = buf.Length;
749 response.ContentEncoding = Encoding.UTF8; 762 response.ContentEncoding = Encoding.UTF8;
763
750 try 764 try
751 { 765 {
752 response.OutputStream.Write(buf, 0, buf.Length); 766 response.OutputStream.Write(buf, 0, buf.Length);
@@ -917,7 +931,7 @@ namespace OpenSim.Framework.Servers.HttpServer
917 } 931 }
918 catch (IOException e) 932 catch (IOException e)
919 { 933 {
920 m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e); 934 m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e);
921 } 935 }
922 catch (SocketException e) 936 catch (SocketException e)
923 { 937 {
@@ -1354,7 +1368,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1354 bestMatch = pattern; 1368 bestMatch = pattern;
1355 } 1369 }
1356 } 1370 }
1357 } 1371 }
1358 1372
1359 if (String.IsNullOrEmpty(bestMatch)) 1373 if (String.IsNullOrEmpty(bestMatch))
1360 { 1374 {
@@ -1466,7 +1480,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1466 { 1480 {
1467 m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); 1481 m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
1468 } 1482 }
1469 } 1483 }
1470 } 1484 }
1471 1485
1472 public void SendHTML404(OSHttpResponse response, string host) 1486 public void SendHTML404(OSHttpResponse response, string host)
@@ -1575,7 +1589,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1575 // if you want more detailed trace information from the HttpServer 1589 // if you want more detailed trace information from the HttpServer
1576 //m_httpListener2.UseTraceLogs = true; 1590 //m_httpListener2.UseTraceLogs = true;
1577 1591
1578 //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; 1592 //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
1579 } 1593 }
1580 else 1594 else
1581 { 1595 {
@@ -1610,7 +1624,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1610 } 1624 }
1611 1625
1612 public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err) 1626 public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err)
1613 { 1627 {
1614 switch (err) 1628 switch (err)
1615 { 1629 {
1616 case SocketError.NotSocket: 1630 case SocketError.NotSocket:
@@ -1621,7 +1635,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1621 } 1635 }
1622 1636
1623 public void httpServerException(object source, Exception exception) 1637 public void httpServerException(object source, Exception exception)
1624 { 1638 {
1625 m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString()); 1639 m_log.ErrorFormat("[HTTPSERVER]: {0} had an exception {1}", source.ToString(), exception.ToString());
1626 /* 1640 /*
1627 if (HTTPDRunning)// && NotSocketErrors > 5) 1641 if (HTTPDRunning)// && NotSocketErrors > 5)
@@ -1648,7 +1662,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1648 } 1662 }
1649 catch (NullReferenceException) 1663 catch (NullReferenceException)
1650 { 1664 {
1651 m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer."); 1665 m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer.");
1652 } 1666 }
1653 1667
1654 } 1668 }
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
index 1bdf4fa..d13408d 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs
@@ -128,6 +128,6 @@ namespace OpenSim.Framework.Servers.HttpServer
128 128
129 string GetHTTP404(string host); 129 string GetHTTP404(string host);
130 130
131 string GetHTTP500(); 131 string GetHTTP500();
132 } 132 }
133} 133}
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
index fed490e..9d512c6 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs
@@ -30,20 +30,23 @@ using System.Collections;
30using OpenMetaverse; 30using OpenMetaverse;
31namespace OpenSim.Framework.Servers.HttpServer 31namespace OpenSim.Framework.Servers.HttpServer
32{ 32{
33 public delegate bool HasEventsMethod(UUID pId); 33 public delegate void RequestMethod(UUID requestID, Hashtable request);
34 public delegate bool HasEventsMethod(UUID requestID, UUID pId);
34 35
35 public delegate Hashtable GetEventsMethod(UUID pId, string request); 36 public delegate Hashtable GetEventsMethod(UUID requestID, UUID pId, string request);
36 37
37 public delegate Hashtable NoEventsMethod(); 38 public delegate Hashtable NoEventsMethod(UUID requestID, UUID pId);
38 39
39 public class PollServiceEventArgs : EventArgs 40 public class PollServiceEventArgs : EventArgs
40 { 41 {
41 public HasEventsMethod HasEvents; 42 public HasEventsMethod HasEvents;
42 public GetEventsMethod GetEvents; 43 public GetEventsMethod GetEvents;
43 public NoEventsMethod NoEvents; 44 public NoEventsMethod NoEvents;
45 public RequestMethod Request;
44 public UUID Id; 46 public UUID Id;
45 public PollServiceEventArgs(HasEventsMethod pHasEvents, GetEventsMethod pGetEvents, NoEventsMethod pNoEvents,UUID pId) 47 public PollServiceEventArgs(RequestMethod pRequest, HasEventsMethod pHasEvents, GetEventsMethod pGetEvents, NoEventsMethod pNoEvents,UUID pId)
46 { 48 {
49 Request = pRequest;
47 HasEvents = pHasEvents; 50 HasEvents = pHasEvents;
48 GetEvents = pGetEvents; 51 GetEvents = pGetEvents;
49 NoEvents = pNoEvents; 52 NoEvents = pNoEvents;
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
index ff7c1e8..553a7eb 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using HttpServer; 29using HttpServer;
30using OpenMetaverse;
30 31
31namespace OpenSim.Framework.Servers.HttpServer 32namespace OpenSim.Framework.Servers.HttpServer
32{ 33{
@@ -37,12 +38,14 @@ namespace OpenSim.Framework.Servers.HttpServer
37 public readonly IHttpClientContext HttpContext; 38 public readonly IHttpClientContext HttpContext;
38 public readonly IHttpRequest Request; 39 public readonly IHttpRequest Request;
39 public readonly int RequestTime; 40 public readonly int RequestTime;
41 public readonly UUID RequestID;
40 public PollServiceHttpRequest(PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest) 42 public PollServiceHttpRequest(PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest)
41 { 43 {
42 PollServiceArgs = pPollServiceArgs; 44 PollServiceArgs = pPollServiceArgs;
43 HttpContext = pHttpContext; 45 HttpContext = pHttpContext;
44 Request = pRequest; 46 Request = pRequest;
45 RequestTime = System.Environment.TickCount; 47 RequestTime = System.Environment.TickCount;
48 RequestID = UUID.Random();
46 } 49 }
47 } 50 }
48} 51}
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 4020190..1c54581 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -130,7 +130,7 @@ namespace OpenSim.Framework.Servers.HttpServer
130 foreach (object o in m_requests) 130 foreach (object o in m_requests)
131 { 131 {
132 PollServiceHttpRequest req = (PollServiceHttpRequest) o; 132 PollServiceHttpRequest req = (PollServiceHttpRequest) o;
133 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext)); 133 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id), new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request), req.HttpContext));
134 } 134 }
135 135
136 m_requests.Clear(); 136 m_requests.Clear();
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index 41fb376..ce32443 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -100,11 +100,11 @@ namespace OpenSim.Framework.Servers.HttpServer
100 PollServiceHttpRequest req = m_request.Dequeue(); 100 PollServiceHttpRequest req = m_request.Dequeue();
101 try 101 try
102 { 102 {
103 if (req.PollServiceArgs.HasEvents(req.PollServiceArgs.Id)) 103 if (req.PollServiceArgs.HasEvents(req.RequestID, req.PollServiceArgs.Id))
104 { 104 {
105 StreamReader str = new StreamReader(req.Request.Body); 105 StreamReader str = new StreamReader(req.Request.Body);
106 106
107 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.PollServiceArgs.Id, str.ReadToEnd()); 107 Hashtable responsedata = req.PollServiceArgs.GetEvents(req.RequestID, req.PollServiceArgs.Id, str.ReadToEnd());
108 m_server.DoHTTPGruntWork(responsedata, 108 m_server.DoHTTPGruntWork(responsedata,
109 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext)); 109 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext));
110 } 110 }
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Servers.HttpServer
112 { 112 {
113 if ((Environment.TickCount - req.RequestTime) > m_timeout) 113 if ((Environment.TickCount - req.RequestTime) > m_timeout)
114 { 114 {
115 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(), 115 m_server.DoHTTPGruntWork(req.PollServiceArgs.NoEvents(req.RequestID, req.PollServiceArgs.Id),
116 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext)); 116 new OSHttpResponse(new HttpResponse(req.HttpContext, req.Request),req.HttpContext));
117 } 117 }
118 else 118 else
diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
new file mode 100644
index 0000000..a0d4008
--- /dev/null
+++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
@@ -0,0 +1,95 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
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
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.IO;
30using System.Net;
31using System.Text;
32using System.Xml;
33using System.Xml.Serialization;
34
35namespace OpenSim.Framework.Servers.HttpServer
36{
37 public class SynchronousRestFormsRequester
38 {
39 /// <summary>
40 /// Perform a synchronous REST request.
41 /// </summary>
42 /// <param name="verb"></param>
43 /// <param name="requestUrl"></param>
44 /// <param name="obj"> </param>
45 /// <returns></returns>
46 ///
47 /// <exception cref="System.Net.WebException">Thrown if we encounter a network issue while posting
48 /// the request. You'll want to make sure you deal with this as they're not uncommon</exception>
49 public static string MakeRequest(string verb, string requestUrl, string obj)
50 {
51 WebRequest request = WebRequest.Create(requestUrl);
52 request.Method = verb;
53
54 if ((verb == "POST") || (verb == "PUT"))
55 {
56 request.ContentType = "text/www-form-urlencoded";
57
58 MemoryStream buffer = new MemoryStream();
59 int length = 0;
60 using (StreamWriter writer = new StreamWriter(buffer))
61 {
62 writer.Write(obj);
63 writer.Flush();
64 }
65
66 length = (int)obj.Length;
67 request.ContentLength = length;
68
69 Stream requestStream = request.GetRequestStream();
70 requestStream.Write(buffer.ToArray(), 0, length);
71 }
72
73 string respstring = String.Empty;
74
75 try
76 {
77 using (WebResponse resp = request.GetResponse())
78 {
79 if (resp.ContentLength > 0)
80 {
81 using (StreamReader reader = new StreamReader(resp.GetResponseStream()))
82 {
83 respstring = reader.ReadToEnd();
84 }
85 }
86 }
87 }
88 catch (System.InvalidOperationException)
89 {
90 // This is what happens when there is invalid XML
91 }
92 return respstring;
93 }
94 }
95}
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index 6f9b00c..9f98310 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -29,7 +29,7 @@ namespace OpenSim
29{ 29{
30 public class VersionInfo 30 public class VersionInfo
31 { 31 {
32 private const string VERSION_NUMBER = "0.6.6"; 32 private const string VERSION_NUMBER = "0.6.8";
33 private const Flavour VERSION_FLAVOUR = Flavour.Dev; 33 private const Flavour VERSION_FLAVOUR = Flavour.Dev;
34 34
35 public enum Flavour 35 public enum Flavour
@@ -56,7 +56,7 @@ namespace OpenSim
56 public const int VERSIONINFO_VERSION_LENGTH = 27; 56 public const int VERSIONINFO_VERSION_LENGTH = 27;
57 57
58 /// <value> 58 /// <value>
59 /// This is the external interface version. It is separate from the OpenSimulator project version. 59 /// This is the external interface version. It is separate from the OpenSimulator project version.
60 /// 60 ///
61 /// This version number should be 61 /// This version number should be
62 /// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible 62 /// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible
@@ -67,7 +67,7 @@ namespace OpenSim
67 /// 67 ///
68 /// Having this version number allows the grid service to reject connections from regions running a version 68 /// Having this version number allows the grid service to reject connections from regions running a version
69 /// of the code that is too old. 69 /// of the code that is too old.
70 /// 70 ///
71 /// </value> 71 /// </value>
72 public readonly static int MajorInterfaceVersion = 6; 72 public readonly static int MajorInterfaceVersion = 6;
73 } 73 }
diff --git a/OpenSim/Framework/SimStats.cs b/OpenSim/Framework/SimStats.cs
index 084964d..3d8f32f 100644
--- a/OpenSim/Framework/SimStats.cs
+++ b/OpenSim/Framework/SimStats.cs
@@ -35,9 +35,9 @@ namespace OpenSim.Framework
35 /// 35 ///
36 /// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats 36 /// TODO: This looks very much like the OpenMetaverse SimStatsPacket. It should be much more generic stats
37 /// storage. 37 /// storage.
38 /// </summary> 38 /// </summary>
39 public class SimStats 39 public class SimStats
40 { 40 {
41 public uint RegionX 41 public uint RegionX
42 { 42 {
43 get { return m_regionX; } 43 get { return m_regionX; }
@@ -47,25 +47,25 @@ namespace OpenSim.Framework
47 public uint RegionY 47 public uint RegionY
48 { 48 {
49 get { return m_regionY; } 49 get { return m_regionY; }
50 } 50 }
51 private uint m_regionY; 51 private uint m_regionY;
52 52
53 public SimStatsPacket.RegionBlock RegionBlock 53 public SimStatsPacket.RegionBlock RegionBlock
54 { 54 {
55 get { return m_regionBlock; } 55 get { return m_regionBlock; }
56 } 56 }
57 private SimStatsPacket.RegionBlock m_regionBlock; 57 private SimStatsPacket.RegionBlock m_regionBlock;
58 58
59 public SimStatsPacket.StatBlock[] StatsBlock 59 public SimStatsPacket.StatBlock[] StatsBlock
60 { 60 {
61 get { return m_statsBlock; } 61 get { return m_statsBlock; }
62 } 62 }
63 private SimStatsPacket.StatBlock[] m_statsBlock; 63 private SimStatsPacket.StatBlock[] m_statsBlock;
64 64
65 public uint RegionFlags 65 public uint RegionFlags
66 { 66 {
67 get { return m_regionFlags; } 67 get { return m_regionFlags; }
68 } 68 }
69 private uint m_regionFlags; 69 private uint m_regionFlags;
70 70
71 public uint ObjectCapacity 71 public uint ObjectCapacity
@@ -76,7 +76,7 @@ namespace OpenSim.Framework
76 76
77 public UUID RegionUUID 77 public UUID RegionUUID
78 { 78 {
79 get { return regionUUID;} 79 get { return regionUUID; }
80 } 80 }
81 private UUID regionUUID; 81 private UUID regionUUID;
82 82
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs
index 946d7f5..25ae6b0 100644
--- a/OpenSim/Framework/TaskInventoryDictionary.cs
+++ b/OpenSim/Framework/TaskInventoryDictionary.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Framework
38 /// A dictionary for task inventory. 38 /// A dictionary for task inventory.
39 /// </summary> 39 /// </summary>
40 /// This class is not thread safe. Callers must synchronize on Dictionary methods or Clone() this object before 40 /// This class is not thread safe. Callers must synchronize on Dictionary methods or Clone() this object before
41 /// iterating over it. 41 /// iterating over it.
42 public class TaskInventoryDictionary : Dictionary<UUID, TaskInventoryItem>, 42 public class TaskInventoryDictionary : Dictionary<UUID, TaskInventoryItem>,
43 ICloneable, IXmlSerializable 43 ICloneable, IXmlSerializable
44 { 44 {
diff --git a/OpenSim/Framework/ThreadTracker.cs b/OpenSim/Framework/ThreadTracker.cs
index fa6f0b8..d3a239d 100644
--- a/OpenSim/Framework/ThreadTracker.cs
+++ b/OpenSim/Framework/ThreadTracker.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework
57 } 57 }
58 58
59 private static void ThreadTrackerThreadLoop() 59 private static void ThreadTrackerThreadLoop()
60 { 60 {
61 try 61 try
62 { 62 {
63 while (true) 63 while (true)
@@ -70,8 +70,8 @@ namespace OpenSim.Framework
70 { 70 {
71 m_log.ErrorFormat( 71 m_log.ErrorFormat(
72 "[THREAD TRACKER]: Thread tracker cleanup thread terminating with exception. Please report this error. Exception is {0}", 72 "[THREAD TRACKER]: Thread tracker cleanup thread terminating with exception. Please report this error. Exception is {0}",
73 e); 73 e);
74 } 74 }
75 } 75 }
76 76
77 public static void Add(Thread thread) 77 public static void Add(Thread thread)
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs
index 16f265c..0fa82cf 100644
--- a/OpenSim/Framework/UserConfig.cs
+++ b/OpenSim/Framework/UserConfig.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Framework
133 m_configMember.addConfigurationOption("library_location", 133 m_configMember.addConfigurationOption("library_location",
134 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, 134 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
135 "Path to library control file", 135 "Path to library control file",
136 string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false); 136 string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false);
137 137
138 m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 138 m_configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
139 "DLL for database provider", "OpenSim.Data.MySQL.dll", false); 139 "DLL for database provider", "OpenSim.Data.MySQL.dll", false);
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs
index f51a199..413f152 100644
--- a/OpenSim/Framework/UserProfileData.cs
+++ b/OpenSim/Framework/UserProfileData.cs
@@ -217,7 +217,7 @@ namespace OpenSim.Framework
217 public string Name 217 public string Name
218 { 218 {
219 get { return String.Format("{0} {1}", m_firstname, m_surname); } 219 get { return String.Format("{0} {1}", m_firstname, m_surname); }
220 } 220 }
221 221
222 public string Email 222 public string Email
223 { 223 {
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 58344f3..17fc58c 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Framework
54 /// </summary> 54 /// </summary>
55 public class Util 55 public class Util
56 { 56 {
57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 57 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
58 58
59 private static uint nextXferID = 5000; 59 private static uint nextXferID = 5000;
60 private static Random randomClass = new Random(); 60 private static Random randomClass = new Random();
@@ -70,6 +70,39 @@ namespace OpenSim.Framework
70 public static readonly Regex UUIDPattern 70 public static readonly Regex UUIDPattern
71 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); 71 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
72 72
73 /// <summary>
74 /// Linear interpolates B<->C using percent A
75 /// </summary>
76 /// <param name="a"></param>
77 /// <param name="b"></param>
78 /// <param name="c"></param>
79 /// <returns></returns>
80 public static double lerp(double a, double b, double c)
81 {
82 return (b*a) + (c*(1 - a));
83 }
84
85 /// <summary>
86 /// Bilinear Interpolate, see Lerp but for 2D using 'percents' X & Y.
87 /// Layout:
88 /// A B
89 /// C D
90 /// A<->C = Y
91 /// C<->D = X
92 /// </summary>
93 /// <param name="x"></param>
94 /// <param name="y"></param>
95 /// <param name="a"></param>
96 /// <param name="b"></param>
97 /// <param name="c"></param>
98 /// <param name="d"></param>
99 /// <returns></returns>
100 public static double lerp2D(double x, double y, double a, double b, double c, double d)
101 {
102 return lerp(y, lerp(x, a, b), lerp(x, c, d));
103 }
104
105
73 /// <value> 106 /// <value>
74 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) 107 /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards)
75 /// </value> 108 /// </value>
@@ -103,7 +136,7 @@ namespace OpenSim.Framework
103 float dx = a.X - b.X; 136 float dx = a.X - b.X;
104 float dy = a.Y - b.Y; 137 float dy = a.Y - b.Y;
105 float dz = a.Z - b.Z; 138 float dz = a.Z - b.Z;
106 return (dx*dx + dy*dy + dz*dz) < (amount*amount); 139 return (dx*dx + dy*dy + dz*dz) < (amount*amount);
107 } 140 }
108 141
109 /// <summary> 142 /// <summary>
@@ -942,7 +975,7 @@ namespace OpenSim.Framework
942 else 975 else
943 { 976 {
944 os = ReadEtcIssue(); 977 os = ReadEtcIssue();
945 } 978 }
946 979
947 if (os.Length > 45) 980 if (os.Length > 45)
948 { 981 {
@@ -1170,6 +1203,32 @@ namespace OpenSim.Framework
1170 return found.ToArray(); 1203 return found.ToArray();
1171 } 1204 }
1172 1205
1206 public static string ServerURI(string uri)
1207 {
1208 if (uri == string.Empty)
1209 return string.Empty;
1210
1211 // Get rid of eventual slashes at the end
1212 uri = uri.TrimEnd('/');
1213
1214 IPAddress ipaddr1 = null;
1215 string port1 = "";
1216 try
1217 {
1218 ipaddr1 = Util.GetHostFromURL(uri);
1219 }
1220 catch { }
1221
1222 try
1223 {
1224 port1 = uri.Split(new char[] { ':' })[2];
1225 }
1226 catch { }
1227
1228 // We tried our best to convert the domain names to IP addresses
1229 return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri;
1230 }
1231
1173 #region FireAndForget Threading Pattern 1232 #region FireAndForget Threading Pattern
1174 1233
1175 public static void FireAndForget(System.Threading.WaitCallback callback) 1234 public static void FireAndForget(System.Threading.WaitCallback callback)