diff options
author | Diva Canto | 2010-05-07 21:29:56 -0700 |
---|---|---|
committer | Diva Canto | 2010-05-07 21:29:56 -0700 |
commit | a58859a0d4206c194c9c56212218e2cafc2cc373 (patch) | |
tree | fed51a4e40c344b76f6b8b4d5c5b2ec0d2e142e4 /OpenSim/Services/Connectors/Presence | |
parent | improve handling of undersize sculpt textures (diff) | |
download | opensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.zip opensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.gz opensim-SC-a58859a0d4206c194c9c56212218e2cafc2cc373.tar.bz2 opensim-SC-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 'OpenSim/Services/Connectors/Presence')
-rw-r--r-- | OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServiceConnector.cs index 23621b7..41ebeaf 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, Vector3 position, Vector3 lookat) | 135 | public bool LogoutAgent(UUID sessionID) |
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,8 +141,6 @@ 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(); | ||
146 | 144 | ||
147 | string reqString = ServerUtils.BuildQueryString(sendData); | 145 | string reqString = ServerUtils.BuildQueryString(sendData); |
148 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); | 146 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); |
@@ -220,7 +218,7 @@ namespace OpenSim.Services.Connectors | |||
220 | return false; | 218 | return false; |
221 | } | 219 | } |
222 | 220 | ||
223 | public bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt) | 221 | public bool ReportAgent(UUID sessionID, UUID regionID) |
224 | { | 222 | { |
225 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 223 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |
226 | //sendData["SCOPEID"] = scopeID.ToString(); | 224 | //sendData["SCOPEID"] = scopeID.ToString(); |
@@ -230,8 +228,6 @@ namespace OpenSim.Services.Connectors | |||
230 | 228 | ||
231 | sendData["SessionID"] = sessionID.ToString(); | 229 | sendData["SessionID"] = sessionID.ToString(); |
232 | sendData["RegionID"] = regionID.ToString(); | 230 | sendData["RegionID"] = regionID.ToString(); |
233 | sendData["position"] = position.ToString(); | ||
234 | sendData["lookAt"] = lookAt.ToString(); | ||
235 | 231 | ||
236 | string reqString = ServerUtils.BuildQueryString(sendData); | 232 | string reqString = ServerUtils.BuildQueryString(sendData); |
237 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); | 233 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); |
@@ -371,52 +367,6 @@ namespace OpenSim.Services.Connectors | |||
371 | } | 367 | } |
372 | 368 | ||
373 | 369 | ||
374 | public bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt) | ||
375 | { | ||
376 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
377 | //sendData["SCOPEID"] = scopeID.ToString(); | ||
378 | sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); | ||
379 | sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); | ||
380 | sendData["METHOD"] = "sethome"; | ||
381 | |||
382 | sendData["UserID"] = userID; | ||
383 | sendData["RegionID"] = regionID.ToString(); | ||
384 | sendData["position"] = position.ToString(); | ||
385 | sendData["lookAt"] = lookAt.ToString(); | ||
386 | |||
387 | string reqString = ServerUtils.BuildQueryString(sendData); | ||
388 | // m_log.DebugFormat("[PRESENCE CONNECTOR]: queryString = {0}", reqString); | ||
389 | try | ||
390 | { | ||
391 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | ||
392 | m_ServerURI + "/presence", | ||
393 | reqString); | ||
394 | if (reply != string.Empty) | ||
395 | { | ||
396 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | ||
397 | |||
398 | if (replyData.ContainsKey("result")) | ||
399 | { | ||
400 | if (replyData["result"].ToString().ToLower() == "success") | ||
401 | return true; | ||
402 | else | ||
403 | return false; | ||
404 | } | ||
405 | else | ||
406 | m_log.DebugFormat("[PRESENCE CONNECTOR]: SetHomeLocation reply data does not contain result field"); | ||
407 | |||
408 | } | ||
409 | else | ||
410 | m_log.DebugFormat("[PRESENCE CONNECTOR]: SetHomeLocation received empty reply"); | ||
411 | } | ||
412 | catch (Exception e) | ||
413 | { | ||
414 | m_log.DebugFormat("[PRESENCE CONNECTOR]: Exception when contacting presence server: {0}", e.Message); | ||
415 | } | ||
416 | |||
417 | return false; | ||
418 | } | ||
419 | |||
420 | #endregion | 370 | #endregion |
421 | 371 | ||
422 | } | 372 | } |