Diff for /loncom/lond between versions 1.145 and 1.146

version 1.145, 2003/09/16 10:13:20 version 1.146, 2003/09/16 10:28:14
Line 60 Line 60
 # 09/08/2003 Ron Fox:  Told lond to take care of change logging so we  # 09/08/2003 Ron Fox:  Told lond to take care of change logging so we
 #      don't have to remember it:  #      don't have to remember it:
 # $Log$  # $Log$
   # Revision 1.146  2003/09/16 10:28:14  foxr
   # ReinitProcess - decode the process selector and produce the associated pid
   # filename.  Note: While it is possible to test that valid process selectors are
   # handled properly I am not able to test that invalid process selectors produce
   # the appropriate error as lonManage also blocks the use of invalid process selectors.
   #
 # Revision 1.145  2003/09/16 10:13:20  foxr  # Revision 1.145  2003/09/16 10:13:20  foxr
 # Added ReinitProcess function to oversee the parsing and processing of the  # Added ReinitProcess function to oversee the parsing and processing of the
 # reinit:<process> client request.  # reinit:<process> client request.
Line 376  sub PushFile { Line 382  sub PushFile {
 sub ReinitProcess {  sub ReinitProcess {
     my $request = shift;      my $request = shift;
   
   
       # separate the request (reinit) from the process identifier and
       # validate it producing the name of the .pid file for the process.
       #
       #
       my ($junk, $process) = split(":", $request);
       my $processpidfile = $perlvar{'lonDaemons'}.'/';
       if($process eq 'lonc') {
    $processpidfile = $processpidfile."lonc.pid";
       } elsif ($process eq 'lond') {
    $processpidfile = $processpidfile."lond.pid";
       } else {
    &logthis('<font color="yellow" Invalid reinit request for '.$process
    ."</font>");
    return "error:Invalid process identifier $process";
       }
       &logthis('<font color="red"> Reinitializing '.$process." </font>");
     return 'ok';      return 'ok';
 }  }
   
Line 978  sub make_new_child { Line 1001  sub make_new_child {
        if ($wasenc == 1) {         if ($wasenc == 1) {
    my $cert = GetCertificate($userinput);     my $cert = GetCertificate($userinput);
    if(ValidManager($cert)) {     if(ValidManager($cert)) {
          chomp($userinput);
        my $reply = ReinitProcess($userinput);         my $reply = ReinitProcess($userinput);
        print $client  "$reply\n";         print $client  "$reply\n";
    } else {     } else {

Removed from v.1.145  
changed lines
  Added in v.1.146


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