diff src/noffle.c @ 188:f1bacee93ca6 noffle

[svn] * src/client.c,src/client.h,src/fetch.c,src/noffle.c,src/server.c: robustness - instead of retruning simple Passed/Failed statuses from connection functions, return an integer status instead. This allows Noffle to distinguish between a connection failure, an unrecoverable protocol error and a recoverable problem. As a concrete instance, Noffle will no longer abort the connection if a group is removed from the upstream server. Also beef up error detection a bit. * src/content.c: instead of overwriting the existing content file(s) when updating - which leaves a window where Noffle is vulnerable to failure which will leave the content file corrupted (yes, it happened to me), write a new content file and rename it over the old file only when it has been written and closed with no errors reported.
author bears
date Wed, 12 Sep 2001 21:33:44 +0100
parents fed1334d766b
children 28488e0e3630
line wrap: on
line diff
--- a/src/noffle.c	Sat Sep 01 16:57:45 2001 +0100
+++ b/src/noffle.c	Wed Sep 12 21:33:44 2001 +0100
@@ -10,7 +10,7 @@
   received for some seconds (to allow multiple clients connect at the same
   time).
 
-  $Id: noffle.c 300 2001-08-05 08:24:22Z bears $
+  $Id: noffle.c 307 2001-09-12 20:33:44Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -217,11 +217,11 @@
     while ( Cfg_nextServ( serv ) )
         if ( Fetch_init( serv ) )
         {
-	    Bool connOK = TRUE;
+	    int stat = STAT_OK;
 	    
             if ( noffle.queryGrps )
-                connOK = Client_getGrps();
-            if ( connOK && noffle.queryDsc )
+                stat = Client_getGrps();
+            if ( stat == STAT_OK && noffle.queryDsc )
                 Client_getDsc();
             Fetch_close();
         }