document private/public functions in berkeley_db.c
authorArt Cancro <ajc@citadel.org>
Wed, 9 Aug 2023 15:52:45 +0000 (11:52 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 9 Aug 2023 15:52:45 +0000 (11:52 -0400)
citadel/server/backends/berkeley_db/berkeley_db.c

index b16c0e57d3f0ed73b1d1de0f2798265fbe097ebf..67bcb0236a43accfff135f6778aed918862d3524 100644 (file)
@@ -59,7 +59,7 @@ void bdb_verbose_err(const DB_ENV *dbenv, const char *errpfx, const char *msg) {
 }
 
 
-// wrapper for txn_abort() that logs/aborts on error
+// Wrapper for txn_abort() that logs/aborts on error.  Not part of the backend API.
 static void bdb_txabort(DB_TXN *tid) {
        int ret;
 
@@ -72,7 +72,7 @@ static void bdb_txabort(DB_TXN *tid) {
 }
 
 
-// wrapper for txn_commit() that logs/aborts on error
+// Wrapper for txn_commit() that logs/aborts on error.  Not part of the backend API.
 static void bdb_txcommit(DB_TXN *tid) {
        int ret;
 
@@ -85,7 +85,7 @@ static void bdb_txcommit(DB_TXN *tid) {
 }
 
 
-// wrapper for txn_begin() that logs/aborts on error
+// Wrapper for txn_begin() that logs/aborts on error.  Not part of the backend API.
 static void bdb_txbegin(DB_TXN **tid) {
        int ret;
 
@@ -98,13 +98,14 @@ static void bdb_txbegin(DB_TXN **tid) {
 }
 
 
-// panic callback
+// Panic callback for Berkeley DB.  Not part of the backend API.
 static void bdb_dbpanic(DB_ENV *env, int errval) {
        syslog(LOG_ERR, "bdb: PANIC: %s", db_strerror(errval));
        bdb_abort();
 }
 
 
+// Close a cursor -- not part of the backend API.
 static void bdb_cclose(DBC *cursor) {
        int ret;
 
@@ -115,6 +116,8 @@ static void bdb_cclose(DBC *cursor) {
 }
 
 
+// Convenience function to abort if a cursor is still open when we didn't expect it to be.
+// This is not part of the backend API.
 static void bdb_bailIfCursor(DBC **cursors, const char *msg) {
        int i;