Mercurial > noffle
comparison src/noffle.c @ 214:beb6525f8b44 noffle
[svn] expireContents() expires overview temporary files
author | mirkol |
---|---|
date | Thu, 22 Nov 2001 12:05:40 +0000 |
parents | 61a0f1e13916 |
children | 411b6ab1acb7 |
comparison
equal
deleted
inserted
replaced
213:f0acb9366e4f | 214:beb6525f8b44 |
---|---|
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 327 2001-11-14 20:22:22Z mirkol $ | 13 $Id: noffle.c 333 2001-11-22 12:05:40Z mirkol $ |
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; | |
244 Bool autoUnsubscribe; | 245 Bool autoUnsubscribe; |
245 int autoUnsubscribeDays; | 246 int autoUnsubscribeDays; |
246 time_t maxAge = 0; | 247 time_t maxAge = 0; |
247 const char *msgId; | 248 const char *msgId; |
248 | 249 |
253 return; | 254 return; |
254 Log_inf( "Expiring overviews not in database" ); | 255 Log_inf( "Expiring overviews not in database" ); |
255 Fetchlist_read(); | 256 Fetchlist_read(); |
256 do | 257 do |
257 { | 258 { |
258 if ( ! Grp_exists( grp ) ) | 259 /* delete tmpfnames. see content.c:Cont_write() */ |
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 ) ) | |
259 Log_err( "Overview file for unknown group %s exists", grp ); | 271 Log_err( "Overview file for unknown group %s exists", grp ); |
260 else | 272 else |
261 { | 273 { |
262 cntDel = cntLeft = 0; | 274 cntDel = cntLeft = 0; |
263 Cont_read( grp ); | 275 Cont_read( grp ); |