AgentIsComingHome() public method

public AgentIsComingHome ( UUID sessionID, string thisGridExternalName ) : bool
sessionID UUID
thisGridExternalName string
return bool
        public GridRegion GetHomeRegion(AgentCircuitData circuit, out Vector3 position, out Vector3 lookAt)
        {
            if (circuit.ServiceURLs.ContainsKey("HomeURI"))
            {
                IUserAgentService userAgentService = new UserAgentServiceConnector(circuit.ServiceURLs["HomeURI"].ToString());
                GridRegion        region           = userAgentService.GetHomeRegion(circuit, out position, out lookAt);
                if (region != null)
                {
                    Uri uri = null;
                    if (!circuit.ServiceURLs.ContainsKey("HomeURI") ||
                        (circuit.ServiceURLs.ContainsKey("HomeURI") && !Uri.TryCreate(circuit.ServiceURLs["HomeURI"].ToString(), UriKind.Absolute, out uri)))
                    {
                        return(null);
                    }

                    region.ExternalHostName = uri.Host;
                    region.HttpPort         = (uint)uri.Port;
                    region.ServerURI        = region.ServerURI;
                    region.RegionName       = string.Empty;
                    region.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), (int)0);
                    bool isComingHome = userAgentService.AgentIsComingHome(circuit.SessionID, m_GridName);
                    return(region);
                }
            }
            return(GetHomeRegion(circuit.AgentID, out position, out lookAt));
        }
        public GridRegion GetHomeRegion(AgentCircuitData circuit, out Vector3 position, out Vector3 lookAt)
        {
            if (circuit.ServiceURLs.ContainsKey ("HomeURI"))
            {
                IUserAgentService userAgentService = new UserAgentServiceConnector (circuit.ServiceURLs["HomeURI"].ToString ());
                GridRegion region = userAgentService.GetHomeRegion (circuit, out position, out lookAt);
                if (region != null)
                {
                    Uri uri = null;
                    if (!circuit.ServiceURLs.ContainsKey ("HomeURI") ||
                        (circuit.ServiceURLs.ContainsKey ("HomeURI") && !Uri.TryCreate (circuit.ServiceURLs["HomeURI"].ToString (), UriKind.Absolute, out uri)))
                        return null;

                    region.ExternalHostName = uri.Host;
                    region.HttpPort = (uint)uri.Port;
                    region.ServerURI = region.ServerURI;
                    region.RegionName = string.Empty;
                    region.InternalEndPoint = new System.Net.IPEndPoint (System.Net.IPAddress.Parse ("0.0.0.0"), (int)0);
                    bool isComingHome = userAgentService.AgentIsComingHome (circuit.SessionID, m_GridName);
                    return region;
                }
            }
            return GetHomeRegion (circuit.AgentID, out position, out lookAt);
        }