diff src/server.c @ 144:8b9366fc1361 noffle

[svn] Added timeout to Prt_getLn to avoid Noffle hanging if the connection breaks down during a fetch.
author enz
date Sat, 23 Sep 2000 11:40:35 +0100
parents 3c71e28c8eef
children bfeea2bc09b6
line wrap: on
line diff
--- a/src/server.c	Sat Sep 23 11:37:01 2000 +0100
+++ b/src/server.c	Sat Sep 23 11:40:35 2000 +0100
@@ -1,7 +1,7 @@
 /*
   server.c
 
-  $Id: server.c 183 2000-07-25 12:14:54Z bears $
+  $Id: server.c 217 2000-09-23 10:40:35Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -246,7 +246,7 @@
     /* Special case - no timeout. */
     if ( timeoutSeconds == 0 )
     {
-	r = Prt_getLn( line, stdin );
+	r = Prt_getLn( line, stdin, -1 );
 	return ( r ) ? 1 : -1;
     }
 
@@ -259,7 +259,7 @@
     }
     if ( alarm( ( unsigned int ) timeoutSeconds ) != 0 )
         Log_err( "server.c:waitCmdLn: Alarm was already set." );
-    r = Prt_getLn( line, stdin );
+    r = Prt_getLn( line, stdin, -1 );
     alarm( 0 );
     installSignalHandler( SIGALRM, oldHandler );
     if ( server.readAlarmFlag )
@@ -272,7 +272,7 @@
 static Bool
 getTxtLn( Str line, Bool *err )
 {
-    return Prt_getTxtLn( line, err, stdin );
+    return Prt_getTxtLn( line, err, stdin, -1 );
 }
 
 static Bool