aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorDiva Canto2012-04-27 09:26:14 -0700
committerDiva Canto2012-04-27 09:26:14 -0700
commit2970a18e54bc4811af67a2f0c307fb79c00c9a18 (patch)
treee4faab8dd2b55edff0632faf241c960ad553ccbc /OpenSim/Region/CoreModules/Framework
parentMinor change in error message (HG teleport failures) (diff)
parentAdd regression test for teleporting an agent between separated regions on the... (diff)
downloadopensim-SC_OLD-2970a18e54bc4811af67a2f0c307fb79c00c9a18.zip
opensim-SC_OLD-2970a18e54bc4811af67a2f0c307fb79c00c9a18.tar.gz
opensim-SC_OLD-2970a18e54bc4811af67a2f0c307fb79c00c9a18.tar.bz2
opensim-SC_OLD-2970a18e54bc4811af67a2f0c307fb79c00c9a18.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs54
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs2
3 files changed, 39 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index a36d0fe..a318a3c 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -178,7 +178,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
178 destinationRegionName = sp.Scene.RegionInfo.RegionName; 178 destinationRegionName = sp.Scene.RegionInfo.RegionName;
179 179
180 m_log.DebugFormat( 180 m_log.DebugFormat(
181 "[ENTITY TRANSFER MODULE]: RequestTeleportToLocation for {0} to {1} within existing region {2}", 181 "[ENTITY TRANSFER MODULE]: Teleport for {0} to {1} within {2}",
182 sp.Name, position, destinationRegionName); 182 sp.Name, position, destinationRegionName);
183 183
184 // Teleport within the same region 184 // Teleport within the same region
@@ -231,7 +231,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
231 GridRegion finalDestination = GetFinalDestination(reg); 231 GridRegion finalDestination = GetFinalDestination(reg);
232 if (finalDestination == null) 232 if (finalDestination == null)
233 { 233 {
234 m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent."); 234 m_log.WarnFormat(
235 "[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport {0} {1}",
236 sp.Name, sp.UUID);
237
235 sp.ControllingClient.SendTeleportFailed("Problem at destination"); 238 sp.ControllingClient.SendTeleportFailed("Problem at destination");
236 return; 239 return;
237 } 240 }
@@ -320,10 +323,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
320 } 323 }
321 324
322 if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this. 325 if (IsInTransit(sp.UUID)) // Avie is already on the way. Caller shouldn't do this.
326 {
327 m_log.DebugFormat(
328 "[ENTITY TRANSFER MODULE]: Ignoring teleport request of {0} {1} to {2} ({3}) {4}/{5} - agent is already in transit.",
329 sp.Name, sp.UUID, reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position);
330
323 return; 331 return;
332 }
324 333
325 m_log.DebugFormat( 334 m_log.DebugFormat(
326 "[ENTITY TRANSFER MODULE]: Request Teleport to {0} ({1}) {2}/{3}", 335 "[ENTITY TRANSFER MODULE]: Teleporting {0} {1} from {2} to {3} ({4}) {5}/{6}",
336 sp.Name, sp.UUID, sp.Scene.RegionInfo.RegionName,
327 reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position); 337 reg.ServerURI, finalDestination.ServerURI, finalDestination.RegionName, position);
328 338
329 uint newRegionX = (uint)(reg.RegionHandle >> 40); 339 uint newRegionX = (uint)(reg.RegionHandle >> 40);
@@ -444,7 +454,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
444 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath); 454 capsPath = finalDestination.ServerURI + CapsUtil.GetCapsSeedPath(agentCircuit.CapsPath);
445 } 455 }
446 456
447
448 SetInTransit(sp.UUID); 457 SetInTransit(sp.UUID);
449 458
450 // Let's send a full update of the agent. This is a synchronous call. 459 // Let's send a full update of the agent. This is a synchronous call.
@@ -588,7 +597,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
588 597
589 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout) 598 protected virtual void AgentHasMovedAway(ScenePresence sp, bool logout)
590 { 599 {
591 sp.Scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, true); 600 if (sp.Scene.AttachmentsModule != null)
601 sp.Scene.AttachmentsModule.DeleteAttachmentsFromScene(sp, true);
592 } 602 }
593 603
594 protected void KillEntity(Scene scene, uint localID) 604 protected void KillEntity(Scene scene, uint localID)
@@ -656,7 +666,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
656 666
657 public virtual void TeleportHome(UUID id, IClientAPI client) 667 public virtual void TeleportHome(UUID id, IClientAPI client)
658 { 668 {
659 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); 669 m_log.DebugFormat(
670 "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId);
660 671
661 //OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId); 672 //OpenSim.Services.Interfaces.PresenceInfo pinfo = m_aScene.PresenceService.GetAgent(client.SessionId);
662 GridUserInfo uinfo = m_aScene.GridUserService.GetGridUserInfo(client.AgentId.ToString()); 673 GridUserInfo uinfo = m_aScene.GridUserService.GetGridUserInfo(client.AgentId.ToString());
@@ -671,14 +682,20 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
671 return; 682 return;
672 } 683 }
673 684
674 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", 685 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})",
675 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); 686 client.Name, regionInfo.RegionName, regionInfo.RegionCoordX, regionInfo.RegionCoordY);
676 687
677 // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... 688 // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point...
678 ((Scene)(client.Scene)).RequestTeleportLocation( 689 ((Scene)(client.Scene)).RequestTeleportLocation(
679 client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, 690 client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
680 (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); 691 (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
681 } 692 }
693 else
694 {
695 m_log.ErrorFormat(
696 "[ENTITY TRANSFER MODULE]: No grid user information found for {0} {1}. Cannot send home.",
697 client.Name, client.AgentId);
698 }
682 } 699 }
683 700
684 #endregion 701 #endregion
@@ -1362,19 +1379,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1362 // after a cross here 1379 // after a cross here
1363 Thread.Sleep(500); 1380 Thread.Sleep(500);
1364 1381
1365 Scene m_scene = sp.Scene; 1382 Scene scene = sp.Scene;
1366 1383
1367 uint x, y; 1384 m_log.DebugFormat(
1368 Utils.LongToUInts(reg.RegionHandle, out x, out y); 1385 "[ENTITY TRANSFER MODULE]: Informing {0} {1} about neighbour {2} {3} at ({4},{5})",
1369 x = x / Constants.RegionSize; 1386 sp.Name, sp.UUID, reg.RegionName, endPoint, reg.RegionCoordX, reg.RegionCoordY);
1370 y = y / Constants.RegionSize;
1371 m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint + ")");
1372 1387
1373 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath); 1388 string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath);
1374 1389
1375 string reason = String.Empty; 1390 string reason = String.Empty;
1376 1391
1377 bool regionAccepted = m_scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason); 1392 bool regionAccepted = scene.SimulationService.CreateAgent(reg, a, (uint)TeleportFlags.Default, out reason);
1378 1393
1379 if (regionAccepted && newAgent) 1394 if (regionAccepted && newAgent)
1380 { 1395 {
@@ -1391,7 +1406,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1391 1406
1392 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " + 1407 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " +
1393 "and EstablishAgentCommunication with seed cap {4}", 1408 "and EstablishAgentCommunication with seed cap {4}",
1394 m_scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath); 1409 scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath);
1395 1410
1396 eq.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID); 1411 eq.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID);
1397 eq.EstablishAgentCommunication(sp.UUID, endPoint, capsPath); 1412 eq.EstablishAgentCommunication(sp.UUID, endPoint, capsPath);
@@ -1402,10 +1417,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1402 // TODO: make Event Queue disablable! 1417 // TODO: make Event Queue disablable!
1403 } 1418 }
1404 1419
1405 m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString()); 1420 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Completed inform {0} {1} about neighbour {2}", sp.Name, sp.UUID, endPoint);
1406 } 1421 }
1422
1407 if (!regionAccepted) 1423 if (!regionAccepted)
1408 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Region {0} did not accept agent: {1}", reg.RegionName, reason); 1424 m_log.WarnFormat(
1425 "[ENTITY TRANSFER MODULE]: Region {0} did not accept {1} {2}: {3}",
1426 reg.RegionName, sp.Name, sp.UUID, reason);
1409 } 1427 }
1410 1428
1411 /// <summary> 1429 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
index 1854b4a..488bbcb 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
@@ -201,7 +201,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
201 201
202 public override void TeleportHome(UUID id, IClientAPI client) 202 public override void TeleportHome(UUID id, IClientAPI client)
203 { 203 {
204 m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); 204 m_log.DebugFormat(
205 "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId);
205 206
206 // Let's find out if this is a foreign user or a local user 207 // Let's find out if this is a foreign user or a local user
207 IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>(); 208 IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>();
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index e74310c..d6afaa9 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
65 config.AddConfig("Modules"); 65 config.AddConfig("Modules");
66 config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); 66 config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule");
67 67
68 m_scene = SceneHelpers.SetupScene(); 68 m_scene = new SceneHelpers().SetupScene();
69 SceneHelpers.SetupSceneModules(m_scene, config, m_iam); 69 SceneHelpers.SetupSceneModules(m_scene, config, m_iam);
70 70
71 // Create user 71 // Create user