X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fexpire%2Fserv_expire.c;fp=citadel%2Fmodules%2Fexpire%2Fserv_expire.c;h=94999b9d71eba4bbdb61838034109560a57693ad;hp=76bd626fbada1a23cb473f0a03b799da95d2ff45;hb=58f686487cf5f14d5da5357c67f2e6624dbde027;hpb=991c9b518abbcf62294e6d359c158039fc2b97c7 diff --git a/citadel/modules/expire/serv_expire.c b/citadel/modules/expire/serv_expire.c index 76bd626fb..94999b9d7 100644 --- a/citadel/modules/expire/serv_expire.c +++ b/citadel/modules/expire/serv_expire.c @@ -704,24 +704,24 @@ int PurgeUseTable(StrBuf *ErrMsg) { syslog(LOG_DEBUG, "Purge use table: phase 1"); cdb_rewind(CDB_USETABLE); - while(cdbut = cdb_next_item(CDB_USETABLE), cdbut != NULL) { - - /* - * TODODRW: change this to create a new function time_t cdb_get_timestamp( struct cdbdata *) - * this will release this file from the serv_network.h - * Maybe it could be a macro that extracts and casts the reult - */ + while(cdbut = cdb_next_item(CDB_USETABLE), cdbut != NULL) + { if (cdbut->len > sizeof(struct UseTable)) memcpy(&ut, cdbut->ptr, sizeof(struct UseTable)); - else { + else + { memset(&ut, 0, sizeof(struct UseTable)); memcpy(&ut, cdbut->ptr, cdbut->len); } cdb_free(cdbut); - if ( (time(NULL) - ut.ut_timestamp) > USETABLE_RETAIN ) { + syslog(LOG_DEBUG, "UT: [%s] at %s", ut.ut_msgid, asctime(localtime(&ut.ut_timestamp))); // FIXME take this out ajc + + if ( (time(NULL) - ut.ut_timestamp) > USETABLE_RETAIN ) + { uptr = (struct UPurgeList *) malloc(sizeof(struct UPurgeList)); - if (uptr != NULL) { + if (uptr != NULL) + { uptr->next = ul; safestrncpy(uptr->up_key, ut.ut_msgid, sizeof uptr->up_key); ul = uptr;