projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3b47b4
)
One blank line between sections of code, two blanks between functions.
author
Art Cancro
<ajc@citadel.org>
Tue, 28 Feb 2017 16:17:59 +0000
(11:17 -0500)
committer
Art Cancro
<ajc@citadel.org>
Tue, 28 Feb 2017 16:17:59 +0000
(11:17 -0500)
citadel/modules/expire/serv_expire.c
patch
|
blob
|
history
diff --git
a/citadel/modules/expire/serv_expire.c
b/citadel/modules/expire/serv_expire.c
index 94999b9d71eba4bbdb61838034109560a57693ad..10f8bc4bf4e173814678cee2e40227733ef410f2 100644
(file)
--- a/
citadel/modules/expire/serv_expire.c
+++ b/
citadel/modules/expire/serv_expire.c
@@
-3,7
+3,7
@@
*
* You might also see this module affectionately referred to as the DAP (the Dreaded Auto-Purger).
*
*
* You might also see this module affectionately referred to as the DAP (the Dreaded Auto-Purger).
*
- * Copyright (c) 1988-201
5
by citadel.org (Art Cancro, Wilifried Goesgens, and others)
+ * Copyright (c) 1988-201
7
by citadel.org (Art Cancro, Wilifried Goesgens, and others)
*
* This program is open source software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
*
* This program is open source software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@@
-102,7
+102,6
@@
struct ValidUser {
long vu_usernum;
};
long vu_usernum;
};
-
struct ctdlroomref {
struct ctdlroomref *next;
long msgnum;
struct ctdlroomref {
struct ctdlroomref *next;
long msgnum;
@@
-176,7
+175,6
@@
void GatherPurgeMessages(struct ctdlroom *qrbuf, void *data) {
return;
}
return;
}
-
/* If the room is set to expire by count, do that */
if (epbuf.expire_mode == EXPIRE_NUMMSGS) {
if (num_msgs > epbuf.expire_value) {
/* If the room is set to expire by count, do that */
if (epbuf.expire_mode == EXPIRE_NUMMSGS) {
if (num_msgs > epbuf.expire_value) {
@@
-327,7
+325,6
@@
void DoPurgeRooms(struct ctdlroom *qrbuf, void *data) {
}
}
-
int PurgeRooms(void) {
struct PurgeList *pptr;
int num_rooms_purged = 0;
int PurgeRooms(void) {
struct PurgeList *pptr;
int num_rooms_purged = 0;
@@
-337,7
+334,6
@@
int PurgeRooms(void) {
syslog(LOG_DEBUG, "PurgeRooms() called");
syslog(LOG_DEBUG, "PurgeRooms() called");
-
/* Load up a table full of valid user numbers so we can delete
* user-owned rooms for users who no longer exist */
ForEachUser(AddValidUser, NULL);
/* Load up a table full of valid user numbers so we can delete
* user-owned rooms for users who no longer exist */
ForEachUser(AddValidUser, NULL);
@@
-352,7
+348,6
@@
int PurgeRooms(void) {
ValidUserList = vuptr;
}
ValidUserList = vuptr;
}
-
transcript = malloc(SIZ);
strcpy(transcript, "The following rooms have been auto-purged:\n");
transcript = malloc(SIZ);
strcpy(transcript, "The following rooms have been auto-purged:\n");
@@
-399,8
+394,6
@@
void do_uid_user_purge(struct ctdluser *us, void *data) {
}
}
-
-
/*
* Back end function to check user accounts for expiration.
*/
/*
* Back end function to check user accounts for expiration.
*/
@@
-514,7
+507,6
@@
void do_user_purge(struct ctdluser *us, void *data) {
}
}
-
int PurgeUsers(void) {
struct PurgeList *pptr;
int num_users_purged = 0;
int PurgeUsers(void) {
struct PurgeList *pptr;
int num_users_purged = 0;
@@
-684,6
+676,7
@@
int PurgeVisits(void) {
return(purged);
}
return(purged);
}
+
/*
* Purge the use table of old entries.
*
/*
* Purge the use table of old entries.
*
@@
-715,8
+708,6
@@
int PurgeUseTable(StrBuf *ErrMsg) {
}
cdb_free(cdbut);
}
cdb_free(cdbut);
- 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 ( (time(NULL) - ut.ut_timestamp) > USETABLE_RETAIN )
{
uptr = (struct UPurgeList *) malloc(sizeof(struct UPurgeList));
@@
-745,7
+736,6
@@
int PurgeUseTable(StrBuf *ErrMsg) {
}
}
-
/*
* Purge the EUID Index of old records.
*
/*
* Purge the EUID Index of old records.
*
@@
-800,7
+790,6
@@
int PurgeEuidIndexTable(void) {
}
}
-
/*
* Purge OpenID assocations for missing users (theoretically this will never delete anything)
*/
/*
* Purge OpenID assocations for missing users (theoretically this will never delete anything)
*/
@@
-848,9
+837,6
@@
int PurgeStaleOpenIDassociations(void) {
}
}
-
-
-
void purge_databases(void)
{
int retval;
void purge_databases(void)
{
int retval;
@@
-946,7
+932,6
@@
void cmd_tdap(char *argbuf) {
}
}
-
CTDL_MODULE_INIT(expire)
{
if (!threading)
CTDL_MODULE_INIT(expire)
{
if (!threading)