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.cs8
-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.cs2
-rw-r--r--OpenSim/Framework/Communications/TemporaryUserProfilePlugin.cs6
-rw-r--r--OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs4
-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.cs14
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs10
-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.cs2
-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/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.cs22
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IHttpServer.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs4
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs4
-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.cs32
55 files changed, 570 insertions, 396 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 15c5a96..dfa059d 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications
98 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 98 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
99 /// <param name="friend">The agent that is getting or loosing permissions</param> 99 /// <param name="friend">The agent that is getting or loosing permissions</param>
100 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> 100 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
101 void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms); 101 void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
102 102
103 /// <summary> 103 /// <summary>
104 /// Logs off a user on the user server 104 /// Logs off a user on the user server
@@ -128,9 +128,9 @@ 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
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Communications
149 /// <param name="userID"></param> 149 /// <param name="userID"></param>
150 /// <param name="password"></param> 150 /// <param name="password"></param>
151 /// <returns></returns> 151 /// <returns></returns>
152 bool AuthenticateUserByPassword(UUID userID, string password); 152 bool AuthenticateUserByPassword(UUID userID, string password);
153 153
154 // Temporary Hack until we move everything to the new service model 154 // Temporary Hack until we move everything to the new service model
155 void SetInventoryService(IInventoryService invService); 155 void SetInventoryService(IInventoryService invService);
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 a6cd918..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
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 a757282..caaebd7 100644
--- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
+++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs
@@ -152,8 +152,8 @@ namespace OpenSim.Framework.Communications.Tests
152 152
153 public virtual bool AuthenticateUserByPassword(UUID userID, string password) 153 public virtual bool AuthenticateUserByPassword(UUID userID, string password)
154 { 154 {
155 throw new NotImplementedException(); 155 throw new NotImplementedException();
156 } 156 }
157 } 157 }
158 } 158 }
159} 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 1abd733..bf4f331 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -94,9 +94,9 @@ namespace OpenSim.Framework.Communications
94 public void AddPlugin(string provider, string connect) 94 public void AddPlugin(string provider, string connect)
95 { 95 {
96 m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect)); 96 m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect));
97 } 97 }
98 98
99 #region UserProfile 99 #region UserProfile
100 100
101 public virtual void AddTemporaryUserProfile(UserProfileData userProfile) 101 public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
102 { 102 {
@@ -650,15 +650,17 @@ namespace OpenSim.Framework.Communications
650 public virtual UUID AddUser( 650 public virtual UUID AddUser(
651 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)
652 { 652 {
653 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
654 653
655 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
656 user.HomeLocation = new Vector3(128, 128, 100); 659 user.HomeLocation = new Vector3(128, 128, 100);
657 user.ID = SetUUID; 660 user.ID = SetUUID;
658 user.FirstName = firstName; 661 user.FirstName = firstName;
659 user.SurName = lastName; 662 user.SurName = lastName;
660 user.PasswordHash = md5PasswdHash; 663 user.PasswordHash = md5PasswdHash;
661 user.PasswordSalt = String.Empty;
662 user.Created = Util.UnixTimeSinceEpoch(); 664 user.Created = Util.UnixTimeSinceEpoch();
663 user.HomeLookAt = new Vector3(100, 100, 100); 665 user.HomeLookAt = new Vector3(100, 100, 100);
664 user.HomeRegionX = regX; 666 user.HomeRegionX = regX;
@@ -922,8 +924,8 @@ namespace OpenSim.Framework.Communications
922 if (md5PasswordHash == userProfile.PasswordHash) 924 if (md5PasswordHash == userProfile.PasswordHash)
923 return true; 925 return true;
924 else 926 else
925 return false; 927 return false;
926 } 928 }
927 929
928 #endregion 930 #endregion
929 } 931 }
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/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 444adf9..4bc35e6 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 cee1d4b..d3a5357 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -1040,7 +1040,7 @@ namespace OpenSim.Framework
1040 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)
1041 { 1041 {
1042 RegionInfo regionInfo; 1042 RegionInfo regionInfo;
1043 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort); 1043 IPEndPoint neighbourInternalEndPoint = new IPEndPoint(Util.GetHostFromDNS(externalHostName), (int)simPort);
1044 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName); 1044 regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalHostName);
1045 regionInfo.RemotingPort = remotingPort; 1045 regionInfo.RemotingPort = remotingPort;
1046 regionInfo.RemotingAddress = externalHostName; 1046 regionInfo.RemotingAddress = externalHostName;
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/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 fe69ad3..5afa110 100644
--- a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
@@ -168,7 +168,7 @@ namespace OpenSim.Framework.Servers.HttpServer
168 "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e); 168 "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e);
169 } 169 }
170 170
171 }, null); 171 }, null);
172 } 172 }
173 } 173 }
174} 174}
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 01990fa..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;
@@ -323,7 +323,7 @@ namespace OpenSim.Framework.Servers.HttpServer
323 OSHttpRequest request = objstate.oreq; 323 OSHttpRequest request = objstate.oreq;
324 OSHttpResponse resp = objstate.oresp; 324 OSHttpResponse resp = objstate.oresp;
325 325
326 HandleRequest(request,resp); 326 HandleRequest(request,resp);
327 } 327 }
328 328
329 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response) 329 public virtual void HandleRequest(OSHttpRequest request, OSHttpResponse response)
@@ -712,7 +712,7 @@ namespace OpenSim.Framework.Servers.HttpServer
712 lock (m_rpcHandlers) 712 lock (m_rpcHandlers)
713 { 713 {
714 methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); 714 methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method);
715 } 715 }
716 716
717 if (methodWasFound) 717 if (methodWasFound)
718 { 718 {
@@ -931,7 +931,7 @@ namespace OpenSim.Framework.Servers.HttpServer
931 } 931 }
932 catch (IOException e) 932 catch (IOException e)
933 { 933 {
934 m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e); 934 m_log.DebugFormat("[BASE HTTP SERVER] LLSD IOException {0}.", e);
935 } 935 }
936 catch (SocketException e) 936 catch (SocketException e)
937 { 937 {
@@ -1368,7 +1368,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1368 bestMatch = pattern; 1368 bestMatch = pattern;
1369 } 1369 }
1370 } 1370 }
1371 } 1371 }
1372 1372
1373 if (String.IsNullOrEmpty(bestMatch)) 1373 if (String.IsNullOrEmpty(bestMatch))
1374 { 1374 {
@@ -1480,7 +1480,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1480 { 1480 {
1481 m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message); 1481 m_log.Warn("[BASE HTTP SERVER] XmlRpcRequest issue: " + e.Message);
1482 } 1482 }
1483 } 1483 }
1484 } 1484 }
1485 1485
1486 public void SendHTML404(OSHttpResponse response, string host) 1486 public void SendHTML404(OSHttpResponse response, string host)
@@ -1589,7 +1589,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1589 // if you want more detailed trace information from the HttpServer 1589 // if you want more detailed trace information from the HttpServer
1590 //m_httpListener2.UseTraceLogs = true; 1590 //m_httpListener2.UseTraceLogs = true;
1591 1591
1592 //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; 1592 //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor;
1593 } 1593 }
1594 else 1594 else
1595 { 1595 {
@@ -1624,7 +1624,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1624 } 1624 }
1625 1625
1626 public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err) 1626 public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err)
1627 { 1627 {
1628 switch (err) 1628 switch (err)
1629 { 1629 {
1630 case SocketError.NotSocket: 1630 case SocketError.NotSocket:
@@ -1635,7 +1635,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1635 } 1635 }
1636 1636
1637 public void httpServerException(object source, Exception exception) 1637 public void httpServerException(object source, Exception exception)
1638 { 1638 {
1639 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());
1640 /* 1640 /*
1641 if (HTTPDRunning)// && NotSocketErrors > 5) 1641 if (HTTPDRunning)// && NotSocketErrors > 5)
@@ -1662,7 +1662,7 @@ namespace OpenSim.Framework.Servers.HttpServer
1662 } 1662 }
1663 catch (NullReferenceException) 1663 catch (NullReferenceException)
1664 { 1664 {
1665 m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer."); 1665 m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer.");
1666 } 1666 }
1667 1667
1668 } 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/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
index ebb2691..a0d4008 100644
--- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
@@ -59,11 +59,11 @@ namespace OpenSim.Framework.Servers.HttpServer
59 int length = 0; 59 int length = 0;
60 using (StreamWriter writer = new StreamWriter(buffer)) 60 using (StreamWriter writer = new StreamWriter(buffer))
61 { 61 {
62 writer.WriteLine(obj); 62 writer.Write(obj);
63 writer.Flush(); 63 writer.Flush();
64 length = (int)buffer.Length;
65 } 64 }
66 65
66 length = (int)obj.Length;
67 request.ContentLength = length; 67 request.ContentLength = length;
68 68
69 Stream requestStream = request.GetRequestStream(); 69 Stream requestStream = request.GetRequestStream();
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index 376d221..62e7e92 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -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 45b5a10..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();
@@ -136,7 +136,7 @@ namespace OpenSim.Framework
136 float dx = a.X - b.X; 136 float dx = a.X - b.X;
137 float dy = a.Y - b.Y; 137 float dy = a.Y - b.Y;
138 float dz = a.Z - b.Z; 138 float dz = a.Z - b.Z;
139 return (dx*dx + dy*dy + dz*dz) < (amount*amount); 139 return (dx*dx + dy*dy + dz*dz) < (amount*amount);
140 } 140 }
141 141
142 /// <summary> 142 /// <summary>
@@ -975,7 +975,7 @@ namespace OpenSim.Framework
975 else 975 else
976 { 976 {
977 os = ReadEtcIssue(); 977 os = ReadEtcIssue();
978 } 978 }
979 979
980 if (os.Length > 45) 980 if (os.Length > 45)
981 { 981 {
@@ -1203,6 +1203,32 @@ namespace OpenSim.Framework
1203 return found.ToArray(); 1203 return found.ToArray();
1204 } 1204 }
1205 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
1206 #region FireAndForget Threading Pattern 1232 #region FireAndForget Threading Pattern
1207 1233
1208 public static void FireAndForget(System.Threading.WaitCallback callback) 1234 public static void FireAndForget(System.Threading.WaitCallback callback)