Mercurial > noffle
comparison src/client.c @ 183:c912e8288164 noffle
[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.
author | bears |
---|---|
date | Tue, 15 May 2001 13:07:53 +0100 |
parents | a43a528cfbe7 |
children | fed1334d766b |
comparison
equal
deleted
inserted
replaced
182:a43a528cfbe7 | 183:c912e8288164 |
---|---|
1 /* | 1 /* |
2 client.c | 2 client.c |
3 | 3 |
4 $Id: client.c 286 2001-05-10 16:07:46Z bears $ | 4 $Id: client.c 292 2001-05-15 12:07:53Z bears $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
1151 | 1151 |
1152 p = DynStr_str( s ); | 1152 p = DynStr_str( s ); |
1153 res = TRUE; | 1153 res = TRUE; |
1154 while ( res && ( p = Utl_getLn( msgId, p ) ) ) | 1154 while ( res && ( p = Utl_getLn( msgId, p ) ) ) |
1155 { | 1155 { |
1156 if ( getStat() != STAT_ART_FOLLOWS ) | 1156 switch( getStat() ) |
1157 { | 1157 { |
1158 case STAT_ART_FOLLOWS: | |
1159 res = retrieveAndStoreArt( msgId, ++(*artcnt), artmax ); | |
1160 break; | |
1161 | |
1162 case STAT_PROGRAM_FAULT: | |
1163 res = FALSE; | |
1164 /* Fall through */ | |
1165 | |
1166 default: | |
1158 retrievingFailed( msgId, client.lastStat ); | 1167 retrievingFailed( msgId, client.lastStat ); |
1159 res = FALSE; | 1168 break; |
1160 } | 1169 } |
1161 else | |
1162 res = retrieveAndStoreArt( msgId, ++(*artcnt), artmax ); | |
1163 } | 1170 } |
1164 del_DynStr( s ); | 1171 del_DynStr( s ); |
1165 Lock_openDatabases(); | 1172 Lock_openDatabases(); |
1166 return res; | 1173 return res; |
1167 } | 1174 } |