From 7a1dfcef582242643fabd50688e0421ff398d645 Mon Sep 17 00:00:00 2001 From: 1 Date: Wed, 31 Oct 2001 23:55:45 +0000 Subject: Same as below. 2001-10-31 * providers/local/camel-spool-folder.c (spool_get_message): Same as below. * providers/local/camel-maildir-folder.c (maildir_get_message): Same as below. * providers/local/camel-mbox-folder.c (mbox_get_message): Set USER_CANCEL if failed due to EINTR. * camel-filter-driver.c (camel_filter_driver_filter_mbox): If construct from parser fails due to user cancel, set USER_CANCEL on exception. * camel-mime-part.c (construct_from_parser): Return error if the parser had an io error. * camel-mime-message.c (construct_from_parser): Check error on parser/return error. * camel-mime-parser.c (folder_scan_init): Init error number. (camel_mime_parser_errno): New function, return errno of any io failures. (folder_read): Set errno if a failure occured. (folder_seek): Same. (folder_scan_init_with_fd): Setup errno depeding on ok/failure. (folder_scan_init_with_stream): Same. svn path=/trunk/; revision=14559 --- camel/camel-mime-part.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'camel/camel-mime-part.c') diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c index 55eb4a7492..303fba6c7d 100644 --- a/camel/camel-mime-part.c +++ b/camel/camel-mime-part.c @@ -30,6 +30,8 @@ #include #include +#include + #include #include "hash-table-utils.h" @@ -663,6 +665,7 @@ construct_from_parser(CamelMimePart *dw, CamelMimeParser *mp) const char *content; char *buf; int len; + int err; d(printf("mime_part::construct_from_parser()\n")); @@ -696,6 +699,13 @@ construct_from_parser(CamelMimePart *dw, CamelMimeParser *mp) #ifndef NO_WARNINGS #warning "Need to work out how to detect a (fatally) bad parse in the parser" #endif + + err = camel_mime_parser_errno(mp); + if (err != 0) { + errno = err; + return -1; + } + return 0; } -- cgit v1.2.3