Mercurial > dovecot > core-2.2
changeset 20679:db81a0009a43
lib-mail: Clarify istream-attachment-extractor's error handling API usage.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 23 Aug 2016 13:40:35 +0300 |
parents | ff73fdd0558d |
children | eeb777a3ea85 |
files | src/lib-mail/istream-attachment-extractor.h |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-mail/istream-attachment-extractor.h Mon Aug 22 09:42:26 2016 +0300 +++ b/src/lib-mail/istream-attachment-extractor.h Tue Aug 23 13:40:35 2016 +0300 @@ -41,9 +41,12 @@ int (*open_attachment_ostream)(struct istream_attachment_info *info, struct ostream **output_r, const char **error_r, void *context); - /* Finish output stream */ + /* Finish output stream. If success==FALSE, *error contains the error + and the error shouldn't be replaced (other than maybe enhanced). + Otherwise, if close_attachment_ostream() fails and returns -1, it + should also set *error. */ int (*close_attachment_ostream)(struct ostream *output, bool success, - const char **error_r, void *context); + const char **error, void *context); }; struct istream *