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

raeburn raeburn@source.lon-capa.org
Sun, 12 Jun 2011 13:48:29 -0000


raeburn		Sun Jun 12 13:48:29 2011 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Correction to change in lonnet.pm rev 1.784.
    When:
        if ($loadans !~ /\d/ && $userloadans !~ /\d/) {
            next; #didn't get a number from the server
        }
    was moved from loop over the keys of %spareid to a subroutine call
    for a single server ($tryserver) the "next" needed to have changed to
  
        return ($spare_server, $lowest_load);
  
    to preserve information about existing server with lowest load. 
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1113 loncom/lonnet/perl/lonnet.pm:1.1114
--- loncom/lonnet/perl/lonnet.pm:1.1113	Sat Jun 11 17:43:30 2011
+++ loncom/lonnet/perl/lonnet.pm	Sun Jun 12 13:48:28 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1113 2011/06/11 17:43:30 raeburn Exp $
+# $Id: lonnet.pm,v 1.1114 2011/06/12 13:48:28 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -816,7 +816,7 @@
     my $userloadans = &reply('userload',$try_server);
 
     if ($loadans !~ /\d/ && $userloadans !~ /\d/) {
-	return; #didn't get a number from the server
+	return ($spare_server, $lowest_load); #didn't get a number from the server
     }
 
     my $load;