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

This commit is contained in:
Jonathan Freedman
2010-10-05 14:17:18 -04:00
45 changed files with 28159 additions and 27668 deletions

View File

@@ -238,8 +238,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
args["destination_name"] = OSD.FromString(destination.RegionName);
args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
if (ipaddress != null)
args["client_ip"] = OSD.FromString(ipaddress.Address.ToString());
// 10/3/2010
// I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here.
// This need cleaning elsewhere...
//if (ipaddress != null)
// args["client_ip"] = OSD.FromString(ipaddress.Address.ToString());
return args;
}

View File

@@ -147,7 +147,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
if (account == null)
{
// Store null responses too, to avoid repeated lookups for missing accounts
m_accountCache.AddOrUpdate(userID, null, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS));
m_accountCache.AddOrUpdate(userID, null, CACHE_EXPIRATION_SECONDS);
}
return account;
@@ -225,7 +225,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
if (success)
{
// Cache the user account info
m_accountCache.AddOrUpdate(data.PrincipalID, data, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS));
m_accountCache.AddOrUpdate(data.PrincipalID, data, CACHE_EXPIRATION_SECONDS);
}
else
{
@@ -290,7 +290,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
// Cache the user account info
m_accountCache.AddOrUpdate(account.PrincipalID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS));
m_accountCache.AddOrUpdate(account.PrincipalID, account, CACHE_EXPIRATION_SECONDS);
return account;
}

View File

@@ -148,7 +148,6 @@ namespace OpenSim.Services.HypergridService
agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
//bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
bool success = false;
string myExternalIP = string.Empty;
string gridName = gatekeeper.ServerURI;
@@ -200,6 +199,11 @@ namespace OpenSim.Services.HypergridService
{
if (m_TravelingAgents.ContainsKey(agentCircuit.SessionID))
{
// Very important! Override whatever this agent comes with.
// UserAgentService always sets the IP for every new agent
// with the original IP address.
agentCircuit.IPAddress = m_TravelingAgents[agentCircuit.SessionID].ClientIPAddress;
old = m_TravelingAgents[agentCircuit.SessionID];
}

View File

@@ -47,7 +47,8 @@ namespace OpenSim.Services.Interfaces
public interface ILoginService
{
LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, string clientVersion, IPEndPoint clientIP);
LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP);
Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP);
}

View File

@@ -208,7 +208,8 @@ namespace OpenSim.Services.LLLoginService
return response;
}
public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, string clientVersion, IPEndPoint clientIP)
public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP)
{
bool success = false;
UUID session = UUID.Random();
@@ -340,7 +341,8 @@ namespace OpenSim.Services.LLLoginService
//
string reason = string.Empty;
GridRegion dest;
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, clientIP, out where, out reason, out dest);
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest);
destination = dest;
if (aCircuit == null)
{
@@ -600,7 +602,8 @@ namespace OpenSim.Services.LLLoginService
}
protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar,
UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, IPEndPoint clientIP, out string where, out string reason, out GridRegion dest)
UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
IPEndPoint clientIP, out string where, out string reason, out GridRegion dest)
{
where = currentWhere;
ISimulationService simConnector = null;
@@ -640,7 +643,7 @@ namespace OpenSim.Services.LLLoginService
if (m_UserAgentService == null && simConnector != null)
{
circuitCode = (uint)Util.RandomClass.Next(); ;
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer);
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason);
if (!success && m_GridService != null)
{
@@ -665,7 +668,7 @@ namespace OpenSim.Services.LLLoginService
if (m_UserAgentService != null)
{
circuitCode = (uint)Util.RandomClass.Next(); ;
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer);
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
if (!success && m_GridService != null)
{
@@ -694,7 +697,8 @@ namespace OpenSim.Services.LLLoginService
}
private AgentCircuitData MakeAgent(GridRegion region, UserAccount account,
AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position, string viewer)
AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position,
string ipaddress, string viewer, string channel, string mac, string id0)
{
AgentCircuitData aCircuit = new AgentCircuitData();
@@ -715,7 +719,11 @@ namespace OpenSim.Services.LLLoginService
aCircuit.SecureSessionID = secureSession;
aCircuit.SessionID = session;
aCircuit.startpos = position;
aCircuit.IPAddress = ipaddress;
aCircuit.Viewer = viewer;
aCircuit.Channel = channel;
aCircuit.Mac = mac;
aCircuit.Id0 = id0;
SetServiceURLs(aCircuit, account);
return aCircuit;