dovecot-2.0: smtp_client_open() API changed to take lda_settings...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 17 20:05:39 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/882a0a6cc92e
changeset: 9805:882a0a6cc92e
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 17 13:05:32 2009 -0400
description:
smtp_client_open() API changed to take lda_settings instead of mail_deliver_context.
diffstat:
3 files changed, 11 insertions(+), 11 deletions(-)
src/lib-lda/mail-send.c | 4 ++--
src/lib-lda/smtp-client.c | 12 ++++++------
src/lib-lda/smtp-client.h | 6 +++---
diffs (80 lines):
diff -r 620183ce36f9 -r 882a0a6cc92e src/lib-lda/mail-send.c
--- a/src/lib-lda/mail-send.c Mon Aug 17 12:55:29 2009 -0400
+++ b/src/lib-lda/mail-send.c Mon Aug 17 13:05:32 2009 -0400
@@ -79,7 +79,7 @@ int mail_send_rejection(struct mail_deli
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_delive
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 -r 620183ce36f9 -r 882a0a6cc92e src/lib-lda/smtp-client.c
--- a/src/lib-lda/smtp-client.c Mon Aug 17 12:55:29 2009 -0400
+++ b/src/lib-lda/smtp-client.c Mon Aug 17 13:05:32 2009 -0400
@@ -28,7 +28,7 @@ static struct smtp_client *smtp_client_d
}
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_del
/* 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_del
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(str
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 -r 620183ce36f9 -r 882a0a6cc92e src/lib-lda/smtp-client.h
--- a/src/lib-lda/smtp-client.h Mon Aug 17 12:55:29 2009 -0400
+++ b/src/lib-lda/smtp-client.h Mon Aug 17 13:05:32 2009 -0400
@@ -3,9 +3,9 @@
#include <stdio.h>
-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);
More information about the dovecot-cvs
mailing list