diff --git a/OpenSim/Data/IPresenceData.cs b/OpenSim/Data/IPresenceData.cs index b871f5636c..2759a42522 100644 --- a/OpenSim/Data/IPresenceData.cs +++ b/OpenSim/Data/IPresenceData.cs @@ -53,5 +53,6 @@ namespace OpenSim.Data bool ReportAgent(UUID sessionID, UUID regionID); PresenceData[] Get(string field, string data); bool Delete(string field, string val); + PresenceData VerifyAgent(UUID secureSessionID); } } diff --git a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs index 8068d23bb1..5f495ae034 100644 --- a/OpenSim/Data/MSSQL/MSSQLPresenceData.cs +++ b/OpenSim/Data/MSSQL/MSSQLPresenceData.cs @@ -100,5 +100,16 @@ namespace OpenSim.Data.MSSQL return true; } + public PresenceData VerifyAgent(UUID secureSessionID) + { + PresenceData[] ret = Get("SecureSessionID", + secureSessionID.ToString()); + + if (ret.Length == 0) + return null; + + return ret[0]; + } + } } diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index 780806087f..577a71a42f 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs @@ -95,5 +95,16 @@ namespace OpenSim.Data.MySQL return true; } + + public PresenceData VerifyAgent(UUID secureSessionID) + { + PresenceData[] ret = Get("SecureSessionID", + secureSessionID.ToString()); + + if (ret.Length == 0) + return null; + + return ret[0]; + } } } \ No newline at end of file diff --git a/OpenSim/Data/Null/NullPresenceData.cs b/OpenSim/Data/Null/NullPresenceData.cs index c06c223a81..eafde95db2 100644 --- a/OpenSim/Data/Null/NullPresenceData.cs +++ b/OpenSim/Data/Null/NullPresenceData.cs @@ -222,5 +222,18 @@ namespace OpenSim.Data.Null return true; } + public PresenceData VerifyAgent(UUID secureSessionID) + { + if (Instance != this) + return Instance.VerifyAgent(secureSessionID); + + if (m_presenceData.ContainsKey(secureSessionID)) + { + return m_presenceData[secureSessionID]; + } + + return null; + } + } }