Add agent verification to Presence

0.7.5-pf-bulletsim
BlueWall 2012-12-08 17:33:03 -05:00
parent 77e88fab06
commit f85b23edea
4 changed files with 36 additions and 0 deletions

View File

@ -53,5 +53,6 @@ namespace OpenSim.Data
bool ReportAgent(UUID sessionID, UUID regionID); bool ReportAgent(UUID sessionID, UUID regionID);
PresenceData[] Get(string field, string data); PresenceData[] Get(string field, string data);
bool Delete(string field, string val); bool Delete(string field, string val);
PresenceData VerifyAgent(UUID secureSessionID);
} }
} }

View File

@ -100,5 +100,16 @@ namespace OpenSim.Data.MSSQL
return true; return true;
} }
public PresenceData VerifyAgent(UUID secureSessionID)
{
PresenceData[] ret = Get("SecureSessionID",
secureSessionID.ToString());
if (ret.Length == 0)
return null;
return ret[0];
}
} }
} }

View File

@ -95,5 +95,16 @@ namespace OpenSim.Data.MySQL
return true; return true;
} }
public PresenceData VerifyAgent(UUID secureSessionID)
{
PresenceData[] ret = Get("SecureSessionID",
secureSessionID.ToString());
if (ret.Length == 0)
return null;
return ret[0];
}
} }
} }

View File

@ -222,5 +222,18 @@ namespace OpenSim.Data.Null
return true; 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;
}
} }
} }