* More license declarations
[citadel.git] / citadel / modules / expire / serv_expire.c
index 32b6d270cf6c939a690d59d6c41c984811d9fc7e..00466cf77c0274eccbbaa35f71e27c0585ec04fe 100644 (file)
@@ -6,7 +6,21 @@
  * You might also see this module affectionately referred to as the DAP (the Dreaded Auto-Purger).
  *
  * Copyright (c) 1988-2009 by citadel.org (Art Cancro, Wilifried Goesgens, and others)
- * Brought to you, our happy user community, under the terms of the GNU General Public License v3
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
  *
  * A brief technical discussion:
  *
@@ -806,6 +820,7 @@ int PurgeStaleOpenIDassociations(void) {
        void *Value;
        const char *Key;
        int num_deleted = 0;
+       long usernum = 0L;
 
        keys = NewHash(1, NULL);
        if (!keys) return(0);
@@ -814,15 +829,7 @@ int PurgeStaleOpenIDassociations(void) {
        cdb_rewind(CDB_OPENID);
        while (cdboi = cdb_next_item(CDB_OPENID), cdboi != NULL) {
                if (cdboi->len > sizeof(long)) {
-                       long usernum;
-                       usernum = ((long)*(cdboi->ptr));
-                       /* FIXME two different things here, trying to figure out whether this is the
-                        * source of a bug.
-                        */
-                       CtdlLogPrintf(CTDL_DEBUG, "#1 Evaluating openid association for user %ld\n", usernum);
-                       usernum = 0;
                        memcpy(&usernum, cdboi->ptr, sizeof(long));
-                       CtdlLogPrintf(CTDL_DEBUG, "#2 Evaluating openid association for user %ld\n", usernum);
                        if (getuserbynumber(&usbuf, usernum) != 0) {
                                deleteme = strdup(cdboi->ptr + sizeof(long)),
                                Put(keys, deleteme, strlen(deleteme), deleteme, generic_free_handler);