]> code.citadel.org Git - citadel.git/blobdiff - citadel/database_sleepycat.c
* Minor and/or cosmetic changes made during x64 troubleshooting
[citadel.git] / citadel / database_sleepycat.c
index 18c1f10fc98a8dafa0c137538c9c9f958568c337..b2b2a691f17556b70592d94b308b0e738b9277c9 100644 (file)
@@ -466,9 +466,9 @@ void cdb_decompress_if_necessary(struct cdbdata *cdb) {
        uncompressed_data = malloc(zheader.uncompressed_len);
 
        if (uncompress( (Bytef *) uncompressed_data,
-                       &destLen,
-                       compressed_data,
-                       sourceLen
+                       (uLongf *)&destLen,
+                       (const Bytef *)compressed_data,
+                       (uLong)sourceLen
        ) != Z_OK) {
                lprintf(CTDL_EMERG, "uncompress() error\n");
                abort();
@@ -758,8 +758,11 @@ void cdb_rewind(int cdb)
 {
        int ret = 0;
 
-       if (MYCURSORS[cdb] != NULL)
-               cclose(MYCURSORS[cdb]);
+       if (MYCURSORS[cdb] != NULL) {
+               lprintf(CTDL_EMERG, "cdb_rewind: must close cursor on database %d before reopening.\n", cdb);
+               abort();
+               /* cclose(MYCURSORS[cdb]); */
+       }
 
        /*
         * Now initialize the cursor