aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorMelanie2010-10-04 04:49:54 +0100
committerMelanie2010-10-04 04:49:54 +0100
commitda6816c805b8e68d5858ce9e241ea71941312c8c (patch)
treed78a4f04cf6bc0f7245ad5048a0434fa585dd761 /OpenSim/Services
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-da6816c805b8e68d5858ce9e241ea71941312c8c.zip
opensim-SC-da6816c805b8e68d5858ce9e241ea71941312c8c.tar.gz
opensim-SC-da6816c805b8e68d5858ce9e241ea71941312c8c.tar.bz2
opensim-SC-da6816c805b8e68d5858ce9e241ea71941312c8c.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs8
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs6
-rw-r--r--OpenSim/Services/Interfaces/ILoginService.cs3
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs20
4 files changed, 27 insertions, 10 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/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 8acd618..eb6433c 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -148,7 +148,6 @@ namespace OpenSim.Services.HypergridService
148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); 148 agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + 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 = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort; 153 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort;
@@ -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 1e4b6c2..6c66414 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();
@@ -346,7 +347,8 @@ namespace OpenSim.Services.LLLoginService
346 // 347 //
347 string reason = string.Empty; 348 string reason = string.Empty;
348 GridRegion dest; 349 GridRegion dest;
349 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where, clientVersion, clientIP, out where, out reason, out dest); 350 AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
351 clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest);
350 destination = dest; 352 destination = dest;
351 if (aCircuit == null) 353 if (aCircuit == null)
352 { 354 {
@@ -606,7 +608,8 @@ namespace OpenSim.Services.LLLoginService
606 } 608 }
607 609
608 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar, 610 protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarData avatar,
609 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, IPEndPoint clientIP, out string where, out string reason, out GridRegion dest) 611 UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
612 IPEndPoint clientIP, out string where, out string reason, out GridRegion dest)
610 { 613 {
611 where = currentWhere; 614 where = currentWhere;
612 ISimulationService simConnector = null; 615 ISimulationService simConnector = null;
@@ -646,7 +649,7 @@ namespace OpenSim.Services.LLLoginService
646 if (m_UserAgentService == null && simConnector != null) 649 if (m_UserAgentService == null && simConnector != null)
647 { 650 {
648 circuitCode = (uint)Util.RandomClass.Next(); ; 651 circuitCode = (uint)Util.RandomClass.Next(); ;
649 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer); 652 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
650 success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason); 653 success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason);
651 if (!success && m_GridService != null) 654 if (!success && m_GridService != null)
652 { 655 {
@@ -671,7 +674,7 @@ namespace OpenSim.Services.LLLoginService
671 if (m_UserAgentService != null) 674 if (m_UserAgentService != null)
672 { 675 {
673 circuitCode = (uint)Util.RandomClass.Next(); ; 676 circuitCode = (uint)Util.RandomClass.Next(); ;
674 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, viewer); 677 aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
675 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason); 678 success = LaunchAgentIndirectly(gatekeeper, destination, aCircuit, clientIP, out reason);
676 if (!success && m_GridService != null) 679 if (!success && m_GridService != null)
677 { 680 {
@@ -700,7 +703,8 @@ namespace OpenSim.Services.LLLoginService
700 } 703 }
701 704
702 private AgentCircuitData MakeAgent(GridRegion region, UserAccount account, 705 private AgentCircuitData MakeAgent(GridRegion region, UserAccount account,
703 AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position, string viewer) 706 AvatarData avatar, UUID session, UUID secureSession, uint circuit, Vector3 position,
707 string ipaddress, string viewer, string channel, string mac, string id0)
704 { 708 {
705 AgentCircuitData aCircuit = new AgentCircuitData(); 709 AgentCircuitData aCircuit = new AgentCircuitData();
706 710
@@ -721,7 +725,11 @@ namespace OpenSim.Services.LLLoginService
721 aCircuit.SecureSessionID = secureSession; 725 aCircuit.SecureSessionID = secureSession;
722 aCircuit.SessionID = session; 726 aCircuit.SessionID = session;
723 aCircuit.startpos = position; 727 aCircuit.startpos = position;
728 aCircuit.IPAddress = ipaddress;
724 aCircuit.Viewer = viewer; 729 aCircuit.Viewer = viewer;
730 aCircuit.Channel = channel;
731 aCircuit.Mac = mac;
732 aCircuit.Id0 = id0;
725 SetServiceURLs(aCircuit, account); 733 SetServiceURLs(aCircuit, account);
726 734
727 return aCircuit; 735 return aCircuit;