# HG changeset patch # User bears # Date 961958530 -3600 # Node ID d45b0abe7c796231ecd6824f173fa362253c35b0 # Parent 0a12fc56db3019b5282269d9f9d84e486df702f0 [svn] Merge with release-1-0 at release-1-0-merge-3 diff -r 0a12fc56db30 -r d45b0abe7c79 ChangeLog --- a/ChangeLog Sat Jun 24 21:52:33 2000 +0100 +++ b/ChangeLog Sun Jun 25 19:42:10 2000 +0100 @@ -2,6 +2,13 @@ NOFFLE ChangeLog ------------------------------------------------------------------------------- +Sun Jun 25 09:45:50 BST 2000 Jim Hague + + * src/protocol.c: Another go at Prt_genMsgId. Yesterday I seeded the + random element of the generated message id from the time; but what + if two Noffle processes start in the same second? So switch to seeding + with tv_usec instead. + Sat Jun 24 21:21:47 BST 2000 Jim Hague * packages/redhat/README, packages/redhat/noffle-expire, @@ -13,6 +20,18 @@ servers not just first, check all groups for post access before posting to one. +Sat Jun 24 20:45:52 BST 2000 Jim Hague + + * src/noffle.c: Set last accessed time on group when subscribed + from command line. + * src/post.c: Bugfix - Post_close on duplicate article post. + * src/protocol.c: Fix bug in Prt_genMsgId that caused duplicate + message IDs to be generated for posts in the same second. + +Mon Jun 19 22:43:38 BST 2000 Jim Hague + + * src/util.c, src/database.c: Fix header line reading bug. + Tue Jun 13 21:31:32 BST 2000 Jim Hague * src/noffle.c: Add include before sys/resource.h. @@ -24,10 +43,6 @@ src/post.c, docs/noffle.conf.5: Add 'path-header' and addition of Path: header to posted articles if required. -Mon Jun 19 22:43:38 BST 2000 Jim Hague - - * src/util.c, src/database.c: Fix header line reading bug. - Tue Jun 13 07:27:21 BST 2000 Jim Hague * src/configfile.h, src/configfile.c, src/database.c: Redo config diff -r 0a12fc56db30 -r d45b0abe7c79 docs/noffle.1 --- a/docs/noffle.1 Sat Jun 24 21:52:33 2000 +0100 +++ b/docs/noffle.1 Sun Jun 25 19:42:10 2000 +0100 @@ -1,5 +1,5 @@ .TH noffle 1 -.\" $Id: noffle.1 157 2000-06-24 20:30:45Z bears $ +.\" $Id: noffle.1 165 2000-06-25 18:42:10Z bears $ .SH NAME noffle \- Usenet package optimized for dialup connections. @@ -196,8 +196,9 @@ .TP .B \-m | \-\-modify post Modify the posting permission on a local newsgroup. must -be either 'y' (yes, posting allowed) or 'n' (no, posting not allowed). -Attempts to post to a newsgroup with posting disabled will be rejected. +be either 'y' (yes, posting allowed), 'm' (moderated, posting allowed +only if article has 'Approved:' header) or 'n' (no, posting not allowed). +Attempts to post to a newsgroup with posting disallowed will be rejected. .TP .B \-n, \-\-online diff -r 0a12fc56db30 -r d45b0abe7c79 src/noffle.c --- a/src/noffle.c Sat Jun 24 21:52:33 2000 +0100 +++ b/src/noffle.c Sun Jun 25 19:42:10 2000 +0100 @@ -10,7 +10,7 @@ received for some seconds (to allow multiple clients connect at the same time). - $Id: noffle.c 158 2000-06-24 20:36:38Z bears $ + $Id: noffle.c 165 2000-06-25 18:42:10Z bears $ */ #if HAVE_CONFIG_H @@ -177,12 +177,11 @@ } static Bool -doPost() +doPost( void ) { Str line; DynStr *s; Bool res; - s = new_DynStr( 10000 ); while ( fgets( line, MAXCHAR, stdin ) != NULL ) @@ -492,6 +491,7 @@ "thread" : "overview" ); if ( ! Fetchlist_write() ) fprintf( stderr, "Could not save fetchlist.\n" ); + Grp_setLastAccess( name, time( NULL ) ); return TRUE; } diff -r 0a12fc56db30 -r d45b0abe7c79 src/post.c --- a/src/post.c Sat Jun 24 21:52:33 2000 +0100 +++ b/src/post.c Sun Jun 25 19:42:10 2000 +0100 @@ -1,7 +1,7 @@ /* post.c - $Id: post.c 159 2000-06-24 20:47:40Z bears $ + $Id: post.c 165 2000-06-25 18:42:10Z bears $ */ #if HAVE_CONFIG_H @@ -410,7 +410,6 @@ Bool err; Bool local; Bool postLocal; - char postAllow; err = FALSE; postLocal = Cfg_postLocal(); diff -r 0a12fc56db30 -r d45b0abe7c79 src/protocol.c --- a/src/protocol.c Sat Jun 24 21:52:33 2000 +0100 +++ b/src/protocol.c Sun Jun 25 19:42:10 2000 +0100 @@ -1,7 +1,7 @@ /* protocol.c - $Id: protocol.c 155 2000-06-24 20:28:01Z bears $ + $Id: protocol.c 165 2000-06-25 18:42:10Z bears $ */ #if HAVE_CONFIG_H @@ -276,11 +276,20 @@ { Str domain, date; time_t t; + static Bool randSeeded = FALSE; + if ( ! randSeeded ) + { + struct timeval tv; + struct timezone tz; + + if ( gettimeofday( &tv, &tz ) == 0 ) + srand( (unsigned int) tv.tv_usec ); + randSeeded = TRUE; + } getDomain( domain, from ); time( &t ); strftime( date, MAXCHAR, "%Y%m%d%H%M%S", gmtime( &t ) ); - srand( (unsigned int)time( NULL ) ); snprintf( msgId, MAXCHAR, "<%s.%X.%s@%s>", date, rand(), suffix, domain ); ASSERT( Prt_isValidMsgId( msgId ) ); }