diff options
18 files changed, 100 insertions, 62 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 0a7b990..85a3044 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -1394,8 +1394,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1394 | private void establishAppearance(UUID dest, UUID srca) | 1394 | private void establishAppearance(UUID dest, UUID srca) |
1395 | { | 1395 | { |
1396 | m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); | 1396 | m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); |
1397 | 1397 | AvatarAppearance ava = null; | |
1398 | AvatarAppearance ava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(srca); | 1398 | AvatarData avatar = m_app.SceneManager.CurrentOrFirstScene.AvatarService.GetAvatar(srca); |
1399 | if (avatar != null) | ||
1400 | ava = avatar.ToAvatarAppearance(); | ||
1399 | 1401 | ||
1400 | // If the model has no associated appearance we're done. | 1402 | // If the model has no associated appearance we're done. |
1401 | 1403 | ||
@@ -1488,7 +1490,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1488 | throw new Exception("Unable to load both inventories"); | 1490 | throw new Exception("Unable to load both inventories"); |
1489 | } | 1491 | } |
1490 | 1492 | ||
1491 | m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava); | 1493 | AvatarData adata = new AvatarData(ava); |
1494 | m_app.SceneManager.CurrentOrFirstScene.AvatarService.SetAvatar(dest, adata); | ||
1492 | } | 1495 | } |
1493 | catch (Exception e) | 1496 | catch (Exception e) |
1494 | { | 1497 | { |
@@ -1635,10 +1638,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1635 | iserv.GetUserInventory(ID, uic.callback); | 1638 | iserv.GetUserInventory(ID, uic.callback); |
1636 | 1639 | ||
1637 | // While the inventory is being fetched, setup for appearance processing | 1640 | // While the inventory is being fetched, setup for appearance processing |
1638 | if ((mava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(ID)) == null) | 1641 | AvatarData adata = m_app.SceneManager.CurrentOrFirstScene.AvatarService.GetAvatar(ID); |
1639 | { | 1642 | if (adata != null) |
1643 | mava = adata.ToAvatarAppearance(); | ||
1644 | else | ||
1640 | mava = new AvatarAppearance(); | 1645 | mava = new AvatarAppearance(); |
1641 | } | ||
1642 | 1646 | ||
1643 | { | 1647 | { |
1644 | AvatarWearable[] wearables = mava.Wearables; | 1648 | AvatarWearable[] wearables = mava.Wearables; |
@@ -1773,7 +1777,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1773 | m_log.DebugFormat("[RADMIN] Outfit {0} load completed", oname); | 1777 | m_log.DebugFormat("[RADMIN] Outfit {0} load completed", oname); |
1774 | } // foreach outfit | 1778 | } // foreach outfit |
1775 | m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name); | 1779 | m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name); |
1776 | m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(ID, mava); | 1780 | AvatarData adata2 = new AvatarData(mava); |
1781 | m_app.SceneManager.CurrentOrFirstScene.AvatarService.SetAvatar(ID, adata2); | ||
1777 | } | 1782 | } |
1778 | catch (Exception e) | 1783 | catch (Exception e) |
1779 | { | 1784 | { |
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index 791cfcd..c40ea0e 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | |||
@@ -36,7 +36,7 @@ using OpenSim.Framework; | |||
36 | using OpenSim.Framework.Communications; | 36 | using OpenSim.Framework.Communications; |
37 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
38 | using IUserService = OpenSim.Framework.Communications.IUserService; | 38 | using IUserService = OpenSim.Framework.Communications.IUserService; |
39 | using IAvatarService = OpenSim.Framework.Communications.IAvatarService; | 39 | using IAvatarService = OpenSim.Services.Interfaces.IAvatarService; |
40 | 40 | ||
41 | namespace OpenSim.ApplicationPlugins.Rest.Inventory | 41 | namespace OpenSim.ApplicationPlugins.Rest.Inventory |
42 | { | 42 | { |
@@ -93,11 +93,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
93 | /// initializes. | 93 | /// initializes. |
94 | /// </summary> | 94 | /// </summary> |
95 | 95 | ||
96 | internal static CommunicationsManager Comms | ||
97 | { | ||
98 | get { return main.CommunicationsManager; } | ||
99 | } | ||
100 | |||
101 | internal static IInventoryService InventoryServices | 96 | internal static IInventoryService InventoryServices |
102 | { | 97 | { |
103 | get { return main.SceneManager.CurrentOrFirstScene.InventoryService; } | 98 | get { return main.SceneManager.CurrentOrFirstScene.InventoryService; } |
@@ -115,7 +110,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
115 | 110 | ||
116 | internal static IAvatarService AvatarServices | 111 | internal static IAvatarService AvatarServices |
117 | { | 112 | { |
118 | get { return Comms.AvatarService; } | 113 | get { return main.SceneManager.CurrentOrFirstScene.AvatarService; } |
119 | } | 114 | } |
120 | 115 | ||
121 | internal static IAssetService AssetServices | 116 | internal static IAssetService AssetServices |
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 0a45eff..5429890 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs | |||
@@ -32,6 +32,7 @@ using OpenMetaverse; | |||
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
34 | using OpenSim.Framework.Servers.HttpServer; | 34 | using OpenSim.Framework.Servers.HttpServer; |
35 | using OpenSim.Services.Interfaces; | ||
35 | 36 | ||
36 | namespace OpenSim.ApplicationPlugins.Rest.Inventory | 37 | namespace OpenSim.ApplicationPlugins.Rest.Inventory |
37 | { | 38 | { |
@@ -295,15 +296,15 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
295 | 296 | ||
296 | private void DoGet(AppearanceRequestData rdata) | 297 | private void DoGet(AppearanceRequestData rdata) |
297 | { | 298 | { |
299 | AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID); | ||
298 | 300 | ||
299 | rdata.userAppearance = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID); | 301 | if (adata == null) |
300 | |||
301 | if (rdata.userAppearance == null) | ||
302 | { | 302 | { |
303 | rdata.Fail(Rest.HttpStatusCodeNoContent, | 303 | rdata.Fail(Rest.HttpStatusCodeNoContent, |
304 | String.Format("appearance data not found for user {0} {1}", | 304 | String.Format("appearance data not found for user {0} {1}", |
305 | rdata.userProfile.FirstName, rdata.userProfile.SurName)); | 305 | rdata.userProfile.FirstName, rdata.userProfile.SurName)); |
306 | } | 306 | } |
307 | rdata.userAppearance = adata.ToAvatarAppearance(); | ||
307 | 308 | ||
308 | rdata.initXmlWriter(); | 309 | rdata.initXmlWriter(); |
309 | 310 | ||
@@ -342,18 +343,20 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
342 | // increasingly doubtful that it is appropriate for REST. If I attempt to | 343 | // increasingly doubtful that it is appropriate for REST. If I attempt to |
343 | // add a new record, and it already exists, then it seems to me that the | 344 | // add a new record, and it already exists, then it seems to me that the |
344 | // attempt should fail, rather than update the existing record. | 345 | // attempt should fail, rather than update the existing record. |
345 | 346 | AvatarData adata = null; | |
346 | if (GetUserAppearance(rdata)) | 347 | if (GetUserAppearance(rdata)) |
347 | { | 348 | { |
348 | modified = rdata.userAppearance != null; | 349 | modified = rdata.userAppearance != null; |
349 | created = !modified; | 350 | created = !modified; |
350 | Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); | 351 | adata = new AvatarData(rdata.userAppearance); |
352 | Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); | ||
351 | // Rest.UserServices.UpdateUserProfile(rdata.userProfile); | 353 | // Rest.UserServices.UpdateUserProfile(rdata.userProfile); |
352 | } | 354 | } |
353 | else | 355 | else |
354 | { | 356 | { |
355 | created = true; | 357 | created = true; |
356 | Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); | 358 | adata = new AvatarData(rdata.userAppearance); |
359 | Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); | ||
357 | // Rest.UserServices.UpdateUserProfile(rdata.userProfile); | 360 | // Rest.UserServices.UpdateUserProfile(rdata.userProfile); |
358 | } | 361 | } |
359 | 362 | ||
@@ -439,21 +442,22 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
439 | 442 | ||
440 | private void DoDelete(AppearanceRequestData rdata) | 443 | private void DoDelete(AppearanceRequestData rdata) |
441 | { | 444 | { |
445 | AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID); | ||
442 | 446 | ||
443 | AvatarAppearance old = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID); | 447 | if (adata != null) |
444 | |||
445 | if (old != null) | ||
446 | { | 448 | { |
449 | AvatarAppearance old = adata.ToAvatarAppearance(); | ||
447 | rdata.userAppearance = new AvatarAppearance(); | 450 | rdata.userAppearance = new AvatarAppearance(); |
448 | |||
449 | rdata.userAppearance.Owner = old.Owner; | 451 | rdata.userAppearance.Owner = old.Owner; |
452 | adata = new AvatarData(rdata.userAppearance); | ||
450 | 453 | ||
451 | Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance); | 454 | Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); |
452 | 455 | ||
453 | rdata.Complete(); | 456 | rdata.Complete(); |
454 | } | 457 | } |
455 | else | 458 | else |
456 | { | 459 | { |
460 | |||
457 | rdata.Complete(Rest.HttpStatusCodeNoContent); | 461 | rdata.Complete(Rest.HttpStatusCodeNoContent); |
458 | } | 462 | } |
459 | 463 | ||
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index 7b9fdee..a43b728 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | |||
@@ -46,8 +46,6 @@ | |||
46 | <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" /> | 46 | <RegionModule id="RemoteNeighbourServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Neighbour.RemoteNeighbourServicesConnector" /> |
47 | <RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" /> | 47 | <RegionModule id="LocalLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.LocalLandServicesConnector" /> |
48 | <RegionModule id="RemoteLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.RemoteLandServicesConnector" /> | 48 | <RegionModule id="RemoteLandServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Land.RemoteLandServicesConnector" /> |
49 | <RegionModule id="LocalInterregionComms" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion.LocalInterregionComms" /> | ||
50 | <RegionModule id="RESTInterregionComms" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion.RESTInterregionComms" /> | ||
51 | <RegionModule id="LocalGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.LocalGridServicesConnector" /> | 49 | <RegionModule id="LocalGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.LocalGridServicesConnector" /> |
52 | <RegionModule id="RemoteGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.RemoteGridServicesConnector" /> | 50 | <RegionModule id="RemoteGridServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.RemoteGridServicesConnector" /> |
53 | <RegionModule id="HGGridConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.HGGridConnector" /> | 51 | <RegionModule id="HGGridConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid.HGGridConnector" /> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index fa3681a..10ab76f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -781,13 +781,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
781 | ipaddr = Util.GetHostFromDNS(parts[0]); | 781 | ipaddr = Util.GetHostFromDNS(parts[0]); |
782 | if (parts.Length == 2) | 782 | if (parts.Length == 2) |
783 | UInt32.TryParse(parts[1], out port); | 783 | UInt32.TryParse(parts[1], out port); |
784 | 784 | return true; | |
785 | // local authority (standalone), local call | 785 | |
786 | if (m_thisIP.Equals(ipaddr) && (m_aScene.RegionInfo.HttpPort == port)) | 786 | //// local authority (standalone), local call |
787 | return ((IAuthentication)m_aScene.CommsManager.UserAdminService).VerifyKey(userID, key); | 787 | //if (m_thisIP.Equals(ipaddr) && (m_aScene.RegionInfo.HttpPort == port)) |
788 | // remote call | 788 | // return ((IAuthentication)m_aScene.CommsManager.UserAdminService).VerifyKey(userID, key); |
789 | else | 789 | //// remote call |
790 | return AuthClient.VerifyKey("http://" + authority, userID, key); | 790 | //else |
791 | // return AuthClient.VerifyKey("http://" + authority, userID, key); | ||
791 | } | 792 | } |
792 | 793 | ||
793 | 794 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs index 2cb18c7..d78daf9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs | |||
@@ -163,9 +163,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
163 | return false; | 163 | return false; |
164 | } | 164 | } |
165 | 165 | ||
166 | public bool LogoutAgent(UUID sessionID) | 166 | public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat) |
167 | { | 167 | { |
168 | return m_PresenceService.LogoutAgent(sessionID); | 168 | return m_PresenceService.LogoutAgent(sessionID, position, lookat); |
169 | } | 169 | } |
170 | 170 | ||
171 | 171 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs index 3ca5560..891fc14 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/PresenceDetector.cs | |||
@@ -42,6 +42,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private IPresenceService m_PresenceService; | 44 | private IPresenceService m_PresenceService; |
45 | private Scene m_aScene; | ||
45 | 46 | ||
46 | public PresenceDetector(IPresenceService presenceservice) | 47 | public PresenceDetector(IPresenceService presenceservice) |
47 | { | 48 | { |
@@ -54,6 +55,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
54 | scene.EventManager.OnNewClient += OnNewClient; | 55 | scene.EventManager.OnNewClient += OnNewClient; |
55 | 56 | ||
56 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); | 57 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); |
58 | |||
59 | if (m_aScene == null) | ||
60 | m_aScene = scene; | ||
57 | } | 61 | } |
58 | 62 | ||
59 | public void RemoveRegion(Scene scene) | 63 | public void RemoveRegion(Scene scene) |
@@ -62,6 +66,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
62 | scene.EventManager.OnNewClient -= OnNewClient; | 66 | scene.EventManager.OnNewClient -= OnNewClient; |
63 | 67 | ||
64 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); | 68 | m_PresenceService.LogoutRegionAgents(scene.RegionInfo.RegionID); |
69 | |||
65 | } | 70 | } |
66 | 71 | ||
67 | public void OnMakeRootAgent(ScenePresence sp) | 72 | public void OnMakeRootAgent(ScenePresence sp) |
@@ -78,7 +83,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
78 | public void OnLogout(IClientAPI client) | 83 | public void OnLogout(IClientAPI client) |
79 | { | 84 | { |
80 | client.OnLogout -= OnLogout; | 85 | client.OnLogout -= OnLogout; |
81 | m_PresenceService.LogoutAgent(client.SessionId); | 86 | |
87 | ScenePresence sp = null; | ||
88 | Vector3 position = new Vector3(128, 128, 0); | ||
89 | Vector3 lookat = new Vector3(0, 1, 0); | ||
90 | |||
91 | if (m_aScene.TryGetAvatar(client.AgentId, out sp)) | ||
92 | { | ||
93 | position = sp.AbsolutePosition; | ||
94 | lookat = sp.Lookat; | ||
95 | } | ||
96 | m_PresenceService.LogoutAgent(client.SessionId, position, lookat); | ||
97 | |||
82 | } | 98 | } |
83 | } | 99 | } |
84 | } | 100 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs index 6c69570..865f99e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs | |||
@@ -127,9 +127,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
127 | return false; | 127 | return false; |
128 | } | 128 | } |
129 | 129 | ||
130 | public bool LogoutAgent(UUID sessionID) | 130 | public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat) |
131 | { | 131 | { |
132 | return m_RemoteConnector.LogoutAgent(sessionID); | 132 | return m_RemoteConnector.LogoutAgent(sessionID, position, lookat); |
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs index ebb2c3e..9ba1bdc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests | |||
91 | result = m_LocalConnector.GetAgent(session1); | 91 | result = m_LocalConnector.GetAgent(session1); |
92 | Assert.That(result.RegionID, Is.EqualTo(region2), "Agent is not in the right region (region2)"); | 92 | Assert.That(result.RegionID, Is.EqualTo(region2), "Agent is not in the right region (region2)"); |
93 | 93 | ||
94 | r = m_LocalConnector.LogoutAgent(session1); | 94 | r = m_LocalConnector.LogoutAgent(session1, Vector3.Zero, Vector3.UnitY); |
95 | Assert.IsTrue(r, "LogoutAgent returned false"); | 95 | Assert.IsTrue(r, "LogoutAgent returned false"); |
96 | result = m_LocalConnector.GetAgent(session1); | 96 | result = m_LocalConnector.GetAgent(session1); |
97 | Assert.IsNotNull(result, "Agent session disappeared from storage after logout"); | 97 | Assert.IsNotNull(result, "Agent session disappeared from storage after logout"); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 53c51e6..6d6f0b1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3213,7 +3213,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3213 | 3213 | ||
3214 | if (!avatar.IsChildAgent) | 3214 | if (!avatar.IsChildAgent) |
3215 | { | 3215 | { |
3216 | m_sceneGridService.LogOffUser(agentID, RegionInfo.RegionID, RegionInfo.RegionHandle, avatar.AbsolutePosition, avatar.Lookat); | ||
3217 | //List<ulong> childknownRegions = new List<ulong>(); | 3216 | //List<ulong> childknownRegions = new List<ulong>(); |
3218 | //List<ulong> ckn = avatar.KnownChildRegionHandles; | 3217 | //List<ulong> ckn = avatar.KnownChildRegionHandles; |
3219 | //for (int i = 0; i < ckn.Count; i++) | 3218 | //for (int i = 0; i < ckn.Count; i++) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index ce3c16c..04ecb5f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -1444,19 +1444,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1444 | //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); | 1444 | //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); |
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | |||
1448 | public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat) | ||
1449 | { | ||
1450 | m_commsProvider.LogOffUser(userid, regionid, regionhandle, position, lookat); | ||
1451 | } | ||
1452 | |||
1453 | // deprecated as of 2008-08-27 | ||
1454 | public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz) | ||
1455 | { | ||
1456 | m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); | ||
1457 | } | ||
1458 | |||
1459 | |||
1460 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) | 1447 | public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) |
1461 | { | 1448 | { |
1462 | return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); | 1449 | return m_commsProvider.GenerateAgentPickerRequestResponse(queryID, query); |
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 6e47b22..926c195 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -131,6 +131,8 @@ namespace OpenSim.Server.Handlers.Presence | |||
131 | byte[] LogoutAgent(Dictionary<string, object> request) | 131 | byte[] LogoutAgent(Dictionary<string, object> request) |
132 | { | 132 | { |
133 | UUID session = UUID.Zero; | 133 | UUID session = UUID.Zero; |
134 | Vector3 position = Vector3.Zero; | ||
135 | Vector3 lookat = Vector3.Zero; | ||
134 | 136 | ||
135 | if (!request.ContainsKey("SessionID")) | 137 | if (!request.ContainsKey("SessionID")) |
136 | return FailureResult(); | 138 | return FailureResult(); |
@@ -138,7 +140,12 @@ namespace OpenSim.Server.Handlers.Presence | |||
138 | if (!UUID.TryParse(request["SessionID"].ToString(), out session)) | 140 | if (!UUID.TryParse(request["SessionID"].ToString(), out session)) |
139 | return FailureResult(); | 141 | return FailureResult(); |
140 | 142 | ||
141 | if (m_PresenceService.LogoutAgent(session)) | 143 | if (request.ContainsKey("Position") && request["Position"] != null) |
144 | Vector3.TryParse(request["Position"].ToString(), out position); | ||
145 | if (request.ContainsKey("LookAt") && request["Position"] != null) | ||
146 | Vector3.TryParse(request["LookAt"].ToString(), out lookat); | ||
147 | |||
148 | if (m_PresenceService.LogoutAgent(session, position, lookat)) | ||
142 | return SuccessResult(); | 149 | return SuccessResult(); |
143 | 150 | ||
144 | return FailureResult(); | 151 | return FailureResult(); |
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs index 29cfd6e..fac3d1f 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Services.Connectors | |||
132 | 132 | ||
133 | } | 133 | } |
134 | 134 | ||
135 | public bool LogoutAgent(UUID sessionID) | 135 | public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat) |
136 | { | 136 | { |
137 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 137 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
138 | //sendData["SCOPEID"] = scopeID.ToString(); | 138 | //sendData["SCOPEID"] = scopeID.ToString(); |
@@ -141,6 +141,8 @@ namespace OpenSim.Services.Connectors | |||
141 | sendData["METHOD"] = "logout"; | 141 | sendData["METHOD"] = "logout"; |
142 | 142 | ||
143 | sendData["SessionID"] = sessionID.ToString(); | 143 | sendData["SessionID"] = sessionID.ToString(); |
144 | sendData["Position"] = position.ToString(); | ||
145 | sendData["LookAt"] = lookat.ToString(); | ||
144 | 146 | ||
145 | string reqString = ServerUtils.BuildQueryString(sendData); | 147 | string reqString = ServerUtils.BuildQueryString(sendData); |
146 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); | 148 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); |
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index a010611..b4c1859 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs | |||
@@ -115,7 +115,7 @@ namespace OpenSim.Services.Interfaces | |||
115 | public interface IPresenceService | 115 | public interface IPresenceService |
116 | { | 116 | { |
117 | bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID); | 117 | bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID); |
118 | bool LogoutAgent(UUID sessionID); | 118 | bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookAt); |
119 | bool LogoutRegionAgents(UUID regionID); | 119 | bool LogoutRegionAgents(UUID regionID); |
120 | 120 | ||
121 | bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); | 121 | bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 2ae552f..47d1b16 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -163,7 +163,7 @@ namespace OpenSim.Services.LLLoginService | |||
163 | GridRegion destination = FindDestination(account, presence, session, startLocation, out where, out position, out lookAt); | 163 | GridRegion destination = FindDestination(account, presence, session, startLocation, out where, out position, out lookAt); |
164 | if (destination == null) | 164 | if (destination == null) |
165 | { | 165 | { |
166 | m_PresenceService.LogoutAgent(session); | 166 | m_PresenceService.LogoutAgent(session, presence.Position, presence.LookAt); |
167 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: destination not found"); | 167 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: destination not found"); |
168 | return LLFailedLoginResponse.GridProblem; | 168 | return LLFailedLoginResponse.GridProblem; |
169 | } | 169 | } |
@@ -195,7 +195,7 @@ namespace OpenSim.Services.LLLoginService | |||
195 | } | 195 | } |
196 | if (aCircuit == null) | 196 | if (aCircuit == null) |
197 | { | 197 | { |
198 | m_PresenceService.LogoutAgent(session); | 198 | m_PresenceService.LogoutAgent(session, presence.Position, presence.LookAt); |
199 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason); | 199 | m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: {0}", reason); |
200 | return LLFailedLoginResponse.AuthorizationProblem; | 200 | return LLFailedLoginResponse.AuthorizationProblem; |
201 | } | 201 | } |
@@ -212,7 +212,7 @@ namespace OpenSim.Services.LLLoginService | |||
212 | { | 212 | { |
213 | m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2}", firstName, lastName, e.StackTrace); | 213 | m_log.WarnFormat("[LLOGIN SERVICE]: Exception processing login for {0} {1}: {2}", firstName, lastName, e.StackTrace); |
214 | if (m_PresenceService != null) | 214 | if (m_PresenceService != null) |
215 | m_PresenceService.LogoutAgent(session); | 215 | m_PresenceService.LogoutAgent(session, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); |
216 | return LLFailedLoginResponse.InternalError; | 216 | return LLFailedLoginResponse.InternalError; |
217 | } | 217 | } |
218 | } | 218 | } |
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 2884199..34a3154 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Services.PresenceService | |||
87 | return true; | 87 | return true; |
88 | } | 88 | } |
89 | 89 | ||
90 | public bool LogoutAgent(UUID sessionID) | 90 | public bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookat) |
91 | { | 91 | { |
92 | PresenceData data = m_Database.Get(sessionID); | 92 | PresenceData data = m_Database.Get(sessionID); |
93 | if (data == null) | 93 | if (data == null) |
@@ -103,6 +103,8 @@ namespace OpenSim.Services.PresenceService | |||
103 | 103 | ||
104 | data.Data["Online"] = "false"; | 104 | data.Data["Online"] = "false"; |
105 | data.Data["Logout"] = Util.UnixTimeSinceEpoch().ToString(); | 105 | data.Data["Logout"] = Util.UnixTimeSinceEpoch().ToString(); |
106 | data.Data["Position"] = position.ToString(); | ||
107 | data.Data["LookAt"] = lookat.ToString(); | ||
106 | 108 | ||
107 | m_Database.Store(data); | 109 | m_Database.Store(data); |
108 | 110 | ||
diff --git a/OpenSim/Tests/Clients/Presence/PresenceClient.cs b/OpenSim/Tests/Clients/Presence/PresenceClient.cs index 3416804..4f959f6 100644 --- a/OpenSim/Tests/Clients/Presence/PresenceClient.cs +++ b/OpenSim/Tests/Clients/Presence/PresenceClient.cs | |||
@@ -103,7 +103,7 @@ namespace OpenSim.Tests.Clients.PresenceClient | |||
103 | pinfo.UserID, pinfo.Online, pinfo.RegionID, pinfo.HomeRegionID); | 103 | pinfo.UserID, pinfo.Online, pinfo.RegionID, pinfo.HomeRegionID); |
104 | 104 | ||
105 | System.Console.WriteLine("\n"); | 105 | System.Console.WriteLine("\n"); |
106 | success = m_Connector.LogoutAgent(session1); | 106 | success = m_Connector.LogoutAgent(session1, Vector3.Zero, Vector3.UnitY); |
107 | if (success) | 107 | if (success) |
108 | m_log.InfoFormat("[PRESENCE CLIENT]: Successfully logged out user {0}", user1); | 108 | m_log.InfoFormat("[PRESENCE CLIENT]: Successfully logged out user {0}", user1); |
109 | else | 109 | else |
diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini index e881e30..bf3237b 100644 --- a/bin/config-include/Standalone.ini +++ b/bin/config-include/Standalone.ini | |||
@@ -15,7 +15,9 @@ | |||
15 | GridServices = "LocalGridServicesConnector" | 15 | GridServices = "LocalGridServicesConnector" |
16 | PresenceServices = "LocalPresenceServicesConnector" | 16 | PresenceServices = "LocalPresenceServicesConnector" |
17 | UserAccountServices = "LocalUserAccountServicesConnector" | 17 | UserAccountServices = "LocalUserAccountServicesConnector" |
18 | SimulationServices = "LocalSimulationConnectorModule" | ||
18 | LibraryModule = true | 19 | LibraryModule = true |
20 | LLLoginServiceInConnector = true | ||
19 | 21 | ||
20 | [AssetService] | 22 | [AssetService] |
21 | LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" | 23 | LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" |
@@ -23,6 +25,11 @@ | |||
23 | [InventoryService] | 25 | [InventoryService] |
24 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" | 26 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService" |
25 | 27 | ||
28 | [LibraryService] | ||
29 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" | ||
30 | LibraryName = "OpenSim Library" | ||
31 | DefaultLibrary = "./inventory/Libraries.xml" | ||
32 | |||
26 | [AuthorizationService] | 33 | [AuthorizationService] |
27 | LocalServiceModule = "OpenSim.Services.AuthorizationService.dll:AuthorizationService" | 34 | LocalServiceModule = "OpenSim.Services.AuthorizationService.dll:AuthorizationService" |
28 | 35 | ||
@@ -35,3 +42,18 @@ | |||
35 | 42 | ||
36 | [UserAccountService] | 43 | [UserAccountService] |
37 | LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" | 44 | LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" |
45 | ;; These are for creating new accounts | ||
46 | AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
47 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
48 | GridService = "OpenSim.Services.GridService.dll:GridService" | ||
49 | |||
50 | [LoginService] | ||
51 | LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService" | ||
52 | UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" | ||
53 | AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
54 | InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService" | ||
55 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
56 | GridService = "OpenSim.Services.GridService.dll:GridService" | ||
57 | |||
58 | DefaultRegion = "OpenSim Test" | ||
59 | WelcomeMessage = "Welcome, Avatar!" | ||