]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Remove "const" from settings parser contexts
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 2 Dec 2022 12:51:23 +0000 (14:51 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 7 Dec 2022 08:26:24 +0000 (08:26 +0000)
src/lib-storage/index/raw/raw-storage.c
src/lib-storage/index/raw/raw-storage.h
src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h
src/lib-storage/mail-user.c
src/lib-storage/mail-user.h
src/lmtp/lmtp-client.c
src/plugins/quota/quota-status.c

index d88a3bde9e88156df391e357bab68534bed175d4..1fd642f25d52aa28a07c4fa7a82d1ad2eeda705e 100644 (file)
@@ -13,7 +13,7 @@ extern struct mail_storage raw_storage;
 extern struct mailbox raw_mailbox;
 
 struct mail_user *
-raw_storage_create_from_set(const struct setting_parser_context *unexpanded_set_parser)
+raw_storage_create_from_set(struct setting_parser_context *unexpanded_set_parser)
 {
        struct mail_user *user;
        struct mail_namespace *ns;
index cfc7127a8b3b6f87ce4d6ac9a776b9bf4225cdb3..5d8d0ee4dda8d0b22efe1db5a39504dd2ab24fb1 100644 (file)
@@ -30,7 +30,7 @@ struct raw_mailbox {
 extern struct mail_vfuncs raw_mail_vfuncs;
 
 struct mail_user *
-raw_storage_create_from_set(const struct setting_parser_context *unexpanded_set_parser);
+raw_storage_create_from_set(struct setting_parser_context *unexpanded_set_parser);
 
 int raw_mailbox_alloc_stream(struct mail_user *user, struct istream *input,
                             time_t received_time, const char *envelope_sender,
index 1072fd11ca7e1f6ac4fca22f56639815504001e3..270e8eb27c176b4ac9222255a672943d52327c0f 100644 (file)
@@ -1057,7 +1057,7 @@ mail_storage_service_add_storage_set_roots(struct mail_storage_service_ctx *ctx)
 
 int mail_storage_service_read_settings(struct mail_storage_service_ctx *ctx,
                                       const struct mail_storage_service_input *input,
-                                      const struct setting_parser_context **parser_r,
+                                      struct setting_parser_context **parser_r,
                                       const char **error_r)
 {
        struct master_service_settings_input set_input;
@@ -1106,15 +1106,13 @@ int mail_storage_service_read_settings(struct mail_storage_service_ctx *ctx,
        if (null_strcmp(set_input.module, ctx->set_cache_module) == 0 &&
            null_strcmp(set_input.service, ctx->set_cache_service) == 0 &&
            ctx->set_cache != NULL) {
-               struct setting_parser_context *parser;
                if (master_service_settings_cache_read(ctx->set_cache,
                                                       &set_input,
-                                                      &parser, error_r) < 0) {
+                                                      parser_r, error_r) < 0) {
                        *error_r = t_strdup_printf(
                                "Error reading configuration: %s", *error_r);
                        return -1;
                }
-               *parser_r = parser;
        } else {
                if (master_service_settings_read(ctx->service, &set_input,
                                                 &set_output, error_r) < 0) {
@@ -1245,7 +1243,7 @@ mail_storage_service_lookup_real(struct mail_storage_service_ctx *ctx,
        const struct mail_user_settings *user_set;
        const char *const *userdb_fields, *error;
        struct auth_user_reply reply;
-       const struct setting_parser_context *set_parser;
+       struct setting_parser_context *set_parser;
        pool_t user_pool, temp_pool;
        int ret = 1;
 
@@ -1683,7 +1681,7 @@ void mail_storage_service_init_settings(struct mail_storage_service_ctx *ctx,
                                        const struct mail_storage_service_input *input)
 {
        const struct mail_user_settings *user_set;
-       const struct setting_parser_context *set_parser;
+       struct setting_parser_context *set_parser;
        const char *error;
 
        if (ctx->conn != NULL)
index 5756e19ec67ab5fc57da56e0465eb771e1b5a143..05899a2e82c783175dcd11c89417b7a7765208ec 100644 (file)
@@ -86,7 +86,7 @@ void mail_storage_service_set_auth_conn(struct mail_storage_service_ctx *ctx,
                                        struct auth_master_connection *conn);
 int mail_storage_service_read_settings(struct mail_storage_service_ctx *ctx,
                                       const struct mail_storage_service_input *input,
-                                      const struct setting_parser_context **parser_r,
+                                      struct setting_parser_context **parser_r,
                                       const char **error_r) ATTR_NULL(2);
 /* Read settings and initialize context to use them. Do nothing if service is
    already initialized. This is mainly necessary when calling _get_auth_conn()
index 9e023469238c215cfdad01eadf01e694f52a03df..ada9ea9ef6202849320d9e966d193750eea79129 100644 (file)
@@ -51,7 +51,7 @@ static void mail_user_deinit_pre_base(struct mail_user *user ATTR_UNUSED)
 static struct mail_user *
 mail_user_alloc_int(struct event *parent_event,
                    const char *username,
-                   const struct setting_parser_context *unexpanded_set_parser,
+                   struct setting_parser_context *unexpanded_set_parser,
                    pool_t pool)
 {
        struct mail_user *user;
@@ -86,7 +86,7 @@ mail_user_alloc_int(struct event *parent_event,
 struct mail_user *
 mail_user_alloc_nodup_set(struct event *parent_event,
                          const char *username,
-                         const struct setting_parser_context *unexpanded_set_parser)
+                         struct setting_parser_context *unexpanded_set_parser)
 {
        pool_t pool;
 
@@ -97,7 +97,7 @@ mail_user_alloc_nodup_set(struct event *parent_event,
 
 struct mail_user *mail_user_alloc(struct event *parent_event,
                                  const char *username,
-                                 const struct setting_parser_context *unexpanded_set_parser)
+                                 struct setting_parser_context *unexpanded_set_parser)
 {
        pool_t pool;
 
index 2f4cff9343e3a61b317d608aa4f4c143dcbaa16a..1bddfdb2682a084873d37506ce844d5bb1335935 100644 (file)
@@ -58,8 +58,8 @@ struct mail_user {
           This could be set by plugins that need to fail the initialization. */
        const char *error;
 
-       const struct setting_parser_context *unexpanded_set_parser;
-       const struct setting_parser_context *set_parser;
+       struct setting_parser_context *unexpanded_set_parser;
+       struct setting_parser_context *set_parser;
        const struct mail_user_settings *unexpanded_set;
        struct mail_user_settings *set;
        struct mail_namespace *namespaces;
@@ -129,11 +129,11 @@ extern const struct var_expand_func_table *mail_user_var_expand_func_table;
 
 struct mail_user *mail_user_alloc(struct event *parent_event,
                                  const char *username,
-                                 const struct setting_parser_context *unexpanded_set_parser);
+                                 struct setting_parser_context *unexpanded_set_parser);
 struct mail_user *
 mail_user_alloc_nodup_set(struct event *parent_event,
                          const char *username,
-                         const struct setting_parser_context *set_parser);
+                         struct setting_parser_context *set_parser);
 /* Returns -1 if settings were invalid. */
 int mail_user_init(struct mail_user *user, const char **error_r);
 
index 4c4c03700c3c7ecf278bf1891ef9398ecc022d92..ea4710a2c5ddb3cae8d8574eb27d5f379a1dc08e 100644 (file)
@@ -100,7 +100,7 @@ static void client_load_modules(struct client *client)
 static void client_read_settings(struct client *client, bool ssl)
 {
        struct mail_storage_service_input input;
-       const struct setting_parser_context *set_parser;
+       struct setting_parser_context *set_parser;
        struct lmtp_settings *lmtp_set;
        struct lda_settings *lda_set;
        const char *error;
index 796e5c3975de48c5f368f388bd7e2b0e13df2bf8..d9cfdf3fb8448e161015b9dd285caf95cfdee3ea 100644 (file)
@@ -280,7 +280,7 @@ static void main_init(void)
                NULL
        };
        struct mail_storage_service_input input;
-       const struct setting_parser_context *set_parser;
+       struct setting_parser_context *set_parser;
        const struct mail_user_settings *user_set;
        const char *value, *error;