Exemplo n.º 1
0
        internal void StartSendingForDns( string IP )
        {
            if( MForm.GetIsClosing())
              return;

            if( IsDisposed )
              return;

            ulong LastUpdate = MForm.NetStats.GetLastHostNameUpdate( IP );
            if( LastUpdate != 0 )
              {
              ECTime LastUpdateTime = new ECTime( LastUpdate );
              if( LastUpdateTime.GetDaysToNow() < 7 )
            return;

              }
            // MForm.ServerLog.AddToLog( "Description Data", "Getting description data." );

            ECTime RightNow = new ECTime();
            RightNow.SetToNow();
            MForm.NetStats.UpdateHostNameCheckTime( IP );

            // ShowStatus( " " );
            // ShowStatus( "Dns for: " + IP + " " + ForWhat + " " + RightNow.ToLocalTimeString() );
            // ShowStatus( "Dns for: " + ForWhat + " " + RightNow.ToLocalTimeString() );

            DnsWorkerInfo WInfo = new DnsWorkerInfo();

            WInfo.IP = IP;

            try
            {
            if( !DNSBackgroundWorker.IsBusy )
              {
              DNSBackgroundWorker.RunWorkerAsync( WInfo );
              }
            else
              {
              // ShowStatus( "Dns background process is busy." );
              }

            }
            catch( Exception Except )
              {
              ShowStatus( "Error starting background process for Dns." );
              ShowStatus( Except.Message );
              return;
              }
        }