]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Remove unused mail_storage_service_save_userdb_fields()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 7 Jan 2023 20:32:46 +0000 (22:32 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Nov 2023 12:20:16 +0000 (14:20 +0200)
src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h

index bf782a1f2662dc73cbc4b4438a9467de631c1567..6202bee92fa66ed956ee1fd389ed2ec694c313a4 100644 (file)
@@ -58,9 +58,6 @@ struct mail_storage_service_ctx {
        ARRAY(const struct setting_parser_info *) set_roots;
        enum mail_storage_service_flags flags;
 
-       pool_t userdb_next_pool;
-       const char *const **userdb_next_fieldsp;
-
        bool debug:1;
        bool log_initialized:1;
        bool config_permission_denied:1;
@@ -1283,13 +1280,7 @@ mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx,
                return -1;
        }
 
-       if (ctx->userdb_next_pool == NULL)
-               temp_pool = pool_alloconly_create("userdb lookup", 2048);
-       else {
-               temp_pool = ctx->userdb_next_pool;
-               ctx->userdb_next_pool = NULL;
-               pool_ref(temp_pool);
-       }
+       temp_pool = pool_alloconly_create("userdb lookup", 2048);
 
        /* Create an event that will be used as the default event for logging.
           This event won't be a parent to any other events - mail_user.event
@@ -1324,8 +1315,6 @@ mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx,
                        return ret;
                }
                event_add_str(event, "user", username);
-               if (ctx->userdb_next_fieldsp != NULL)
-                       *ctx->userdb_next_fieldsp = userdb_fields;
        } else {
                userdb_fields = input->userdb_fields;
        }
@@ -1447,17 +1436,6 @@ int mail_storage_service_lookup(struct mail_storage_service_ctx *ctx,
        return ret;
 }
 
-void mail_storage_service_save_userdb_fields(struct mail_storage_service_ctx *ctx,
-                                            pool_t pool, const char *const **userdb_fields_r)
-{
-       i_assert(pool != NULL);
-       i_assert(userdb_fields_r != NULL);
-
-       ctx->userdb_next_pool = pool;
-       ctx->userdb_next_fieldsp = userdb_fields_r;
-       *userdb_fields_r = NULL;
-}
-
 static int
 mail_storage_service_next_real(struct mail_storage_service_ctx *ctx,
                               struct mail_storage_service_user *user,
index 9dfefdf59a6d0c0d6d560c57aaa64121abba86aa..7b32778f213408543fb35215d717f99c40677d6c 100644 (file)
@@ -105,10 +105,6 @@ int mail_storage_service_lookup(struct mail_storage_service_ctx *ctx,
                                const struct mail_storage_service_input *input,
                                struct mail_storage_service_user **user_r,
                                const char **error_r);
-/* The next mail_storage_service_lookup() will save the userdb fields into the
-   given pointer, allocated from the given pool. */
-void mail_storage_service_save_userdb_fields(struct mail_storage_service_ctx *ctx,
-                                            pool_t pool, const char *const **userdb_fields_r);
 /* Returns 0 if ok, -1 if fatal error, -2 if error is user-specific. */
 int mail_storage_service_next(struct mail_storage_service_ctx *ctx,
                              struct mail_storage_service_user *user,