diff options
author | BlueWall | 2012-12-08 17:33:03 -0500 |
---|---|---|
committer | BlueWall | 2012-12-08 17:33:03 -0500 |
commit | f85b23edea3af2880086d096c85838cf48dd01a4 (patch) | |
tree | 0fcd995b8dff7553cd2e7bd11b1052e86f18d5a0 /OpenSim/Data | |
parent | Format change (diff) | |
download | opensim-SC-f85b23edea3af2880086d096c85838cf48dd01a4.zip opensim-SC-f85b23edea3af2880086d096c85838cf48dd01a4.tar.gz opensim-SC-f85b23edea3af2880086d096c85838cf48dd01a4.tar.bz2 opensim-SC-f85b23edea3af2880086d096c85838cf48dd01a4.tar.xz |
Add agent verification to Presence
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/IPresenceData.cs | 1 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLPresenceData.cs | 11 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLPresenceData.cs | 11 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullPresenceData.cs | 13 |
4 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Data/IPresenceData.cs b/OpenSim/Data/IPresenceData.cs index b871f56..2759a42 100644 --- a/OpenSim/Data/IPresenceData.cs +++ b/OpenSim/Data/IPresenceData.cs | |||
@@ -53,5 +53,6 @@ namespace OpenSim.Data | |||
53 | bool ReportAgent(UUID sessionID, UUID regionID); | 53 | bool ReportAgent(UUID sessionID, UUID regionID); |
54 | PresenceData[] Get(string field, string data); | 54 | PresenceData[] Get(string field, string data); |
55 | bool Delete(string field, string val); | 55 | bool Delete(string field, string val); |
56 | PresenceData VerifyAgent(UUID secureSessionID); | ||
56 | } | 57 | } |
57 | } | 58 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs index 8068d23..5f495ae 100644 --- a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs +++ b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs | |||
@@ -100,5 +100,16 @@ namespace OpenSim.Data.MSSQL | |||
100 | return true; | 100 | return true; |
101 | } | 101 | } |
102 | 102 | ||
103 | public PresenceData VerifyAgent(UUID secureSessionID) | ||
104 | { | ||
105 | PresenceData[] ret = Get("SecureSessionID", | ||
106 | secureSessionID.ToString()); | ||
107 | |||
108 | if (ret.Length == 0) | ||
109 | return null; | ||
110 | |||
111 | return ret[0]; | ||
112 | } | ||
113 | |||
103 | } | 114 | } |
104 | } | 115 | } |
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index 7808060..577a71a 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs | |||
@@ -95,5 +95,16 @@ namespace OpenSim.Data.MySQL | |||
95 | 95 | ||
96 | return true; | 96 | return true; |
97 | } | 97 | } |
98 | |||
99 | public PresenceData VerifyAgent(UUID secureSessionID) | ||
100 | { | ||
101 | PresenceData[] ret = Get("SecureSessionID", | ||
102 | secureSessionID.ToString()); | ||
103 | |||
104 | if (ret.Length == 0) | ||
105 | return null; | ||
106 | |||
107 | return ret[0]; | ||
108 | } | ||
98 | } | 109 | } |
99 | } \ No newline at end of file | 110 | } \ No newline at end of file |
diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index c06c223..eafde95 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs | |||
@@ -222,5 +222,18 @@ namespace OpenSim.Data.Null | |||
222 | return true; | 222 | return true; |
223 | } | 223 | } |
224 | 224 | ||
225 | public PresenceData VerifyAgent(UUID secureSessionID) | ||
226 | { | ||
227 | if (Instance != this) | ||
228 | return Instance.VerifyAgent(secureSessionID); | ||
229 | |||
230 | if (m_presenceData.ContainsKey(secureSessionID)) | ||
231 | { | ||
232 | return m_presenceData[secureSessionID]; | ||
233 | } | ||
234 | |||
235 | return null; | ||
236 | } | ||
237 | |||
225 | } | 238 | } |
226 | } | 239 | } |