comparison 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
comparison
equal deleted inserted replaced
187:166008a80f03 188:f1bacee93ca6
8 not as server. If noffle runs as server, locking is performed while 8 not as server. If noffle runs as server, locking is performed while
9 executing NNTP commands, but temporarily released if no new command is 9 executing NNTP commands, but temporarily released if no new command is
10 received for some seconds (to allow multiple clients connect at the same 10 received for some seconds (to allow multiple clients connect at the same
11 time). 11 time).
12 12
13 $Id: noffle.c 300 2001-08-05 08:24:22Z bears $ 13 $Id: noffle.c 307 2001-09-12 20:33:44Z bears $
14 */ 14 */
15 15
16 #if HAVE_CONFIG_H 16 #if HAVE_CONFIG_H
17 #include <config.h> 17 #include <config.h>
18 #endif 18 #endif
215 215
216 Cfg_beginServEnum(); 216 Cfg_beginServEnum();
217 while ( Cfg_nextServ( serv ) ) 217 while ( Cfg_nextServ( serv ) )
218 if ( Fetch_init( serv ) ) 218 if ( Fetch_init( serv ) )
219 { 219 {
220 Bool connOK = TRUE; 220 int stat = STAT_OK;
221 221
222 if ( noffle.queryGrps ) 222 if ( noffle.queryGrps )
223 connOK = Client_getGrps(); 223 stat = Client_getGrps();
224 if ( connOK && noffle.queryDsc ) 224 if ( stat == STAT_OK && noffle.queryDsc )
225 Client_getDsc(); 225 Client_getDsc();
226 Fetch_close(); 226 Fetch_close();
227 } 227 }
228 } 228 }
229 229