aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs52
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs12
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs17
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs24
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs69
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs11
11 files changed, 111 insertions, 100 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 2b3f7f5..da39202 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -301,7 +301,9 @@ namespace Flotsam.RegionModules.AssetCache
301 } 301 }
302 catch (Exception e) 302 catch (Exception e)
303 { 303 {
304 LogException(e); 304 m_log.ErrorFormat(
305 "[FLOTSAM ASSET CACHE]: Failed to update cache for asset {0}. Exception {1} {2}",
306 asset.ID, e.Message, e.StackTrace);
305 } 307 }
306 } 308 }
307 309
@@ -361,7 +363,9 @@ namespace Flotsam.RegionModules.AssetCache
361 } 363 }
362 catch (System.Runtime.Serialization.SerializationException e) 364 catch (System.Runtime.Serialization.SerializationException e)
363 { 365 {
364 LogException(e); 366 m_log.ErrorFormat(
367 "[FLOTSAM ASSET CACHE]: Failed to get file {0} for asset {1}. Exception {2} {3}",
368 filename, id, e.Message, e.StackTrace);
365 369
366 // If there was a problem deserializing the asset, the asset may 370 // If there was a problem deserializing the asset, the asset may
367 // either be corrupted OR was serialized under an old format 371 // either be corrupted OR was serialized under an old format
@@ -371,7 +375,9 @@ namespace Flotsam.RegionModules.AssetCache
371 } 375 }
372 catch (Exception e) 376 catch (Exception e)
373 { 377 {
374 LogException(e); 378 m_log.ErrorFormat(
379 "[FLOTSAM ASSET CACHE]: Failed to get file {0} for asset {1}. Exception {2} {3}",
380 filename, id, e.Message, e.StackTrace);
375 } 381 }
376 finally 382 finally
377 { 383 {
@@ -380,7 +386,6 @@ namespace Flotsam.RegionModules.AssetCache
380 } 386 }
381 } 387 }
382 388
383
384#if WAIT_ON_INPROGRESS_REQUESTS 389#if WAIT_ON_INPROGRESS_REQUESTS
385 // Check if we're already downloading this asset. If so, try to wait for it to 390 // Check if we're already downloading this asset. If so, try to wait for it to
386 // download. 391 // download.
@@ -403,7 +408,6 @@ namespace Flotsam.RegionModules.AssetCache
403 m_RequestsForInprogress++; 408 m_RequestsForInprogress++;
404 } 409 }
405#endif 410#endif
406
407 return asset; 411 return asset;
408 } 412 }
409 413
@@ -415,7 +419,7 @@ namespace Flotsam.RegionModules.AssetCache
415 419
416 if (m_MemoryCacheEnabled) 420 if (m_MemoryCacheEnabled)
417 asset = GetFromMemoryCache(id); 421 asset = GetFromMemoryCache(id);
418 else if (m_FileCacheEnabled) 422 if (asset == null && m_FileCacheEnabled)
419 asset = GetFromFileCache(id); 423 asset = GetFromFileCache(id);
420 424
421 if (((m_LogLevel >= 1)) && (m_HitRateDisplay != 0) && (m_Requests % m_HitRateDisplay == 0)) 425 if (((m_LogLevel >= 1)) && (m_HitRateDisplay != 0) && (m_Requests % m_HitRateDisplay == 0))
@@ -432,7 +436,6 @@ namespace Flotsam.RegionModules.AssetCache
432 } 436 }
433 437
434 m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0} unnessesary requests due to requests for assets that are currently downloading.", m_RequestsForInprogress); 438 m_log.InfoFormat("[FLOTSAM ASSET CACHE]: {0} unnessesary requests due to requests for assets that are currently downloading.", m_RequestsForInprogress);
435
436 } 439 }
437 440
438 return asset; 441 return asset;
@@ -446,7 +449,7 @@ namespace Flotsam.RegionModules.AssetCache
446 public void Expire(string id) 449 public void Expire(string id)
447 { 450 {
448 if (m_LogLevel >= 2) 451 if (m_LogLevel >= 2)
449 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Expiring Asset {0}.", id); 452 m_log.DebugFormat("[FLOTSAM ASSET CACHE]: Expiring Asset {0}", id);
450 453
451 try 454 try
452 { 455 {
@@ -464,7 +467,9 @@ namespace Flotsam.RegionModules.AssetCache
464 } 467 }
465 catch (Exception e) 468 catch (Exception e)
466 { 469 {
467 LogException(e); 470 m_log.ErrorFormat(
471 "[FLOTSAM ASSET CACHE]: Failed to expire cached file {0}. Exception {1} {2}",
472 id, e.Message, e.StackTrace);
468 } 473 }
469 } 474 }
470 475
@@ -602,7 +607,9 @@ namespace Flotsam.RegionModules.AssetCache
602 } 607 }
603 catch (Exception e) 608 catch (Exception e)
604 { 609 {
605 LogException(e); 610 m_log.ErrorFormat(
611 "[FLOTSAM ASSET CACHE]: Failed to write asset {0} to cache. Directory {1}, tempname {2}, filename {3}. Exception {4} {5}.",
612 asset.ID, directory, tempname, filename, e.Message, e.StackTrace);
606 } 613 }
607 finally 614 finally
608 { 615 {
@@ -632,15 +639,6 @@ namespace Flotsam.RegionModules.AssetCache
632 } 639 }
633 } 640 }
634 641
635 private static void LogException(Exception e)
636 {
637 string[] text = e.ToString().Split(new char[] { '\n' });
638 foreach (string t in text)
639 {
640 m_log.ErrorFormat("[FLOTSAM ASSET CACHE]: {0} ", t);
641 }
642 }
643
644 /// <summary> 642 /// <summary>
645 /// Scan through the file cache, and return number of assets currently cached. 643 /// Scan through the file cache, and return number of assets currently cached.
646 /// </summary> 644 /// </summary>
@@ -693,8 +691,7 @@ namespace Flotsam.RegionModules.AssetCache
693 s.ForEachSOG(delegate(SceneObjectGroup e) 691 s.ForEachSOG(delegate(SceneObjectGroup e)
694 { 692 {
695 gatherer.GatherAssetUuids(e, assets); 693 gatherer.GatherAssetUuids(e, assets);
696 } 694 });
697 );
698 } 695 }
699 696
700 foreach (UUID assetID in assets.Keys) 697 foreach (UUID assetID in assets.Keys)
@@ -727,7 +724,9 @@ namespace Flotsam.RegionModules.AssetCache
727 } 724 }
728 catch (Exception e) 725 catch (Exception e)
729 { 726 {
730 LogException(e); 727 m_log.ErrorFormat(
728 "[FLOTSAM ASSET CACHE]: Couldn't clear asset cache directory {0} from {1}. Exception {2} {3}",
729 dir, m_CacheDirectory, e.Message, e.StackTrace);
731 } 730 }
732 } 731 }
733 732
@@ -739,7 +738,9 @@ namespace Flotsam.RegionModules.AssetCache
739 } 738 }
740 catch (Exception e) 739 catch (Exception e)
741 { 740 {
742 LogException(e); 741 m_log.ErrorFormat(
742 "[FLOTSAM ASSET CACHE]: Couldn't clear asset cache file {0} from {1}. Exception {1} {2}",
743 file, m_CacheDirectory, e.Message, e.StackTrace);
743 } 744 }
744 } 745 }
745 } 746 }
@@ -765,7 +766,7 @@ namespace Flotsam.RegionModules.AssetCache
765 766
766 foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac")) 767 foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac"))
767 { 768 {
768 m_log.Info("[FLOTSAM ASSET CACHE]: Deep Scans were performed on the following regions:"); 769 m_log.Info("[FLOTSAM ASSET CACHE]: Deep scans have previously been performed on the following regions:");
769 770
770 string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac",""); 771 string RegionID = s.Remove(0,s.IndexOf("_")).Replace(".fac","");
771 DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s); 772 DateTime RegionDeepScanTMStamp = File.GetLastWriteTime(s);
@@ -836,7 +837,6 @@ namespace Flotsam.RegionModules.AssetCache
836 Util.FireAndForget(delegate { 837 Util.FireAndForget(delegate {
837 int assetsCached = CacheScenes(); 838 int assetsCached = CacheScenes();
838 m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Completed Scene Caching, {0} assets found.", assetsCached); 839 m_log.InfoFormat("[FLOTSAM ASSET CACHE]: Completed Scene Caching, {0} assets found.", assetsCached);
839
840 }); 840 });
841 841
842 break; 842 break;
@@ -891,7 +891,6 @@ namespace Flotsam.RegionModules.AssetCache
891 891
892 #region IAssetService Members 892 #region IAssetService Members
893 893
894
895 public AssetMetadata GetMetadata(string id) 894 public AssetMetadata GetMetadata(string id)
896 { 895 {
897 AssetBase asset = Get(id); 896 AssetBase asset = Get(id);
@@ -921,7 +920,6 @@ namespace Flotsam.RegionModules.AssetCache
921 Cache(asset); 920 Cache(asset);
922 921
923 return asset.ID; 922 return asset.ID;
924
925 } 923 }
926 924
927 public bool UpdateContent(string id, byte[] data) 925 public bool UpdateContent(string id, byte[] data)
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 995a552..e3e3452 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -151,6 +151,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
151 if (face == null) 151 if (face == null)
152 continue; 152 continue;
153 153
154// m_log.DebugFormat(
155// "[AVFACTORY]: Looking for texture {0}, id {1} for {2} {3}",
156// face.TextureID, idx, client.Name, client.AgentId);
157
154 // if the texture is one of the "defaults" then skip it 158 // if the texture is one of the "defaults" then skip it
155 // this should probably be more intelligent (skirt texture doesnt matter 159 // this should probably be more intelligent (skirt texture doesnt matter
156 // if the avatar isnt wearing a skirt) but if any of the main baked 160 // if the avatar isnt wearing a skirt) but if any of the main baked
@@ -305,6 +309,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
305 309
306 private void HandleAppearanceSave(UUID agentid) 310 private void HandleAppearanceSave(UUID agentid)
307 { 311 {
312 // We must set appearance parameters in the en_US culture in order to avoid issues where values are saved
313 // in a culture where decimal points are commas and then reloaded in a culture which just treats them as
314 // number seperators.
315 Culture.SetCurrentCulture();
316
308 ScenePresence sp = m_scene.GetScenePresence(agentid); 317 ScenePresence sp = m_scene.GetScenePresence(agentid);
309 if (sp == null) 318 if (sp == null)
310 { 319 {
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 0db31eb..36fe040 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -141,10 +141,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
141 { 141 {
142 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid); 142 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, ownerid);
143 string ownerFirstName, ownerLastName; 143 string ownerFirstName, ownerLastName;
144 UUID ownerID = UUID.Zero;
144 if (account != null) 145 if (account != null)
145 { 146 {
146 ownerFirstName = account.FirstName; 147 ownerFirstName = account.FirstName;
147 ownerLastName = account.LastName; 148 ownerLastName = account.LastName;
149 ownerID = account.PrincipalID;
148 } 150 }
149 else 151 else
150 { 152 {
@@ -155,7 +157,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
155 ScenePresence sp = m_scene.GetScenePresence(avatarid); 157 ScenePresence sp = m_scene.GetScenePresence(avatarid);
156 158
157 if (sp != null) 159 if (sp != null)
158 sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerFirstName, ownerLastName, objectid); 160 sp.ControllingClient.SendTextBoxRequest(message, chatChannel, name, ownerID, ownerFirstName, ownerLastName, objectid);
159 } 161 }
160 162
161 public void SendNotificationToUsersInRegion( 163 public void SendNotificationToUsersInRegion(
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index b714f2b..4933147 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -984,11 +984,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
984 public virtual bool CanGetAgentInventoryItem(IClientAPI remoteClient, UUID itemID, UUID requestID) 984 public virtual bool CanGetAgentInventoryItem(IClientAPI remoteClient, UUID itemID, UUID requestID)
985 { 985 {
986 InventoryItemBase assetRequestItem = GetItem(remoteClient.AgentId, itemID); 986 InventoryItemBase assetRequestItem = GetItem(remoteClient.AgentId, itemID);
987
987 if (assetRequestItem == null) 988 if (assetRequestItem == null)
988 { 989 {
989 ILibraryService lib = m_Scene.RequestModuleInterface<ILibraryService>(); 990 ILibraryService lib = m_Scene.RequestModuleInterface<ILibraryService>();
991
990 if (lib != null) 992 if (lib != null)
991 assetRequestItem = lib.LibraryRootFolder.FindItem(itemID); 993 assetRequestItem = lib.LibraryRootFolder.FindItem(itemID);
994
992 if (assetRequestItem == null) 995 if (assetRequestItem == null)
993 return false; 996 return false;
994 } 997 }
@@ -1019,6 +1022,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1019 m_log.WarnFormat( 1022 m_log.WarnFormat(
1020 "[CLIENT]: {0} requested asset {1} from item {2} but this does not match item's asset {3}", 1023 "[CLIENT]: {0} requested asset {1} from item {2} but this does not match item's asset {3}",
1021 Name, requestID, itemID, assetRequestItem.AssetID); 1024 Name, requestID, itemID, assetRequestItem.AssetID);
1025
1022 return false; 1026 return false;
1023 } 1027 }
1024 1028
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
index d570608..3155ce7 100644
--- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs
@@ -185,6 +185,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library
185 archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName, false); 185 archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName, false);
186 archread.Execute(); 186 archread.Execute();
187 } 187 }
188
188 foreach (InventoryNodeBase node in nodes) 189 foreach (InventoryNodeBase node in nodes)
189 FixPerms(node); 190 FixPerms(node);
190 } 191 }
@@ -197,18 +198,19 @@ namespace OpenSim.Region.CoreModules.Framework.Library
197 archread.Close(); 198 archread.Close();
198 } 199 }
199 } 200 }
200
201 } 201 }
202 202
203 private void FixPerms(InventoryNodeBase node) 203 private void FixPerms(InventoryNodeBase node)
204 { 204 {
205 m_log.DebugFormat("[LIBRARY MODULE]: Fixing perms for {0} {1}", node.Name, node.ID);
206
205 if (node is InventoryItemBase) 207 if (node is InventoryItemBase)
206 { 208 {
207 InventoryItemBase item = (InventoryItemBase)node; 209 InventoryItemBase item = (InventoryItemBase)node;
208 item.BasePermissions = 0x7FFFFFFF; 210 item.BasePermissions = (uint)PermissionMask.All;
209 item.EveryOnePermissions = 0x7FFFFFFF; 211 item.EveryOnePermissions = (uint)PermissionMask.All - (uint)PermissionMask.Modify;
210 item.CurrentPermissions = 0x7FFFFFFF; 212 item.CurrentPermissions = (uint)PermissionMask.All;
211 item.NextPermissions = 0x7FFFFFFF; 213 item.NextPermissions = (uint)PermissionMask.All;
212 } 214 }
213 } 215 }
214 216
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index 85a1ac3..18a7177 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -39,8 +39,7 @@ using OpenMetaverse;
39 39
40namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization 40namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
41{ 41{
42 public class LocalAuthorizationServicesConnector : 42 public class LocalAuthorizationServicesConnector : ISharedRegionModule, IAuthorizationService
43 ISharedRegionModule, IAuthorizationService
44 { 43 {
45 private static readonly ILog m_log = 44 private static readonly ILog m_log =
46 LogManager.GetLogger( 45 LogManager.GetLogger(
@@ -127,15 +126,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
127 if (!m_Enabled) 126 if (!m_Enabled)
128 return; 127 return;
129 128
130 m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}", scene.RegionInfo.RegionName); 129 m_log.InfoFormat(
131 130 "[AUTHORIZATION CONNECTOR]: Enabled local authorization for region {0}",
132 131 scene.RegionInfo.RegionName);
133 } 132 }
134 133
135 public bool IsAuthorizedForRegion(string userID, string regionID, out string message) 134 public bool IsAuthorizedForRegion(
135 string userID, string firstName, string lastName, string regionID, out string message)
136 { 136 {
137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID, out message); 137 return m_AuthorizationService.IsAuthorizedForRegion(userID, firstName, lastName, regionID, out message);
138 } 138 }
139
140 } 139 }
141} 140} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index 66994fa..5fa27b8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -117,12 +117,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
117 117
118 } 118 }
119 119
120 public bool IsAuthorizedForRegion(string userID, string regionID, out string message) 120 public bool IsAuthorizedForRegion(
121 string userID, string firstName, string lastName, string regionID, out string message)
121 { 122 {
122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); 123 m_log.InfoFormat(
124 "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
123 125
124 bool isAuthorized = true; 126 bool isAuthorized = true;
125 message = String.Empty; 127 message = String.Empty;
128 string mail = String.Empty;
126 129
127 // get the scene this call is being made for 130 // get the scene this call is being made for
128 Scene scene = null; 131 Scene scene = null;
@@ -140,17 +143,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 if (scene != null) 143 if (scene != null)
141 { 144 {
142 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID)); 145 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
143 isAuthorized = IsAuthorizedForRegion(userID, account.FirstName, account.LastName, 146
144 account.Email, scene.RegionInfo.RegionName, regionID, out message); 147 if (account != null)
148 mail = account.Email;
149
150 isAuthorized
151 = IsAuthorizedForRegion(
152 userID, firstName, lastName, account.Email, scene.RegionInfo.RegionName, regionID, out message);
145 } 153 }
146 else 154 else
147 { 155 {
148 m_log.ErrorFormat("[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0} ",regionID); 156 m_log.ErrorFormat(
157 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}",
158 regionID);
149 } 159 }
150 160
151
152 return isAuthorized; 161 return isAuthorized;
153
154 } 162 }
155 } 163 }
156} 164} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
index c044407..cd7d6bc 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/Tests/GridConnectorsTests.cs
@@ -64,10 +64,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Test saving a V0.2 OpenSim Region Archive. 67 /// Test region registration.
68 /// </summary> 68 /// </summary>
69 [Test] 69 [Test]
70 public void TestRegisterRegionV0_2() 70 public void TestRegisterRegion()
71 { 71 {
72 SetUp(); 72 SetUp();
73 73
@@ -123,6 +123,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.Tests
123 m_LocalConnector.RegisterRegion(UUID.Zero, r1); 123 m_LocalConnector.RegisterRegion(UUID.Zero, r1);
124 124
125 GridRegion result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test"); 125 GridRegion result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test");
126 Assert.IsNull(result, "Retrieved GetRegionByName \"Test\" is not null");
127
128 result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test Region 1");
126 Assert.IsNotNull(result, "Retrieved GetRegionByName is null"); 129 Assert.IsNotNull(result, "Retrieved GetRegionByName is null");
127 Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match"); 130 Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match");
128 131
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 63dec15..7554e12 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -470,53 +470,48 @@ namespace OpenSim.Region.CoreModules.World.Land
470 SendLandUpdate(avatar, false); 470 SendLandUpdate(avatar, false);
471 } 471 }
472 472
473 public void EventManagerOnSignificantClientMovement(IClientAPI remote_client) 473 public void EventManagerOnSignificantClientMovement(ScenePresence clientAvatar)
474 { 474 {
475 ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); 475 SendLandUpdate(clientAvatar);
476 476 SendOutNearestBanLine(clientAvatar.ControllingClient);
477 if (clientAvatar != null) 477 ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
478 if (parcel != null)
478 { 479 {
479 SendLandUpdate(clientAvatar); 480 if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
480 SendOutNearestBanLine(remote_client); 481 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
481 ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y);
482 if (parcel != null)
483 { 482 {
484 if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && 483 EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
485 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) 484 m_scene.RegionInfo.RegionID);
485 //They are going under the safety line!
486 if (!parcel.IsBannedFromLand(clientAvatar.UUID))
486 { 487 {
487 EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, 488 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
488 m_scene.RegionInfo.RegionID);
489 //They are going under the safety line!
490 if (!parcel.IsBannedFromLand(clientAvatar.UUID))
491 {
492 clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false;
493 }
494 } 489 }
495 else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && 490 }
496 parcel.IsBannedFromLand(clientAvatar.UUID)) 491 else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
492 parcel.IsBannedFromLand(clientAvatar.UUID))
493 {
494 //once we've sent the message once, keep going toward the target until we are done
495 if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
497 { 496 {
498 //once we've sent the message once, keep going toward the target until we are done 497 SendYouAreBannedNotice(clientAvatar);
499 if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) 498 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
500 {
501 SendYouAreBannedNotice(clientAvatar);
502 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
503 }
504 } 499 }
505 else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) 500 }
506 { 501 else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
507 //once we've sent the message once, keep going toward the target until we are done 502 {
508 if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) 503 //once we've sent the message once, keep going toward the target until we are done
509 { 504 if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
510 SendYouAreRestrictedNotice(clientAvatar);
511 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
512 }
513 }
514 else
515 { 505 {
516 //when we are finally in a safe place, lets release the forced position lock 506 SendYouAreRestrictedNotice(clientAvatar);
517 forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); 507 ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
518 } 508 }
519 } 509 }
510 else
511 {
512 //when we are finally in a safe place, lets release the forced position lock
513 forcedPosition.Remove(clientAvatar.ControllingClient.AgentId);
514 }
520 } 515 }
521 } 516 }
522 517
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index a40517c..7cb3751 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
146 = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors); 146 = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors);
147 147
148 if (m_bypassPermissions) 148 if (m_bypassPermissions)
149 m_log.Info("[PERMISSIONS]: serviceside_object_permissions = false in ini file so disabling all region service permission checks"); 149 m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks");
150 else 150 else
151 m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); 151 m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
152 152
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index 2e3b21f..3804017 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -96,16 +96,7 @@ m_log.DebugFormat("MAP NAME=({0})", mapName);
96 96
97 // try to fetch from GridServer 97 // try to fetch from GridServer
98 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); 98 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
99 if (regionInfos == null) 99 if (regionInfos.Count == 0)
100 {
101 m_log.Warn("[MAPSEARCHMODULE]: RequestNamedRegions returned null. Old gridserver?");
102 // service wasn't available; maybe still an old GridServer. Try the old API, though it will return only one region
103 regionInfos = new List<GridRegion>();
104 GridRegion info = m_scene.GridService.GetRegionByName(m_scene.RegionInfo.ScopeID, mapName);
105 if (info != null)
106 regionInfos.Add(info);
107 }
108 else if (regionInfos.Count == 0)
109 remoteClient.SendAlertMessage("Hyperlink could not be established."); 100 remoteClient.SendAlertMessage("Hyperlink could not be established.");
110 101
111 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); 102 m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags);