Diff for /loncom/loncron between versions 1.104 and 1.106

version 1.104, 2017/02/28 05:42:06 version 1.106, 2018/07/18 13:44:55
Line 646  sub check_delayed_msg { Line 646  sub check_delayed_msg {
   
     my $unsend=0;      my $unsend=0;
   
       my %hostname = &Apache::lonnet::all_hostnames();
       my $numhosts = scalar(keys(%hostname));
   
     my $dfh=IO::File->new("$perlvar{'lonDaemons'}/logs/lonnet.perm.log");      my $dfh=IO::File->new("$perlvar{'lonDaemons'}/logs/lonnet.perm.log");
     while (my $line=<$dfh>) {      while (my $line=<$dfh>) {
  my ($time,$sdf,$dserv,$dcmd)=split(/:/,$line);   my ($time,$sdf,$dserv,$dcmd)=split(/:/,$line);
           if ($numhosts) {
               next unless ($hostname{$dserv});
           }
  if ($sdf eq 'F') {    if ($sdf eq 'F') { 
     my $local=localtime($time);      my $local=localtime($time);
     &log($fh,"<b>Failed: $time, $dserv, $dcmd</b><br />");      &log($fh,"<b>Failed: $time, $dserv, $dcmd</b><br />");
Line 675  sub check_delayed_msg { Line 681  sub check_delayed_msg {
     }      }
     &log($fh,"</pre>\n");      &log($fh,"</pre>\n");
     close (DFH);      close (DFH);
     my %hostname = &Apache::lonnet::all_hostnames();  
     my $numhosts = scalar(keys(%hostname));  
 # pong to all servers that have delayed messages  # pong to all servers that have delayed messages
 # this will trigger a reverse connection, which should flush the buffers  # this will trigger a reverse connection, which should flush the buffers
     foreach my $tryserver (sort(keys(%servers))) {      foreach my $tryserver (sort(keys(%servers))) {
Line 938  sub write_hosttypes { Line 942  sub write_hosttypes {
     }      }
 }  }
   
   sub update_revocation_list {
       if (&Apache::lonnet::fetch_crl_pemfile() eq 'ok') {
           print "Certificate Revocation List (from CA) updated.\n";
       } else {
           print "Certificate Revocation List from (CA) not updated.\n";
       }
   }
   
 sub send_mail {  sub send_mail {
     my $defdom = $perlvar{'lonDefDomain'};      my $defdom = $perlvar{'lonDefDomain'};
     my $origmail = $perlvar{'lonAdmEMail'};      my $origmail = $perlvar{'lonAdmEMail'};
Line 1130  sub main () { Line 1142  sub main () {
  &write_checksums();   &write_checksums();
         &write_connection_config();          &write_connection_config();
         &write_hosttypes();          &write_hosttypes();
           &update_revocation_list();
  if ($totalcount>200 && !$noemail) { &send_mail(); }   if ($totalcount>200 && !$noemail) { &send_mail(); }
     }      }
 }  }

Removed from v.1.104  
changed lines
  Added in v.1.106


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>