aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-09-11 05:10:49 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-09-11 05:10:49 +0800
commitfbb7f7c202c6c4f8b435702ababe36463132292c (patch)
tree95bcaa3b7dba52abe7c474b1f9d15a64306cba59 /camel/providers
parent59431ce6f1c83c2549a3aca0ecc0b8be32d086a1 (diff)
downloadgsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.tar
gsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.tar.gz
gsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.tar.bz2
gsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.tar.lz
gsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.tar.xz
gsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.tar.zst
gsoc2013-evolution-fbb7f7c202c6c4f8b435702ababe36463132292c.zip
Do proper error checking and return -1 on fail.
2002-09-10 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (perform_content_info_save): Do proper error checking and return -1 on fail. (camel_folder_summary_save): Check the return of perform_content_info_save and a few other output calls within the message_info_save loop. If any of them fail, save errno, close the file, and return -1. If we finish the loop without fail, fflush the stream and then fsync (fflush only flushes user-space buffers, you still need to fsync afterward to flush the data to disk). If either fail, treat it as an exception by saving errno, closing the stream, and returning -1. I suspect that this also fixes bug #30150 because the old code would fclose if fflush or fclose failed in the check after the loop (man fclose(3) states that any further calls using the stream (even another call to fclose) will have undefined behaviour no matter what the first fclose call returned). * providers/local/camel-local-summary.c (camel_local_summary_init): Don't malloc a private struct of 0 size. svn path=/trunk/; revision=18036
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/local/camel-local-summary.c8
-rw-r--r--camel/providers/local/camel-local-summary.h6
2 files changed, 2 insertions, 12 deletions
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index e1007223a0..18c0b80ce5 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -41,11 +41,6 @@
#define CAMEL_LOCAL_SUMMARY_VERSION (0x200)
-struct _CamelLocalSummaryPrivate {
-};
-
-#define _PRIVATE(o) (((CamelLocalSummary *)(o))->priv)
-
static CamelMessageInfo * message_info_new (CamelFolderSummary *, struct _header_raw *);
static int local_summary_decode_x_evolution(CamelLocalSummary *cls, const char *xev, CamelMessageInfo *mi);
@@ -100,11 +95,8 @@ camel_local_summary_class_init(CamelLocalSummaryClass *klass)
static void
camel_local_summary_init(CamelLocalSummary *obj)
{
- struct _CamelLocalSummaryPrivate *p;
struct _CamelFolderSummary *s = (CamelFolderSummary *)obj;
- p = _PRIVATE(obj) = g_malloc0(sizeof(*p));
-
/* subclasses need to set the right instance data sizes */
s->message_info_size = sizeof(CamelMessageInfo);
s->content_info_size = sizeof(CamelMessageContentInfo);
diff --git a/camel/providers/local/camel-local-summary.h b/camel/providers/local/camel-local-summary.h
index fafa992163..0995331ab1 100644
--- a/camel/providers/local/camel-local-summary.h
+++ b/camel/providers/local/camel-local-summary.h
@@ -42,11 +42,9 @@ enum {
struct _CamelLocalSummary {
CamelFolderSummary parent;
-
- struct _CamelLocalSummaryPrivate *priv;
-
+
char *folder_path; /* name of matching folder */
-
+
CamelIndex *index;
unsigned int index_force:1; /* do we force index during creation? */
unsigned int check_force:1; /* does a check force a full check? */