projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
42bbd7b
)
* Yup, that's it ... the expression (long)*(cdboi->ptr) does NOT work reliably...
author
Art Cancro
<ajc@citadel.org>
Sun, 11 Oct 2009 03:45:23 +0000
(
03:45
+0000)
committer
Art Cancro
<ajc@citadel.org>
Sun, 11 Oct 2009 03:45:23 +0000
(
03:45
+0000)
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 32b6d270cf6c939a690d59d6c41c984811d9fc7e..ab1d3a35909d765021bd681c00e6b0f40e0f9839 100644
(file)
--- a/
citadel/modules/expire/serv_expire.c
+++ b/
citadel/modules/expire/serv_expire.c
@@
-806,6
+806,7
@@
int PurgeStaleOpenIDassociations(void) {
void *Value;
const char *Key;
int num_deleted = 0;
void *Value;
const char *Key;
int num_deleted = 0;
+ long usernum = 0L;
keys = NewHash(1, NULL);
if (!keys) return(0);
keys = NewHash(1, NULL);
if (!keys) return(0);
@@
-814,15
+815,7
@@
int PurgeStaleOpenIDassociations(void) {
cdb_rewind(CDB_OPENID);
while (cdboi = cdb_next_item(CDB_OPENID), cdboi != NULL) {
if (cdboi->len > sizeof(long)) {
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));
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);
if (getuserbynumber(&usbuf, usernum) != 0) {
deleteme = strdup(cdboi->ptr + sizeof(long)),
Put(keys, deleteme, strlen(deleteme), deleteme, generic_free_handler);