# HG changeset patch # User bears # Date 989928473 -3600 # Node ID c912e828816458949a607b5053cbbdfbed2058df # Parent a43a528cfbe774ddb099b8b7dd61c8bf777f36e9 [svn] * src/client.c: Only bail out of fetching multiple articles if the connection fails. If we do get a status from the upstream server note it and see what is reported for the next article. Otherwise failure to retrieve one article will cause all successive article fetches to fail even through they would succeed if tried. * src/lock.c: Fix assert in lazy locking. If another noffle signalled us to release the lock at the next close, and then repeats the signal so that it arrives during LOCK_closeDatabases, the signal handler was trying to close the databases again. diff -r a43a528cfbe7 -r c912e8288164 ChangeLog --- a/ChangeLog Thu May 10 17:07:46 2001 +0100 +++ b/ChangeLog Tue May 15 13:07:53 2001 +0100 @@ -1,4 +1,16 @@ -Thu May 10 2001 Jim Hageu +Tue May 15 2001 Jim Hague + + * src/client.c: Only bail out of fetching multiple articles if the + connection fails. If we do get a status from the upstream server + note it and see what is reported for the next article. Otherwise + failure to retrieve one article will cause all successive article + fetches to fail even through they would succeed if tried. + * src/lock.c: Fix assert in lazy locking. If another noffle signalled us + to release the lock at the next close, and then repeats the signal so that + it arrives during LOCK_closeDatabases, the signal handler was trying + to close the databases again. + +Thu May 10 2001 Jim Hague * src/client.c: Only return failure getting NEWGROUPS if the connection failed. If the server doesn't implement NEWGROUPS correctly (step diff -r a43a528cfbe7 -r c912e8288164 src/client.c --- a/src/client.c Thu May 10 17:07:46 2001 +0100 +++ b/src/client.c Tue May 15 13:07:53 2001 +0100 @@ -1,7 +1,7 @@ /* client.c - $Id: client.c 286 2001-05-10 16:07:46Z bears $ + $Id: client.c 292 2001-05-15 12:07:53Z bears $ */ #if HAVE_CONFIG_H @@ -1153,13 +1153,20 @@ res = TRUE; while ( res && ( p = Utl_getLn( msgId, p ) ) ) { - if ( getStat() != STAT_ART_FOLLOWS ) + switch( getStat() ) { - retrievingFailed( msgId, client.lastStat ); + case STAT_ART_FOLLOWS: + res = retrieveAndStoreArt( msgId, ++(*artcnt), artmax ); + break; + + case STAT_PROGRAM_FAULT: res = FALSE; + /* Fall through */ + + default: + retrievingFailed( msgId, client.lastStat ); + break; } - else - res = retrieveAndStoreArt( msgId, ++(*artcnt), artmax ); } del_DynStr( s ); Lock_openDatabases(); diff -r a43a528cfbe7 -r c912e8288164 src/lock.c --- a/src/lock.c Thu May 10 17:07:46 2001 +0100 +++ b/src/lock.c Tue May 15 13:07:53 2001 +0100 @@ -1,7 +1,7 @@ /* lock.c - $Id: lock.c 260 2001-02-25 23:29:50Z bears $ + $Id: lock.c 292 2001-05-15 12:07:53Z bears $ */ #if HAVE_CONFIG_H @@ -233,9 +233,13 @@ { UNUSED( sig ); + /* + * If we hold the lock right now, flag it to be released next close. + * Otherwise, if we are holding it lazily, release it. + */ if ( globalLock.lazyLockBusy ) globalLock.lazyClose = FALSE; - else + else if ( gotLock( &globalLock ) ) closeDatabases(); return; } @@ -280,7 +284,7 @@ blockSignal( FALSE ); } -/* Sync al databases to disc. Maintain global lock status. */ +/* Sync all databases to disc. Maintain global lock status. */ void Lock_syncDatabases( void ) {