[LON-CAPA-cvs] cvs: loncom / lonc

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 31 Jul 2003 21:32:44 -0000


albertel		Thu Jul 31 17:32:44 2003 EDT

  Modified files:              
    /loncom	lonc 
  Log:
  - convert the rest of the initialization steps to use londtransaction so that it will error out on timeouts
  
  
Index: loncom/lonc
diff -u loncom/lonc:1.52 loncom/lonc:1.53
--- loncom/lonc:1.52	Thu Jul 24 21:16:29 2003
+++ loncom/lonc	Thu Jul 31 17:32:44 2003
@@ -5,7 +5,7 @@
 # provides persistent TCP connections to the other servers in the network
 # through multiplexed domain sockets
 #
-# $Id: lonc,v 1.52 2003/07/25 01:16:29 bowersj2 Exp $
+# $Id: lonc,v 1.53 2003/07/31 21:32:44 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -759,8 +759,7 @@
 
     sleep 5;
     &status("Ponging $conserver");
-    print $remotesock "pong\n";
-    $answer=<$remotesock>;
+    $answer= londtransaction($remotesock,"pong",60);
     chomp($answer);
     if ($answer!~/^$conserver/) {
 	&logthis("Pong reply: >$answer<");
@@ -768,8 +767,7 @@
 # ----------------------------------------------------------- Initialize cipher
 
     &status("Initialize cipher");
-    print $remotesock "ekey\n";
-    my $buildkey=<$remotesock>;
+    my $buildkey=londtransaction($remotesock,"ekey",60);
     my $key=$conserver.$perlvar{'lonHostID'};
     $key=~tr/a-z/A-Z/;
     $key=~tr/G-P/0-9/;