diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 61f8516..8abd046 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -116,7 +116,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
116 | // The Login service calls this interface with fromLogin=true | 116 | // The Login service calls this interface with fromLogin=true |
117 | // Sims call it with fromLogin=false | 117 | // Sims call it with fromLogin=false |
118 | // Either way, this is verified by the handler | 118 | // Either way, this is verified by the handler |
119 | public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason) | 119 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason) |
120 | { | 120 | { |
121 | reason = String.Empty; | 121 | reason = String.Empty; |
122 | 122 | ||
@@ -138,56 +138,25 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
138 | Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI); | 138 | Console.WriteLine(" >>> LoginAgentToGrid <<< " + home.ServerURI); |
139 | 139 | ||
140 | uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome; | 140 | uint flags = fromLogin ? (uint)TeleportFlags.ViaLogin : (uint)TeleportFlags.ViaHome; |
141 | return CreateAgent(home, aCircuit, flags, out reason); | 141 | return CreateAgent(source, home, aCircuit, flags, out reason); |
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
145 | // The simulators call this interface | 145 | // The simulators call this interface |
146 | public bool LoginAgentToGrid(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason) | 146 | public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, out string reason) |
147 | { | 147 | { |
148 | return LoginAgentToGrid(aCircuit, gatekeeper, destination, false, out reason); | 148 | return LoginAgentToGrid(source, aCircuit, gatekeeper, destination, false, out reason); |
149 | } | 149 | } |
150 | 150 | ||
151 | protected override void PackData(OSDMap args, AgentCircuitData aCircuit, GridRegion destination, uint flags) | 151 | protected override void PackData(OSDMap args, GridRegion source, AgentCircuitData aCircuit, GridRegion destination, uint flags) |
152 | { | 152 | { |
153 | base.PackData(args, aCircuit, destination, flags); | 153 | base.PackData(args, source, aCircuit, destination, flags); |
154 | args["gatekeeper_serveruri"] = OSD.FromString(m_Gatekeeper.ServerURI); | 154 | args["gatekeeper_serveruri"] = OSD.FromString(m_Gatekeeper.ServerURI); |
155 | args["gatekeeper_host"] = OSD.FromString(m_Gatekeeper.ExternalHostName); | 155 | args["gatekeeper_host"] = OSD.FromString(m_Gatekeeper.ExternalHostName); |
156 | args["gatekeeper_port"] = OSD.FromString(m_Gatekeeper.HttpPort.ToString()); | 156 | args["gatekeeper_port"] = OSD.FromString(m_Gatekeeper.HttpPort.ToString()); |
157 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); | 157 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); |
158 | } | 158 | } |
159 | 159 | ||
160 | protected OSDMap PackCreateAgentArguments(AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, IPEndPoint ipaddress) | ||
161 | { | ||
162 | OSDMap args = null; | ||
163 | try | ||
164 | { | ||
165 | args = aCircuit.PackAgentCircuitData(); | ||
166 | } | ||
167 | catch (Exception e) | ||
168 | { | ||
169 | m_log.Debug("[USER AGENT CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); | ||
170 | } | ||
171 | |||
172 | // Add the input arguments | ||
173 | args["gatekeeper_serveruri"] = OSD.FromString(gatekeeper.ServerURI); | ||
174 | args["gatekeeper_host"] = OSD.FromString(gatekeeper.ExternalHostName); | ||
175 | args["gatekeeper_port"] = OSD.FromString(gatekeeper.HttpPort.ToString()); | ||
176 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | ||
177 | args["destination_y"] = OSD.FromString(destination.RegionLocY.ToString()); | ||
178 | args["destination_name"] = OSD.FromString(destination.RegionName); | ||
179 | args["destination_uuid"] = OSD.FromString(destination.RegionID.ToString()); | ||
180 | args["destination_serveruri"] = OSD.FromString(destination.ServerURI); | ||
181 | |||
182 | // 10/3/2010 | ||
183 | // I added the client_ip up to the regular AgentCircuitData, so this doesn't need to be here. | ||
184 | // This need cleaning elsewhere... | ||
185 | //if (ipaddress != null) | ||
186 | // args["client_ip"] = OSD.FromString(ipaddress.Address.ToString()); | ||
187 | |||
188 | return args; | ||
189 | } | ||
190 | |||
191 | public void SetClientToken(UUID sessionID, string token) | 160 | public void SetClientToken(UUID sessionID, string token) |
192 | { | 161 | { |
193 | // no-op | 162 | // no-op |