Mercurial > noffle
changeset 206:eb2589384836 noffle
[svn] * TODO: Update the TODO list.
* src/util.c: When updating timestamp files, write new stamp to temp file
and rename, so failure with e.g. full disc doesn't leave an empty stamp
file.
author | bears |
---|---|
date | Wed, 14 Nov 2001 10:56:42 +0000 |
parents | a47b47cc1e9d |
children | 79f845db4897 |
files | ChangeLog TODO src/util.c |
diffstat | 3 files changed, 38 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Nov 11 04:22:42 2001 +0000 +++ b/ChangeLog Wed Nov 14 10:56:42 2001 +0000 @@ -1,3 +1,7 @@ +Tue Nov 6 2001 Jim Hague <jim.hague@acm.org> + +* TODO: Update the TODO list. + Sun Nov 11 2001 Mirko Liß <mirko.liss@web.de> * src.util.c: Minor fix at Utl_parseNewsDate(); fixed SIGSEGV at
--- a/TODO Sun Nov 11 04:22:42 2001 +0000 +++ b/TODO Wed Nov 14 10:56:42 2001 +0000 @@ -5,9 +5,25 @@ Urgent ------ + * Tidy data structure initialisation when posting (post.c). + + * Post: better checks on posted article (check for duplicate headers, + address in From: headers). + + * Post: Only generate Reply-To: from From: if a configuration option set. + + * Deal properly with headers split over several lines where the overall + content of the header exceeds MAXCHAR characters (i.e. length of Str). + Later ----- + * Provide list of suggested configurations for popular upstream servers. + + * Review latest NNTP draft (http://www.ieft.org/ids.by.wg/nntpext.html). + Noted so far: Implement DATE and OVER. OVER is a synonym for XOVER, + which should continue to work for compatability reasons. + * Improve performance of group database. Using GDBM is a bad choice, better use a btree from the Berkeley db library in libc. This will be a good time for a redesign of the group.h interface @@ -19,8 +35,6 @@ * Implement simple filter using popen or fifos. - * Make compatible to latest NNTP draft. - * Improve speed of online mode: Keep connection to server open for a while * Check all in
--- a/src/util.c Sun Nov 11 04:22:42 2001 +0000 +++ b/src/util.c Wed Nov 14 10:56:42 2001 +0000 @@ -1,7 +1,7 @@ /* util.c - $Id: util.c 321 2001-11-11 03:53:07Z mirkol $ + $Id: util.c 325 2001-11-14 10:56:42Z bears $ */ #if HAVE_CONFIG_H @@ -243,16 +243,31 @@ { FILE *f; time_t t; + Str tmpfname; + snprintf( tmpfname, MAXCHAR, "%s/.#%d.stamp.update", + Cfg_spoolDir(), (int) getpid() ); time( &t ); - if ( ! ( f = fopen( file, "w" ) ) ) + if ( ! ( f = fopen( tmpfname, "w" ) ) ) { Log_err( "Could not open %s for writing (%s)", - file, strerror( errno ) ); + tmpfname, strerror( errno ) ); return; } fprintf( f, "%lu\n", t ); fclose( f ); + if ( ferror( f ) ) + { + Log_err( "Error stamping into file %s: %s", + tmpfname, strerror( errno ) ); + + } + else + { + if ( rename( tmpfname, file ) < 0 ) + Log_err( "Rename of stamp file %s to %s failed: %s", + tmpfname, file, strerror( errno ) ); + } } Bool