X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fserver%2Fbackends%2Fberkeley_db%2Fberkeley_db.c;h=56a5f14fb1ccfcfba63ae68d9ddfe58385ee6732;hp=a8b8bcbd6694c99f5c1c46da88730adda829f672;hb=HEAD;hpb=94267831ba06be96909f10cb64541a80ee93fc90 diff --git a/citadel/server/backends/berkeley_db/berkeley_db.c b/citadel/server/backends/berkeley_db/berkeley_db.c index a8b8bcbd6..56a5f14fb 100644 --- a/citadel/server/backends/berkeley_db/berkeley_db.c +++ b/citadel/server/backends/berkeley_db/berkeley_db.c @@ -215,10 +215,8 @@ void bdb_checkpoint(void) { } -// Open the various tables we'll be using. Any table which -// does not exist should be created. Note that we don't need a -// critical section here, because there aren't any active threads -// manipulating the database yet. +// Open the various tables we'll be using. Any table which does not exist should be created. Note that we don't need a +// critical section here, because there aren't any active threads manipulating the database yet. void bdb_open_databases(void) { int ret; int i; @@ -358,8 +356,7 @@ void bdb_decompress_if_necessary(DBT *d) { destLen = (uLongf) zheader.uncompressed_len; uncompressed_data = malloc(zheader.uncompressed_len); - if (uncompress((Bytef *) uncompressed_data, - (uLongf *) &destLen, (const Bytef *) compressed_data, (uLong) sourceLen) != Z_OK) { + if (uncompress((Bytef *) uncompressed_data, (uLongf *) &destLen, (const Bytef *) compressed_data, (uLong) sourceLen) != Z_OK) { syslog(LOG_ERR, "bdb: uncompress() error"); bdb_abort(); } @@ -639,6 +636,7 @@ void bdb_tick(void) { } } + // Calling this function activates the Berkeley DB back end. void bdb_init_backend(void) { @@ -660,7 +658,7 @@ void bdb_init_backend(void) { cdb_tick = bdb_tick; // Some functions in this backend need to store some per-thread data. - // We crerate the key here, during module initialization. + // We create the key here, during module initialization. if (pthread_key_create(&bdb_thread_key, NULL) != 0) { syslog(LOG_ERR, "pthread_key_create() : %m"); exit(CTDLEXIT_THREAD);