From: Timo Sirainen Date: Sat, 7 Jan 2023 20:32:46 +0000 (+0200) Subject: lib-storage: Remove unused mail_storage_service_save_userdb_fields() X-Git-Tag: 2.4.0~2313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53266eb61980d62e98bce688528df61b892a7b9b;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Remove unused mail_storage_service_save_userdb_fields() --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index bf782a1f26..6202bee92f 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -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, diff --git a/src/lib-storage/mail-storage-service.h b/src/lib-storage/mail-storage-service.h index 9dfefdf59a..7b32778f21 100644 --- a/src/lib-storage/mail-storage-service.h +++ b/src/lib-storage/mail-storage-service.h @@ -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,