]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: mail: Removed redundant cur_client_ip field from struct doveadm_mail_cmd_con...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Tue, 10 Oct 2017 17:12:52 +0000 (19:12 +0200)
committerStephan Bosch <stephan.bosch@dovecot.fi>
Tue, 24 Oct 2017 20:29:18 +0000 (22:29 +0200)
src/doveadm/doveadm-dsync.c
src/doveadm/doveadm-mail.c
src/doveadm/doveadm-mail.h

index 7f82e1593533699a9ad95c53ee3e24c3f139dd1d..9e9442d6c7332242a3b868d5c5a3aba2bfa2e0ee 100644 (file)
@@ -573,10 +573,10 @@ cmd_dsync_run(struct doveadm_mail_cmd_context *_ctx, struct mail_user *user)
        int ret = 0;
 
        i_zero(&set);
-       if (_ctx->cur_client_ip.family != 0) {
+       if (cctx->remote_ip.family != 0) {
                /* include the doveadm client's IP address in the ps output */
                set.process_title_prefix = t_strdup_printf(
-                       "%s ", net_ip2addr(&_ctx->cur_client_ip));
+                       "%s ", net_ip2addr(&cctx->remote_ip));
        }
        set.sync_since_timestamp = ctx->sync_since_timestamp;
        set.sync_until_timestamp = ctx->sync_until_timestamp;
@@ -1155,10 +1155,10 @@ cmd_dsync_server_run(struct doveadm_mail_cmd_context *_ctx,
                i_set_failure_prefix("dsync-server(%s): ", user->username);
                name = i_stream_get_name(ctx->input);
 
-               if (_ctx->cur_client_ip.family != 0) {
+               if (cctx->remote_ip.family != 0) {
                        /* include the doveadm client's IP address in the ps output */
                        process_title_prefix = t_strdup_printf(
-                               "%s ", net_ip2addr(&_ctx->cur_client_ip));
+                               "%s ", net_ip2addr(&cctx->remote_ip));
                }
        } else {
                /* the log messages go via stderr to the remote dsync,
index 09d7863c4c94d3e32610c146d9f66c3a8640d750..5a75e3575b50ed11ae29a99eb430b327758812da 100644 (file)
@@ -450,7 +450,6 @@ int doveadm_mail_single_user(struct doveadm_mail_cmd_context *ctx,
        i_assert(cctx->username != NULL);
 
        doveadm_cctx_to_storage_service_input(cctx, &ctx->storage_service_input);
-       ctx->cur_client_ip = cctx->remote_ip;
        ctx->cur_username = cctx->username;
        ctx->storage_service = mail_storage_service_init(master_service, NULL,
                                                         ctx->service_flags);
@@ -521,7 +520,7 @@ doveadm_mail_all_users(struct doveadm_mail_cmd_context *ctx,
        }
        if (doveadm_verbose)
                printf("\n");
-       ip = net_ip2addr(&ctx->cur_client_ip);
+       ip = net_ip2addr(&cctx->remote_ip);
        if (ip[0] == '\0')
                i_set_failure_prefix("doveadm: ");
        else
index ca56733d78322ad9992942495bc53a0c21468676..a1ec1ab63de3aa908727ee116c2398560cd80823 100644 (file)
@@ -76,7 +76,6 @@ struct doveadm_mail_cmd_context {
        struct mail_search_args *search_args;
        struct istream *users_list_input;
 
-       struct ip_addr cur_client_ip;
        const char *cur_username;
        struct mail_storage_service_user *cur_service_user;
        struct mail_user *cur_mail_user;