Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

0.7.5-pf-bulletsim
Diva Canto 2012-12-09 15:31:50 -08:00
commit 39b388a094
4 changed files with 17 additions and 17 deletions

View File

@ -53,6 +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); bool VerifyAgent(UUID agentId, UUID secureSessionID);
} }
} }

View File

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

View File

@ -96,15 +96,18 @@ namespace OpenSim.Data.MySQL
return true; return true;
} }
public PresenceData VerifyAgent(UUID secureSessionID) public bool VerifyAgent(UUID agentId, UUID secureSessionID)
{ {
PresenceData[] ret = Get("SecureSessionID", PresenceData[] ret = Get("SecureSessionID",
secureSessionID.ToString()); secureSessionID.ToString());
if (ret.Length == 0) if (ret.Length == 0)
return null; return false;
return ret[0]; if(ret[0].UserID != agentId.ToString())
return false;
return true;
} }
} }
} }

View File

@ -222,17 +222,12 @@ namespace OpenSim.Data.Null
return true; return true;
} }
public PresenceData VerifyAgent(UUID secureSessionID) public bool VerifyAgent(UUID agentId, UUID secureSessionID)
{ {
if (Instance != this) if (Instance != this)
return Instance.VerifyAgent(secureSessionID); return Instance.VerifyAgent(agentId, secureSessionID);
if (m_presenceData.ContainsKey(secureSessionID)) return false;
{
return m_presenceData[secureSessionID];
}
return null;
} }
} }