aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/UserAgentService.cs
diff options
context:
space:
mode:
authorDiva Canto2010-05-07 21:29:56 -0700
committerDiva Canto2010-05-07 21:29:56 -0700
commita58859a0d4206c194c9c56212218e2cafc2cc373 (patch)
treefed51a4e40c344b76f6b8b4d5c5b2ec0d2e142e4 /OpenSim/Services/HypergridService/UserAgentService.cs
parentimprove handling of undersize sculpt textures (diff)
downloadopensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.zip
opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.gz
opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.bz2
opensim-SC_OLD-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.xz
GridUserService in place. Replaces the contrived concept of storing user's home and position info in the presence service. WARNING: I violated a taboo by deleting 2 migration files and simplifying the original table creation for Presence. This should not cause any problems to anyone, though. Things will work with the new simplified table, as well as with the previous contrived one. If there are any problems, solving them is as easy as dropping the presence table and deleting its row in the migrations table. The presence info only exists during a user's session anyway.
BTW, the Meshing files want to be committed too -- EOFs.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs21
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 26f211b..3af7ef9 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Services.HypergridService
59 59
60 static bool m_Initialized = false; 60 static bool m_Initialized = false;
61 61
62 protected static IPresenceService m_PresenceService; 62 protected static IGridUserService m_GridUserService;
63 protected static IGridService m_GridService; 63 protected static IGridService m_GridService;
64 protected static GatekeeperServiceConnector m_GatekeeperConnector; 64 protected static GatekeeperServiceConnector m_GatekeeperConnector;
65 65
@@ -74,14 +74,14 @@ namespace OpenSim.Services.HypergridService
74 throw new Exception(String.Format("No section UserAgentService in config file")); 74 throw new Exception(String.Format("No section UserAgentService in config file"));
75 75
76 string gridService = serverConfig.GetString("GridService", String.Empty); 76 string gridService = serverConfig.GetString("GridService", String.Empty);
77 string presenceService = serverConfig.GetString("PresenceService", String.Empty); 77 string gridUserService = serverConfig.GetString("GridUserService", String.Empty);
78 78
79 if (gridService == string.Empty || presenceService == string.Empty) 79 if (gridService == string.Empty || gridUserService == string.Empty)
80 throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); 80 throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function."));
81 81
82 Object[] args = new Object[] { config }; 82 Object[] args = new Object[] { config };
83 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 83 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
84 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); 84 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
85 m_GatekeeperConnector = new GatekeeperServiceConnector(); 85 m_GatekeeperConnector = new GatekeeperServiceConnector();
86 86
87 m_Initialized = true; 87 m_Initialized = true;
@@ -95,15 +95,14 @@ namespace OpenSim.Services.HypergridService
95 m_log.DebugFormat("[USER AGENT SERVICE]: Request to get home region of user {0}", userID); 95 m_log.DebugFormat("[USER AGENT SERVICE]: Request to get home region of user {0}", userID);
96 96
97 GridRegion home = null; 97 GridRegion home = null;
98 PresenceInfo[] presences = m_PresenceService.GetAgents(new string[] { userID.ToString() }); 98 GridUserInfo uinfo = m_GridUserService.GetGridUserInfo(userID.ToString());
99 if (presences != null && presences.Length > 0) 99 if (uinfo != null)
100 { 100 {
101 UUID homeID = presences[0].HomeRegionID; 101 if (uinfo.HomeRegionID != UUID.Zero)
102 if (homeID != UUID.Zero)
103 { 102 {
104 home = m_GridService.GetRegionByUUID(UUID.Zero, homeID); 103 home = m_GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
105 position = presences[0].HomePosition; 104 position = uinfo.HomePosition;
106 lookAt = presences[0].HomeLookAt; 105 lookAt = uinfo.HomeLookAt;
107 } 106 }
108 if (home == null) 107 if (home == null)
109 { 108 {