[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Mon Oct 26 12:03:42 EDT 2015


raeburn		Mon Oct 26 16:03:42 2015 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Change arg passed to &reconlonc() by &critical(). 
    - Prior to rev. 1.836, &reconlonc() expected the peerfile as an argument,
      however, starting with rev. 1.891, &reconlonc() expects the lonHostID 
      of the server needing a connection as the argument (if available).
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1294 loncom/lonnet/perl/lonnet.pm:1.1295
--- loncom/lonnet/perl/lonnet.pm:1.1294	Fri Oct 23 16:01:41 2015
+++ loncom/lonnet/perl/lonnet.pm	Mon Oct 26 16:03:42 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1294 2015/10/23 16:01:41 raeburn Exp $
+# $Id: lonnet.pm,v 1.1295 2015/10/26 16:03:42 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -422,8 +422,8 @@
 
 sub reconlonc {
     my ($lonid) = @_;
-    my $hostname = &hostname($lonid);
     if ($lonid) {
+        my $hostname = &hostname($lonid);
 	my $peerfile="$perlvar{'lonSockDir'}/$hostname";
 	if ($hostname && -e $peerfile) {
 	    &logthis("Trying to reconnect lonc for $lonid ($hostname)");
@@ -448,7 +448,7 @@
 	    &logthis("lonc at pid $loncpid responding, sending USR1");
             kill USR1 => $loncpid;
             sleep 1;
-         } else {
+        } else {
 	    &logthis(
                "<font color=\"blue\">WARNING:".
                " lonc at pid $loncpid not responding, giving up</font>");
@@ -469,7 +469,7 @@
     }
     my $answer=reply($cmd,$server);
     if ($answer eq 'con_lost') {
-	&reconlonc("$perlvar{'lonSockDir'}/$server");
+	&reconlonc($server);
 	my $answer=reply($cmd,$server);
         if ($answer eq 'con_lost') {
             my $now=time;




More information about the LON-CAPA-cvs mailing list