* Checked in some test code and logging to determine whether a bad cast/copy is the...
authorArt Cancro <ajc@citadel.org>
Sun, 11 Oct 2009 03:33:51 +0000 (03:33 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 11 Oct 2009 03:33:51 +0000 (03:33 +0000)
citadel/modules/expire/serv_expire.c

index dd994e3b07296ac1a3c7c6632f8838159ebc5af4..32b6d270cf6c939a690d59d6c41c984811d9fc7e 100644 (file)
@@ -816,6 +816,13 @@ int PurgeStaleOpenIDassociations(void) {
                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);