aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/nntp/camel-nntp-folder.c')
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 6603895596..9f0832bc33 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -4,7 +4,7 @@
* Authors : Chris Toshok <toshok@ximian.com>
* Michael Zucchi <notzed@ximian.com>
*
- * Copyright (C) 2001 Ximian .
+ * Copyright (C) 2001-2003 Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@ -22,16 +22,18 @@
*/
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
-#include <dirent.h>
#include <sys/stat.h>
+#include <dirent.h>
#include <unistd.h>
-#include <errno.h>
-#include <string.h>
#include <fcntl.h>
+#include <errno.h>
#include "camel/camel-file-utils.h"
#include "camel/camel-stream-mem.h"
@@ -48,7 +50,7 @@
#include "camel-nntp-store.h"
#include "camel-nntp-private.h"
-static CamelFolderClass *parent_class=NULL;
+static CamelFolderClass *parent_class = NULL;
/* Returns the class for a CamelNNTPFolder */
#define CNNTPF_CLASS(so) CAMEL_NNTP_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so))
@@ -262,11 +264,9 @@ nntp_folder_init(CamelNNTPFolder *nntp_folder, CamelNNTPFolderClass *klass)
struct _CamelNNTPFolderPrivate *p;
nntp_folder->changes = camel_folder_change_info_new();
-#ifdef ENABLE_THREADS
p = nntp_folder->priv = g_malloc0(sizeof(*nntp_folder->priv));
p->search_lock = g_mutex_new();
p->cache_lock = g_mutex_new();
-#endif
}
static void
@@ -275,12 +275,11 @@ nntp_folder_finalise (CamelNNTPFolder *nntp_folder)
struct _CamelNNTPFolderPrivate *p;
g_free(nntp_folder->storage_path);
-#ifdef ENABLE_THREADS
+
p = nntp_folder->priv;
g_mutex_free(p->search_lock);
g_mutex_free(p->cache_lock);
g_free(p);
-#endif
}
static void