diff options
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/providers/local/camel-mbox-folder.c | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 3a184b28db..b4b8ef8338 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,10 @@ 2001-09-13 Jeffrey Stedfast <fejj@ximian.com> + * providers/local/camel-mbox-folder.c (mbox_append_message): Do + error-checking based on function return values rather than + exceptions as it's possible for them to be NULL. + (mbox_get_message): Same. + * providers/imap/camel-imap-folder.c (imap_append_offline): Pass an exception to the cache. (imap_append_online): Same. diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c index ccdce9c61e..c7d09f4af2 100644 --- a/camel/providers/local/camel-mbox-folder.c +++ b/camel/providers/local/camel-mbox-folder.c @@ -181,7 +181,7 @@ mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const Camel CamelMboxSummary *mbs = (CamelMboxSummary *)folder->summary; CamelMessageInfo *mi; char *fromline = NULL; - int fd; + int fd, retval; struct stat st; #if 0 char *xev; @@ -193,13 +193,13 @@ mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const Camel d(printf("Appending message\n")); /* first, check the summary is correct (updates folder_size too) */ - camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex); - if (camel_exception_is_set(ex)) + retval = camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex); + if (retval == -1) goto fail; /* add it to the summary/assign the uid, etc */ mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, ex); - if (camel_exception_is_set(ex)) + if (mi == NULL) goto fail; d(printf("Appending message: uid is %s\n", camel_message_info_uid(mi))); @@ -310,7 +310,7 @@ mbox_get_message(CamelFolder *folder, const gchar * uid, CamelException *ex) CamelMimeMessage *message; CamelMboxMessageInfo *info; CamelMimeParser *parser; - int fd; + int fd, retval; int retried = FALSE; d(printf("Getting message %s\n", uid)); @@ -367,8 +367,8 @@ retry: if (!retried) { retried = TRUE; - camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, ex); - if (!camel_exception_is_set(ex)) + retval = camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, ex); + if (retval != -1) goto retry; } |