aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorJonathan Freedman2010-10-05 14:17:18 -0400
committerJonathan Freedman2010-10-05 14:17:18 -0400
commit8f1acb890ac49ea004bf43065ce8d3472bb27708 (patch)
tree07e4e5fc77f764232c958bdbf8f93f2651da1663 /OpenSim/Services
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
parentFormatting cleanup. (diff)
downloadopensim-SC-8f1acb890ac49ea004bf43065ce8d3472bb27708.zip
opensim-SC-8f1acb890ac49ea004bf43065ce8d3472bb27708.tar.gz
opensim-SC-8f1acb890ac49ea004bf43065ce8d3472bb27708.tar.bz2
opensim-SC-8f1acb890ac49ea004bf43065ce8d3472bb27708.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs6
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs6
-rw-r--r--OpenSim/Services/Interfaces/ILoginService.cs3
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs20
5 files changed, 30 insertions, 13 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
index 6d3c64a..247dd7e 100644
--- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs
@@ -238,8 +238,12 @@ namespace OpenSim.Services.Connectors.Hypergrid
238 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); 238 args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString());
239 args["destination_name"] = OSD.FromString(destination.RegionName); 239 args["destination_name"] = OSD.FromString(destination.RegionName);
240 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); 240 args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString());
241 if (ipaddress != null) 241
242 args["client_ip"] = OSD.FromString(ipaddress.Address.ToString()); 242 // 10/3/2010
243 // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here.
244 // This need cleaning elsewhere...
245 //if (ipaddress != null)
246 // args["client_ip"] = OSD.FromString(ipaddress.Address.ToString());
243 247
244 return args; 248 return args;
245 } 249 }
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
index ddd2322..9c150ee 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
147 if (account == null) 147 if (account == null)
148 { 148 {
149 // Store null responses too, to avoid repeated lookups for missing accounts 149 // Store null responses too, to avoid repeated lookups for missing accounts
150 m_accountCache.AddOrUpdate(userID, null, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); 150 m_accountCache.AddOrUpdate(userID, null, CACHE_EXPIRATION_SECONDS);
151 } 151 }
152 152
153 return account; 153 return account;
@@ -225,7 +225,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
225 if (success) 225 if (success)
226 { 226 {
227 // Cache the user account info 227 // Cache the user account info
228 m_accountCache.AddOrUpdate(data.PrincipalID, data, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); 228 m_accountCache.AddOrUpdate(data.PrincipalID, data, CACHE_EXPIRATION_SECONDS);
229 } 229 }
230 else 230 else
231 { 231 {
@@ -290,7 +290,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
290 GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); 290 GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName);
291 291
292 // Cache the user account info 292 // Cache the user account info
293 m_accountCache.AddOrUpdate(account.PrincipalID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); 293 m_accountCache.AddOrUpdate(account.PrincipalID, account, CACHE_EXPIRATION_SECONDS);
294 294
295 return account; 295 return account;
296 } 296 }
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 4653b31..d5dda11 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -148,7 +148,6 @@ namespace OpenSim.Services.HypergridService
148 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random(); 148 agentCircuit.ServiceSessionID = region.ServerURI + ";" + UUID.Random();
149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 149 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
150 150
151 //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
152 bool success = false; 151 bool success = false;
153 string myExternalIP = string.Empty; 152 string myExternalIP = string.Empty;
154 string gridName = gatekeeper.ServerURI; 153 string gridName = gatekeeper.ServerURI;
@@ -200,6 +199,11 @@ namespace OpenSim.Services.HypergridService
200 { 199 {
201 if (m_TravelingAgents.ContainsKey(agentCircuit.SessionID)) 200 if (m_TravelingAgents.ContainsKey(agentCircuit.SessionID))
202 { 201 {
202 // Very important! Override whatever this agent comes with.
203 // UserAgentService always sets the IP for every new agent
204 // with the original IP address.
205 agentCircuit.IPAddress = m_TravelingAgents[agentCircuit.SessionID].ClientIPAddress;
206
203 old = m_TravelingAgents[agentCircuit.SessionID]; 207 old = m_TravelingAgents[agentCircuit.SessionID];
204 } 208 }
205 209
diff --git a/OpenSim/Services/Interfaces/ILoginService.cs b/OpenSim/Services/Interfaces/ILoginService.cs
index 9e57339..ee9b0b1 100644
--- a/OpenSim/Services/Interfaces/ILoginService.cs
+++ b/OpenSim/Services/Interfaces/ILoginService.cs
@@ -47,7 +47,8 @@ namespace OpenSim.Services.Interfaces
47 47
48 public interface ILoginService 48 public interface ILoginService
49 { 49 {
50 LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, string clientVersion, IPEndPoint clientIP); 50 LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
51 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP);
51 Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP); 52 Hashtable SetLevel(string firstName, string lastName, string passwd, int level, IPEndPoint clientIP);
52 } 53 }
53 54
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index d30c149..127c4b2 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -208,7 +208,8 @@ namespace OpenSim.Services.LLLoginService
208 return response; 208 return response;
209 } 209 }
210 210
211 public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID, string clientVersion, IPEndPoint clientIP) 211 public LoginResponse Login(string firstName, string lastName, string passwd, string startLocation, UUID scopeID,
212 string clientVersion, string channel, string mac, string id0, IPEndPoint clientIP)
212 { 213 {
213 bool success = false; 214 bool success = false;
214 UUID session = UUID.Random(); 215 UUID session = UUID.Random();
@@ -340,7 +341,8 @@ namespace OpenSim.Services.LLLoginService
340 // 341 //
341 string reason = string.Empty; 342 string reason = string.Empty;
342 GridRegion dest; 343 GridRegion dest;
343 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, clientIP, out where, out reason, out dest); 344 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
345 clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest);
344 destination = dest; 346 destination = dest;
345 if (aCircuit == null) 347 if (aCircuit == null)
346 { 348 {
@@ -600,7 +602,8 @@ namespace OpenSim.Services.LLLoginService
600 } 602 }
601 603
602 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar, 604 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar,
603 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, IPEndPoint clientIP, out string where, out string reason, out GridRegion dest) 605 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
606 IPEndPoint clientIP, out string where, out string reason, out GridRegion dest)
604 { 607 {
605 where = currentWhere; 608 where = currentWhere;
606 ISimulationService simConnector = null; 609 ISimulationService simConnector = null;
@@ -640,7 +643,7 @@ namespace OpenSim.Services.LLLoginService
640 if (m_UserAgentService == null && simConnector != null) 643 if (m_UserAgentService == null && simConnector != null)
641 { 644 {
642 circuitCode = (uint)Util.RandomClass.Next(); ; 645 circuitCode = (uint)Util.RandomClass.Next(); ;
643 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer); 646 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
644 success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); 647 success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason);
645 if (!success && m_GridService != null) 648 if (!success && m_GridService != null)
646 { 649 {
@@ -665,7 +668,7 @@ namespace OpenSim.Services.LLLoginService
665 if (m_UserAgentService != null) 668 if (m_UserAgentService != null)
666 { 669 {
667 circuitCode = (uint)Util.RandomClass.Next(); ; 670 circuitCode = (uint)Util.RandomClass.Next(); ;
668 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer); 671 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
669 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason); 672 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
670 if (!success && m_GridService != null) 673 if (!success && m_GridService != null)
671 { 674 {
@@ -694,7 +697,8 @@ namespace OpenSim.Services.LLLoginService
694 } 697 }
695 698
696 private AgentCircuitData MakeAgent(GridRegion region, UserAccount account, 699 private AgentCircuitData MakeAgent(GridRegion region, UserAccount account,
697 AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position, string viewer) 700 AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position,
701 string ipaddress, string viewer, string channel, string mac, string id0)
698 { 702 {
699 AgentCircuitData aCircuit = new AgentCircuitData(); 703 AgentCircuitData aCircuit = new AgentCircuitData();
700 704
@@ -715,7 +719,11 @@ namespace OpenSim.Services.LLLoginService
715 aCircuit.SecureSessionID = secureSession; 719 aCircuit.SecureSessionID = secureSession;
716 aCircuit.SessionID = session; 720 aCircuit.SessionID = session;
717 aCircuit.startpos = position; 721 aCircuit.startpos = position;
722 aCircuit.IPAddress = ipaddress;
718 aCircuit.Viewer = viewer; 723 aCircuit.Viewer = viewer;
724 aCircuit.Channel = channel;
725 aCircuit.Mac = mac;
726 aCircuit.Id0 = id0;
719 SetServiceURLs(aCircuit, account); 727 SetServiceURLs(aCircuit, account);
720 728
721 return aCircuit; 729 return aCircuit;