]> code.citadel.org Git - citadel.git/commitdiff
zero out extauth in ctdl3264
authorArt Cancro <ajc@citadel.org>
Wed, 19 Apr 2023 16:56:37 +0000 (12:56 -0400)
committerArt Cancro <ajc@citadel.org>
Wed, 19 Apr 2023 16:56:37 +0000 (12:56 -0400)
citadel/utils/ctdl3264.c

index 39fc217df03b04db3881d6c17353582657f6d0f3..c18e07bd02b6a171e850150a772152ef6def84bf 100644 (file)
@@ -102,11 +102,6 @@ void close_dbenv(void) {
 }
 
 
-// placeholder convert function for the data types not yet implemented
-void null_function(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_key, DBT *out_data) {
-}
-
-
 // convert function for a message in msgmain
 void convert_msgmain(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_key, DBT *out_data) {
        int32_t in_msgnum;
@@ -521,6 +516,13 @@ void convert_config(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_key, DBT
 }
 
 
+// For obsolete databases, zero all the output
+void zero_function(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_key, DBT *out_data) {
+       out_key->size = 0;
+       out_data->size = 0;
+}
+
+
 void (*convert_functions[])(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_key, DBT *out_data) = {
        convert_msgmain,        // CDB_MSGMAIN
        convert_users,          // CDB_USERS
@@ -534,7 +536,7 @@ void (*convert_functions[])(int which_cdb, DBT *in_key, DBT *in_data, DBT *out_k
        convert_msglists,       // CDB_FULLTEXT
        convert_euidindex,      // CDB_EUIDINDEX
        convert_usersbynumber,  // CDB_USERSBYNUMBER
-       null_function,          // CDB_EXTAUTH
+       zero_function,          // CDB_EXTAUTH (obsolete)
        convert_config          // CDB_CONFIG
 };