]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/usetable.c
cdb_fetch() and cdb_next_item() now return a struct cdbdata instead of a pointer...
[citadel.git] / citadel / server / usetable.c
index 816f76e098c4b5ca798b4dca40047f0038b3979d..6364a8fa0bf6b7b3917d79cf8bb59ff997c0a93a 100644 (file)
 int CheckIfAlreadySeen(StrBuf *guid) {
        int found = 0;
        struct UseTable ut;
-       struct cdbdata *cdbut;
+       struct cdbdata cdbut;
        int hash = HashLittle(ChrPtr(guid), StrLength(guid));
 
        syslog(LOG_DEBUG, "usetable: CheckIfAlreadySeen(0x%8x)", hash);
        cdbut = cdb_fetch(CDB_USETABLE, &hash, sizeof(hash));
-       if (cdbut != NULL) {
+       if (cdbut.len > 0) {
                found = 1;
-               cdb_free(cdbut);
        }
 
        // (Re)write the record, to update the timestamp.