コード例 #1
0
        public int IsLocalHome(string otherhome, bool withResolveCheck)
        {
            OSHHTPHost tmp = new OSHHTPHost(otherhome, false);

            if (!tmp.IsValidHost)
            {
                return(-1);
            }
            if (tmp.Equals(m_homeURL))
            {
                return(1);
            }
            if (m_homeURLAlias != null && m_homeURLAlias.Contains(tmp))
            {
                return(1);
            }

            if (withResolveCheck)
            {
                if (tmp.IsResolvedHost)
                {
                    return(0);
                }
                return(tmp.ResolveDNS() ? 0 : -2);
            }
            return(0);
        }
コード例 #2
0
ファイル: GridInfo.cs プロジェクト: Teslos-Dev/Teslos-Sim
        public int IsLocalGrid(string othergatekeeper, bool withResolveCheck)
        {
            OSHHTPHost tmp = new OSHHTPHost(othergatekeeper, false);

            if (!tmp.IsValidHost)
            {
                return(((tmp.Flags & OSHTTPURIFlags.Empty) == 0) ? -1 : 1);
            }
            if (tmp.Equals(m_gateKeeperURL))
            {
                return(1);
            }
            if (m_gateKeeperAlias != null && m_gateKeeperAlias.Contains(tmp))
            {
                return(1);
            }
            if (withResolveCheck)
            {
                if (tmp.IsResolvedHost)
                {
                    return(0);
                }
                return(tmp.ResolveDNS() ? 0 : -2);
            }
            return(0);
        }
コード例 #3
0
 public int IsLocalGrid(OSHHTPHost othergatekeeper)
 {
     if (!othergatekeeper.IsValidHost)
     {
         return(-1);
     }
     if (othergatekeeper.Equals(m_gateKeeperURL))
     {
         return(1);
     }
     if (m_gateKeeperAlias != null && m_gateKeeperAlias.Contains(othergatekeeper))
     {
         return(1);
     }
     return(0);
 }
コード例 #4
0
ファイル: GridInfo.cs プロジェクト: Teslos-Dev/Teslos-Sim
        public int IsLocalGrid(OSHHTPHost othergatekeeper)
        {
            if (!othergatekeeper.IsValidHost)
            {
                return(((othergatekeeper.Flags & OSHTTPURIFlags.Empty) == 0) ? -1 : 1);
            }

            if (othergatekeeper.Equals(m_gateKeeperURL))
            {
                return(1);
            }
            if (m_gateKeeperAlias != null && m_gateKeeperAlias.Contains(othergatekeeper))
            {
                return(1);
            }
            return(0);
        }
コード例 #5
0
ファイル: GridInfo.cs プロジェクト: Teslos-Dev/Teslos-Sim
        public int IsLocalHome(string otherhome)
        {
            OSHHTPHost tmp = new OSHHTPHost(otherhome, false);

            if (!tmp.IsValidHost)
            {
                return(((tmp.Flags & OSHTTPURIFlags.Empty) == 0) ? -1 : 1);
            }
            if (tmp.Equals(m_homeURL))
            {
                return(1);
            }
            if (m_homeURLAlias != null && m_homeURLAlias.Contains(tmp))
            {
                return(1);
            }
            return(0);
        }
コード例 #6
0
        public int IsLocalHome(string otherhome)
        {
            OSHHTPHost tmp = new OSHHTPHost(otherhome, false);

            if (!tmp.IsValidHost)
            {
                return(-1);
            }
            if (tmp.Equals(m_homeURL))
            {
                return(1);
            }
            if (m_homeURLAlias != null && m_homeURLAlias.Contains(tmp))
            {
                return(1);
            }
            return(0);
        }
コード例 #7
0
        // -2 dns failed
        // -1 if bad url
        // 0 if not local
        // 1 if local
        public int IsLocalGrid(string othergatekeeper)
        {
            OSHHTPHost tmp = new OSHHTPHost(othergatekeeper, false);

            if (!tmp.IsValidHost)
            {
                return(-1);
            }
            if (tmp.Equals(m_gateKeeperURL))
            {
                return(1);
            }
            if (m_gateKeeperAlias != null && m_gateKeeperAlias.Contains(tmp))
            {
                return(1);
            }
            return(0);
        }
コード例 #8
0
ファイル: GridInfo.cs プロジェクト: BogusCurry/opensim-1
        public int IsLocalHome(string otherhome)
        {
            OSHHTPHost tmp = new OSHHTPHost(otherhome, false);

            if (tmp.HostType == UriHostNameType.Unknown)
            {
                return(-1);
            }
            if (tmp.Equals(m_homeURL))
            {
                return(1);
            }
            if (m_homeURLAlias != null && m_homeURLAlias.Contains(tmp))
            {
                return(1);
            }
            return(0);
        }
コード例 #9
0
ファイル: GridInfo.cs プロジェクト: BogusCurry/opensim-1
        // -2 dns failed
        // -1 if bad url
        // 0 if not local
        // 1 if local
        public int IsLocalGrid(string othergatekeeper, bool withResolveCheck = false)
        {
            OSHHTPHost tmp = new OSHHTPHost(othergatekeeper, false);

            if (tmp.HostType == UriHostNameType.Unknown)
            {
                return(-1);
            }
            if (tmp.Equals(m_gateKeeperURL))
            {
                return(1);
            }
            if (m_gateKeeperAlias != null && m_gateKeeperAlias.Contains(tmp))
            {
                return(1);
            }
            if (withResolveCheck)
            {
                return(tmp.ResolveDNS() ? 0 : -2);
            }
            return(0);
        }