Mercurial > noffle
comparison src/noffle.c @ 223:ffb1848a39db noffle
[svn] * src/util.c: Improve (correct) error detection when updating
timestamp file.
* src/content.h, src/content.c: Return Boolean success/fail from
Cont_write. Also ensure cont.first isn't polluted in the event
of a failed update.
* src/client.c,src/control.c,src/fetch.c,src/noffle.c,src/post.c,
src/pseudo.c: If Cont_write fails, don't do actions that need it to
have worked. Typically, don't update first and last article numbers
in group database.
* src/server.c: If groupinfo.lastupdate is unreadable or corrupt,
spot this and report it and give an explicit error when processing
NNTP NEWGROUPS command.
author | bears |
---|---|
date | Sun, 09 Dec 2001 12:31:57 +0000 |
parents | 411b6ab1acb7 |
children | 1ad2602f57db |
comparison
equal
deleted
inserted
replaced
222:bf290632d29e | 223:ffb1848a39db |
---|---|
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 337 2001-11-22 22:48:07Z bears $ | 13 $Id: noffle.c 342 2001-12-09 12:31:57Z 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 |
291 grp, autoUnsubscribeDays ); | 291 grp, autoUnsubscribeDays ); |
292 Pseudo_autoUnsubscribed( grp, autoUnsubscribeDays ); | 292 Pseudo_autoUnsubscribed( grp, autoUnsubscribeDays ); |
293 Fetchlist_remove( grp ); | 293 Fetchlist_remove( grp ); |
294 Grp_setRmtNext( grp, GRP_RMT_NEXT_NOT_SUBSCRIBED ); | 294 Grp_setRmtNext( grp, GRP_RMT_NEXT_NOT_SUBSCRIBED ); |
295 } | 295 } |
296 Cont_write(); | 296 if ( Cont_write() ) |
297 Grp_setFirstLast( grp, Cont_first(), Cont_last() ); | 297 Grp_setFirstLast( grp, Cont_first(), Cont_last() ); |
298 Log_inf( "%ld overviews deleted from group %s, %ld left (%ld-%ld)", | 298 Log_inf( "%ld overviews deleted from group %s, %ld left (%ld-%ld)", |
299 cntDel, grp, cntLeft, Grp_first( grp ), Grp_last( grp ) ); | 299 cntDel, grp, cntLeft, Grp_first( grp ), Grp_last( grp ) ); |
300 } | 300 } |
301 } | 301 } |
302 while ( Cont_nextGrp( grp ) ); | 302 while ( Cont_nextGrp( grp ) ); |
378 } | 378 } |
379 Cont_delete( i ); | 379 Cont_delete( i ); |
380 if ( toDelete ) | 380 if ( toDelete ) |
381 Db_delete( msgId ); | 381 Db_delete( msgId ); |
382 } | 382 } |
383 Cont_write(); | 383 if ( Cont_write() ) |
384 Grp_delete( name ); | 384 { |
385 printf( "Group '%s' deleted.\n", name ); | 385 Grp_delete( name ); |
386 printf( "Group '%s' deleted.\n", name ); | |
387 } | |
386 } | 388 } |
387 } | 389 } |
388 | 390 |
389 static void | 391 static void |
390 doList( void ) | 392 doList( void ) |