Mercurial > dovecot > core-2.2
changeset 12480:77d582b2dc51
lmtp: Recent change broke accessing mail_temp_dir.
Also when it happened, an error message wasn't always logged.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 29 Nov 2010 23:58:19 +0000 |
parents | 5e82c5b1b4a9 |
children | 6ea1671108f1 |
files | src/lmtp/client.c src/lmtp/client.h src/lmtp/commands.c src/lmtp/lmtp-settings.c src/lmtp/lmtp-settings.h |
diffstat | 5 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lmtp/client.c Mon Nov 29 19:13:37 2010 +0000 +++ b/src/lmtp/client.c Mon Nov 29 23:58:19 2010 +0000 @@ -163,7 +163,7 @@ &set_parser, &error) < 0) i_fatal("%s", error); - lmtp_settings_dup(set_parser, client->pool, &client->user_set, + lmtp_settings_dup(set_parser, client->pool, &client->lmtp_set, &client->set); }
--- a/src/lmtp/client.h Mon Nov 29 19:13:37 2010 +0000 +++ b/src/lmtp/client.h Mon Nov 29 23:58:19 2010 +0000 @@ -45,7 +45,6 @@ const struct setting_parser_info *user_set_info; const struct lda_settings *set; const struct lmtp_settings *lmtp_set; - const struct mail_user_settings *user_set; int fd_in, fd_out; struct io *io; struct istream *input;
--- a/src/lmtp/commands.c Mon Nov 29 19:13:37 2010 +0000 +++ b/src/lmtp/commands.c Mon Nov 29 23:58:19 2010 +0000 @@ -757,10 +757,12 @@ /* move everything to a temporary file. */ path = t_str_new(256); - mail_user_set_get_temp_prefix(path, client->user_set); + mail_user_set_get_temp_prefix(path, client->raw_mail_user->set); fd = safe_mkstemp_hostpid(path, 0600, (uid_t)-1, (gid_t)-1); - if (fd == -1) + if (fd == -1) { + i_error("Temp file creation to %s failed: %m", str_c(path)); return -1; + } /* we just want the fd, unlink it */ if (unlink(str_c(path)) < 0) {
--- a/src/lmtp/lmtp-settings.c Mon Nov 29 19:13:37 2010 +0000 +++ b/src/lmtp/lmtp-settings.c Mon Nov 29 23:58:19 2010 +0000 @@ -2,6 +2,7 @@ #include "lib.h" #include "buffer.h" +#include "var-expand.h" #include "settings-parser.h" #include "service-settings.h" #include "master-service.h" @@ -85,14 +86,12 @@ void lmtp_settings_dup(const struct setting_parser_context *set_parser, pool_t pool, - const struct mail_user_settings **user_set_r, const struct lmtp_settings **lmtp_set_r, const struct lda_settings **lda_set_r) { void **sets; sets = settings_parser_get_list(set_parser) + 1; - *user_set_r = settings_dup(&mail_user_setting_parser_info, sets[0], pool); *lda_set_r = settings_dup(&lda_setting_parser_info, sets[1], pool); *lmtp_set_r = settings_dup(&lmtp_setting_parser_info, sets[2], pool); }
--- a/src/lmtp/lmtp-settings.h Mon Nov 29 19:13:37 2010 +0000 +++ b/src/lmtp/lmtp-settings.h Mon Nov 29 23:58:19 2010 +0000 @@ -12,7 +12,6 @@ void lmtp_settings_dup(const struct setting_parser_context *set_parser, pool_t pool, - const struct mail_user_settings **user_set_r, const struct lmtp_settings **lmtp_set_r, const struct lda_settings **lda_set_r);