]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: Clarify istream-attachment-extractor's error handling API usage.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 23 Aug 2016 10:40:35 +0000 (13:40 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 23 Aug 2016 10:48:18 +0000 (13:48 +0300)
src/lib-mail/istream-attachment-extractor.h

index 08201c91bfbaf8c0d19a0d89d8f9c8b2929fdbfe..151566e9ca12c7f0881146bc9e23004136cd4576 100644 (file)
@@ -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 *