From 3b3214607d11e2067ca72ce9f374b79356c43e3f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 17 Aug 2009 13:05:32 -0400 Subject: [PATCH] smtp_client_open() API changed to take lda_settings instead of mail_deliver_context. --HG-- branch : HEAD --- src/lib-lda/mail-send.c | 4 ++-- src/lib-lda/smtp-client.c | 12 ++++++------ src/lib-lda/smtp-client.h | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib-lda/mail-send.c b/src/lib-lda/mail-send.c index 4d97428b2b..9e3eb2aeb9 100644 --- a/src/lib-lda/mail-send.c +++ b/src/lib-lda/mail-send.c @@ -79,7 +79,7 @@ int mail_send_rejection(struct mail_deliver_context *ctx, const char *recipient, str_sanitize(reason, 512)); } - smtp_client = smtp_client_open(ctx, return_addr, NULL, &f); + smtp_client = smtp_client_open(ctx->set, return_addr, NULL, &f); msgid = mail_deliver_get_new_message_id(ctx); boundary = t_strdup_printf("%s/%s", my_pid, ctx->set->hostname); @@ -184,7 +184,7 @@ int mail_send_forward(struct mail_deliver_context *ctx, const char *forwardto) forwardto, return_path); } - smtp_client = smtp_client_open(ctx, forwardto, return_path, &f); + smtp_client = smtp_client_open(ctx->set, forwardto, return_path, &f); input = i_stream_create_header_filter(input, HEADER_FILTER_EXCLUDE | HEADER_FILTER_NO_CR, hide_headers, diff --git a/src/lib-lda/smtp-client.c b/src/lib-lda/smtp-client.c index aed7ba1e7b..3882c44a18 100644 --- a/src/lib-lda/smtp-client.c +++ b/src/lib-lda/smtp-client.c @@ -28,7 +28,7 @@ static struct smtp_client *smtp_client_devnull(FILE **file_r) } static void ATTR_NORETURN -smtp_client_run_sendmail(struct mail_deliver_context *ctx, +smtp_client_run_sendmail(const struct lda_settings *set, const char *destination, const char *return_path, int fd) { @@ -36,7 +36,7 @@ smtp_client_run_sendmail(struct mail_deliver_context *ctx, /* deliver_set's contents may point to environment variables. deliver_env_clean() cleans them up, so they have to be copied. */ - sendmail_path = t_strdup(ctx->set->sendmail_path); + sendmail_path = t_strdup(set->sendmail_path); argv[0] = sendmail_path; argv[1] = "-i"; /* ignore dots */ @@ -56,9 +56,9 @@ smtp_client_run_sendmail(struct mail_deliver_context *ctx, i_fatal("execv(%s) failed: %m", sendmail_path); } -struct smtp_client *smtp_client_open(struct mail_deliver_context *ctx, - const char *destination, - const char *return_path, FILE **file_r) +struct smtp_client * +smtp_client_open(const struct lda_settings *set, const char *destination, + const char *return_path, FILE **file_r) { struct smtp_client *client; int fd[2]; @@ -77,7 +77,7 @@ struct smtp_client *smtp_client_open(struct mail_deliver_context *ctx, if (pid == 0) { /* child */ (void)close(fd[1]); - smtp_client_run_sendmail(ctx, destination, return_path, fd[0]); + smtp_client_run_sendmail(set, destination, return_path, fd[0]); } (void)close(fd[0]); diff --git a/src/lib-lda/smtp-client.h b/src/lib-lda/smtp-client.h index 24b14b2f5e..a5bb007240 100644 --- a/src/lib-lda/smtp-client.h +++ b/src/lib-lda/smtp-client.h @@ -3,9 +3,9 @@ #include -struct smtp_client *smtp_client_open(struct mail_deliver_context *ctx, - const char *destination, - const char *return_path, FILE **file_r); +struct smtp_client * +smtp_client_open(const struct lda_settings *set, const char *destination, + const char *return_path, FILE **file_r); /* Returns sysexits-compatible return value */ int smtp_client_close(struct smtp_client *client); -- 2.47.3