aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-14 06:39:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-14 06:39:09 +0800
commit53874f60c6bd9b14f14e614b5959de85b0aa4a72 (patch)
tree313214495fb3afa2e04c6db63ea3719f581e61ce /camel/providers
parent05cc233af13c41610e0f9460702c6d0a955b29f4 (diff)
downloadgsoc2013-evolution-53874f60c6bd9b14f14e614b5959de85b0aa4a72.tar.gz
gsoc2013-evolution-53874f60c6bd9b14f14e614b5959de85b0aa4a72.tar.zst
gsoc2013-evolution-53874f60c6bd9b14f14e614b5959de85b0aa4a72.zip
Do error-checking based on function return values rather than exceptions
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. svn path=/trunk/; revision=12814
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/local/camel-mbox-folder.c14
1 files changed, 7 insertions, 7 deletions
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;
}