Mercurial > noffle
comparison src/noffle.c @ 218:411b6ab1acb7 noffle
[svn] *src/content.c,src/noffle.c: Correct bugfix in Conf_write().
Remove temporary file expiry, but skip temp files in
Cont_nextGrp().
author | bears |
---|---|
date | Thu, 22 Nov 2001 22:48:07 +0000 |
parents | beb6525f8b44 |
children | ffb1848a39db |
comparison
equal
deleted
inserted
replaced
217:b4f1731a6470 | 218:411b6ab1acb7 |
---|---|
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 333 2001-11-22 12:05:40Z mirkol $ | 13 $Id: noffle.c 337 2001-11-22 22:48:07Z 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 |
239 { | 239 { |
240 const Over *ov; | 240 const Over *ov; |
241 int i; | 241 int i; |
242 int cntDel, cntLeft; | 242 int cntDel, cntLeft; |
243 Str grp; | 243 Str grp; |
244 Str tmpfname; | |
245 Bool autoUnsubscribe; | 244 Bool autoUnsubscribe; |
246 int autoUnsubscribeDays; | 245 int autoUnsubscribeDays; |
247 time_t maxAge = 0; | 246 time_t maxAge = 0; |
248 const char *msgId; | 247 const char *msgId; |
249 | 248 |
254 return; | 253 return; |
255 Log_inf( "Expiring overviews not in database" ); | 254 Log_inf( "Expiring overviews not in database" ); |
256 Fetchlist_read(); | 255 Fetchlist_read(); |
257 do | 256 do |
258 { | 257 { |
259 /* delete tmpfnames. see content.c:Cont_write() */ | 258 if ( ! Grp_exists( grp ) ) |
260 if ( Wld_match(grp, ".#[0123456789][0123456789]*.*" ) ) | |
261 { | |
262 if ( ( snprintf( tmpfname, MAXCHAR, "%s/overview/%s", \ | |
263 Cfg_spoolDir(), grp ) < 0 ) \ | |
264 || ( unlink( tmpfname ) < 0 ) ) | |
265 Log_err( "Unlink of overview temp file %s failed: %s", \ | |
266 grp, strerror( errno ) ); | |
267 else | |
268 Log_err( "Overview temp file %s deleted.", grp ); | |
269 } | |
270 else if ( ! Grp_exists( grp ) ) | |
271 Log_err( "Overview file for unknown group %s exists", grp ); | 259 Log_err( "Overview file for unknown group %s exists", grp ); |
272 else | 260 else |
273 { | 261 { |
274 cntDel = cntLeft = 0; | 262 cntDel = cntLeft = 0; |
275 Cont_read( grp ); | 263 Cont_read( grp ); |