Diff for /loncom/loncnew between versions 1.74 and 1.76

version 1.74, 2006/01/27 20:37:12 version 1.76, 2006/08/25 21:12:19
Line 198  sub Log { Line 198  sub Log {
     my $now   = time;      my $now   = time;
     my $local = localtime($now);      my $local = localtime($now);
     my $finalformat = "$local ($$) [$RemoteHost] [$Status] ";      my $finalformat = "$local ($$) [$RemoteHost] [$Status] ";
     my $finalformat = $finalformat.$format."\n";      $finalformat = $finalformat.$format."\n";
   
     # open the file and put the result.      # open the file and put the result.
   
Line 1164  sub QueueDelayed { Line 1164  sub QueueDelayed {
   
     Debug(4, "Delayed path: ".$path);      Debug(4, "Delayed path: ".$path);
     opendir(DIRHANDLE, $path);      opendir(DIRHANDLE, $path);
       
     my @alldelayed = grep /\.$RemoteHost$/, readdir DIRHANDLE;      my @all_host_ids;
       my $host_iterator =   &LondConnection::GetHostIterator();
       while (!$host_iterator->end()) {
    my ($host_id,$host_name) = @{$host_iterator->get()}[0,3];
    if ($host_name eq $RemoteHost) {
       push(@all_host_ids, $host_id);
    }
    $host_iterator->next();
       }
       my $host_id_re = '(?:'.join('|',@all_host_ids).')';
       my @alldelayed = grep(/\.$host_id_re$/, readdir(DIRHANDLE));
     closedir(DIRHANDLE);      closedir(DIRHANDLE);
     my $dfname;      foreach my $dfname (sort(@alldelayed)) {
     my $reqfile;   my $reqfile = "$path/$dfname";
     foreach $dfname (sort  @alldelayed) {   my ($host_id) = ($dfname =~ /\.([^.]*)$/);
  $reqfile = "$path/$dfname";   Debug(4, "queueing ".$reqfile." for $host_id");
  Debug(4, "queueing ".$reqfile);  
  my $Handle = IO::File->new($reqfile);   my $Handle = IO::File->new($reqfile);
  my $cmd    = <$Handle>;   my $cmd    = <$Handle>;
  chomp $cmd; # There may or may not be a newline...   chomp $cmd; # There may or may not be a newline...
  $cmd = $cmd."\n"; # now for sure there's exactly one newline.   $cmd = $cmd."\n"; # now for sure there's exactly one newline.
  my $Transaction = LondTransaction->new($cmd);   my $Transaction = LondTransaction->new("sethost:$host_id:$cmd");
  $Transaction->SetDeferred($reqfile);   $Transaction->SetDeferred($reqfile);
  QueueTransaction($Transaction);   QueueTransaction($Transaction);
     }      }
Line 1722  sub ChildProcess { Line 1731  sub ChildProcess {
       desc => 'Lonc Listener Unix Socket',        desc => 'Lonc Listener Unix Socket',
       fd   => $socket);        fd   => $socket);
           
     $Event::Debuglevel = $DebugLevel;      $Event::DebugLevel = $DebugLevel;
           
     Debug(9, "Making initial lond connection for ".$RemoteHost);      Debug(9, "Making initial lond connection for ".$RemoteHost);
   

Removed from v.1.74  
changed lines
  Added in v.1.76


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