Mercurial > noffle
comparison src/noffle.c @ 180:09ca6eb5c7ff noffle
[svn] * TODO,src/client.c,src/client.h,src/fetch.c,src/fetch.h,src/noffle.c:
Improve error checking during fetches. A fetch is now aborted immediately
if the connection times out or if an unexpected response arrives.
This should fix problems with articles appearing in the wrong group,
and possibly other mysterious happenings.
author | bears |
---|---|
date | Wed, 09 May 2001 12:33:43 +0100 |
parents | cf2274194d38 |
children | fed1334d766b |
comparison
equal
deleted
inserted
replaced
179:f973675760dc | 180:09ca6eb5c7ff |
---|---|
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 261 2001-02-26 22:41:26Z mnalis $ | 13 $Id: noffle.c 279 2001-05-09 11:33:43Z 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 |
160 | 160 |
161 Cfg_beginServEnum(); | 161 Cfg_beginServEnum(); |
162 while ( Cfg_nextServ( serv ) ) | 162 while ( Cfg_nextServ( serv ) ) |
163 if ( Fetch_init( serv ) ) | 163 if ( Fetch_init( serv ) ) |
164 { | 164 { |
165 Fetch_postArts(); | 165 Bool connOK; |
166 | 166 |
167 Fetch_getNewGrps(); | 167 connOK = Fetch_postArts(); |
168 | |
169 connOK = connOK && Fetch_getNewGrps(); | |
168 | 170 |
169 /* Get overviews of new articles and store IDs of new articles | 171 /* Get overviews of new articles and store IDs of new articles |
170 that are to be fetched becase of FULL or THREAD mode in the | 172 that are to be fetched becase of FULL or THREAD mode in the |
171 request database. */ | 173 request database. */ |
172 Fetch_updateGrps(); | 174 connOK = connOK && Fetch_updateGrps(); |
173 | 175 |
174 /* get requested articles */ | 176 /* get requested articles */ |
175 Fetch_getReq_(); | 177 connOK = connOK && Fetch_getReq_(); |
176 | 178 |
177 Fetch_close(); | 179 Fetch_close(); |
178 } | 180 } |
179 | 181 |
180 Lock_releaseFetchLock(); | 182 Lock_releaseFetchLock(); |
213 | 215 |
214 Cfg_beginServEnum(); | 216 Cfg_beginServEnum(); |
215 while ( Cfg_nextServ( serv ) ) | 217 while ( Cfg_nextServ( serv ) ) |
216 if ( Fetch_init( serv ) ) | 218 if ( Fetch_init( serv ) ) |
217 { | 219 { |
220 Bool connOK = TRUE; | |
221 | |
218 if ( noffle.queryGrps ) | 222 if ( noffle.queryGrps ) |
219 Client_getGrps(); | 223 connOK = Client_getGrps(); |
220 if ( noffle.queryDsc ) | 224 if ( connOK && noffle.queryDsc ) |
221 Client_getDsc(); | 225 Client_getDsc(); |
222 Fetch_close(); | 226 Fetch_close(); |
223 } | 227 } |
224 } | 228 } |
225 | 229 |