From: Timo Sirainen Date: Tue, 23 Aug 2016 10:40:35 +0000 (+0300) Subject: lib-mail: Clarify istream-attachment-extractor's error handling API usage. X-Git-Tag: 2.3.0.rc1~3111 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3aecee1eb9c37db930a061695bb49efd2cd4abe;p=thirdparty%2Fdovecot%2Fcore.git lib-mail: Clarify istream-attachment-extractor's error handling API usage. --- diff --git a/src/lib-mail/istream-attachment-extractor.h b/src/lib-mail/istream-attachment-extractor.h index 08201c91bf..151566e9ca 100644 --- a/src/lib-mail/istream-attachment-extractor.h +++ b/src/lib-mail/istream-attachment-extractor.h @@ -41,9 +41,12 @@ struct istream_attachment_settings { 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 *