diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/PresenceService/PresenceService.cs | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index b5ca4d5..1059b2b 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Services.PresenceService | |||
71 | data.SessionID = sessionID; | 71 | data.SessionID = sessionID; |
72 | data.Data = new Dictionary<string, string>(); | 72 | data.Data = new Dictionary<string, string>(); |
73 | data.Data["SecureSessionID"] = secureSessionID.ToString(); | 73 | data.Data["SecureSessionID"] = secureSessionID.ToString(); |
74 | 74 | ||
75 | m_Database.Store(data); | 75 | m_Database.Store(data); |
76 | 76 | ||
77 | string prevUserStr = ""; | 77 | string prevUserStr = ""; |
@@ -80,7 +80,7 @@ namespace OpenSim.Services.PresenceService | |||
80 | 80 | ||
81 | m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}", | 81 | m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}", |
82 | data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr); | 82 | data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr); |
83 | 83 | ||
84 | return true; | 84 | return true; |
85 | } | 85 | } |
86 | 86 | ||
@@ -92,7 +92,7 @@ namespace OpenSim.Services.PresenceService | |||
92 | sessionID, | 92 | sessionID, |
93 | (presence == null) ? null : presence.UserID, | 93 | (presence == null) ? null : presence.UserID, |
94 | (presence == null) ? null : presence.RegionID.ToString()); | 94 | (presence == null) ? null : presence.RegionID.ToString()); |
95 | 95 | ||
96 | return m_Database.Delete("SessionID", sessionID.ToString()); | 96 | return m_Database.Delete("SessionID", sessionID.ToString()); |
97 | } | 97 | } |
98 | 98 | ||
@@ -144,13 +144,29 @@ namespace OpenSim.Services.PresenceService | |||
144 | public PresenceInfo GetAgent(UUID sessionID) | 144 | public PresenceInfo GetAgent(UUID sessionID) |
145 | { | 145 | { |
146 | PresenceInfo ret = new PresenceInfo(); | 146 | PresenceInfo ret = new PresenceInfo(); |
147 | 147 | ||
148 | PresenceData data = m_Database.Get(sessionID); | 148 | PresenceData data = m_Database.Get(sessionID); |
149 | if (data == null) | 149 | if (data == null) |
150 | return null; | 150 | return null; |
151 | 151 | ||
152 | ret.UserID = data.UserID; | 152 | ret.UserID = data.UserID; |
153 | ret.RegionID = data.RegionID; | 153 | ret.RegionID = data.RegionID; |
154 | ret.SessionID = data.SessionID; | ||
155 | |||
156 | return ret; | ||
157 | } | ||
158 | |||
159 | public PresenceInfo GetAgentByUser(UUID userID) | ||
160 | { | ||
161 | PresenceInfo ret = new PresenceInfo(); | ||
162 | |||
163 | PresenceData data = m_Database.GetByUser(userID); | ||
164 | if (data == null) | ||
165 | return null; | ||
166 | |||
167 | ret.UserID = data.UserID; | ||
168 | ret.RegionID = data.RegionID; | ||
169 | ret.SessionID = data.SessionID; | ||
154 | 170 | ||
155 | return ret; | 171 | return ret; |
156 | } | 172 | } |
@@ -169,6 +185,7 @@ namespace OpenSim.Services.PresenceService | |||
169 | 185 | ||
170 | ret.UserID = d.UserID; | 186 | ret.UserID = d.UserID; |
171 | ret.RegionID = d.RegionID; | 187 | ret.RegionID = d.RegionID; |
188 | ret.SessionID = d.SessionID; | ||
172 | 189 | ||
173 | info.Add(ret); | 190 | info.Add(ret); |
174 | } | 191 | } |