aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorDiva Canto2010-10-03 20:01:59 -0700
committerDiva Canto2010-10-03 20:01:59 -0700
commit0772e19af25b8524fa2527a4d5f3bac496d07811 (patch)
tree1106f2145d5218e0c4ebf453b213e2d70c822a72 /OpenSim/Services
parentReplaced OpenMetaverse dlls with ones compiled in Windows. (diff)
downloadopensim-SC_OLD-0772e19af25b8524fa2527a4d5f3bac496d07811.zip
opensim-SC_OLD-0772e19af25b8524fa2527a4d5f3bac496d07811.tar.gz
opensim-SC_OLD-0772e19af25b8524fa2527a4d5f3bac496d07811.tar.bz2
opensim-SC_OLD-0772e19af25b8524fa2527a4d5f3bac496d07811.tar.xz
Added viewer's channel, mac, and id0 to agent circuit data. Also moved client ip address to agent circuit data, so that it's always there.
Diffstat (limited to 'OpenSim/Services')
-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 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;