diff options
author | Melanie | 2009-11-18 08:21:28 +0000 |
---|---|---|
committer | Melanie | 2009-11-18 08:21:28 +0000 |
commit | 06ecdf1967848e3f0c6b6f98aba61c7ad099f65d (patch) | |
tree | 56275806fb3df065c1734bd10d179ebfcea64c89 /OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |
parent | Change PresenceData to PresenceInfo to remove a naming conflict in the (diff) | |
download | opensim-SC-06ecdf1967848e3f0c6b6f98aba61c7ad099f65d.zip opensim-SC-06ecdf1967848e3f0c6b6f98aba61c7ad099f65d.tar.gz opensim-SC-06ecdf1967848e3f0c6b6f98aba61c7ad099f65d.tar.bz2 opensim-SC-06ecdf1967848e3f0c6b6f98aba61c7ad099f65d.tar.xz |
Tweak presence handling and whip up a database connector and handler
for testign the new generic table handling
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 9ca5120..2558fa0 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -94,6 +94,33 @@ namespace OpenSim.Server.Handlers.Presence | |||
94 | 94 | ||
95 | byte[] Report(Dictionary<string, string> request) | 95 | byte[] Report(Dictionary<string, string> request) |
96 | { | 96 | { |
97 | PresenceInfo info = new PresenceInfo(); | ||
98 | info.Data = new Dictionary<string, string>(); | ||
99 | |||
100 | if (request["PrincipalID"] == null || request["RegionID"] == null) | ||
101 | return FailureResult(); | ||
102 | |||
103 | if (!UUID.TryParse(request["PrincipalID"].ToString(), | ||
104 | out info.PrincipalID)) | ||
105 | return FailureResult(); | ||
106 | |||
107 | if (!UUID.TryParse(request["RegionID"].ToString(), | ||
108 | out info.RegionID)) | ||
109 | return FailureResult(); | ||
110 | |||
111 | foreach (KeyValuePair<string, string> kvp in request) | ||
112 | { | ||
113 | if (kvp.Key == "METHOD" || | ||
114 | kvp.Key == "PrincipalID" || | ||
115 | kvp.Key == "RegionID") | ||
116 | continue; | ||
117 | |||
118 | info.Data[kvp.Key] = kvp.Value; | ||
119 | } | ||
120 | |||
121 | if (m_PresenceService.Report(info)) | ||
122 | return SuccessResult(); | ||
123 | |||
97 | return FailureResult(); | 124 | return FailureResult(); |
98 | } | 125 | } |
99 | 126 | ||