aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
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/LLLoginService/LLLoginService.cs
parentReplaced OpenMetaverse dlls with ones compiled in Windows. (diff)
downloadopensim-SC-0772e19af25b8524fa2527a4d5f3bac496d07811.zip
opensim-SC-0772e19af25b8524fa2527a4d5f3bac496d07811.tar.gz
opensim-SC-0772e19af25b8524fa2527a4d5f3bac496d07811.tar.bz2
opensim-SC-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/LLLoginService/LLLoginService.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs20
1 files changed, 14 insertions, 6 deletions
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;