]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Remove unused master_service.ssl_ctx_initialized
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 16 Jun 2023 14:11:22 +0000 (17:11 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:09 +0000 (12:34 +0200)
master_service_ssl_ctx_init() is called only once at startup, so there is no
need to support calling it multiple times.

src/lib-master/master-service-private.h
src/lib-master/master-service-ssl.c

index f7be0958c4c6304fd5de0f5a93746925d321c9d5..5a20d85e85a0c08c2246a7e32026f7e3c56bbcd1 100644 (file)
@@ -99,7 +99,6 @@ struct master_service {
        bool config_path_changed_with_param:1;
        bool have_admin_sockets:1;
        bool want_ssl_server:1;
-       bool ssl_ctx_initialized:1;
        bool config_path_from_master:1;
        bool log_initialized:1;
        bool init_finished:1;
index 8dd3098b562996e952e88124a3e32e325e564204..bf4063f2aac9f6592e96ffba94c979bdabf0c9f7 100644 (file)
@@ -18,10 +18,6 @@ void master_service_ssl_ctx_init(struct master_service *service)
        const struct ssl_iostream_settings *ssl_set;
        const char *error;
 
-       if (service->ssl_ctx_initialized)
-               return;
-       service->ssl_ctx_initialized = TRUE;
-
        /* must be called after master_service_init_finish() so that if
           initialization fails we can close the SSL listeners */
        i_assert(service->listeners != NULL || service->socket_count == 0);
@@ -59,5 +55,4 @@ void master_service_ssl_ctx_deinit(struct master_service *service)
 {
        if (service->ssl_ctx != NULL)
                ssl_iostream_context_unref(&service->ssl_ctx);
-       service->ssl_ctx_initialized = FALSE;
 }