2007-08-13 [wwp] 2.10.0cvs118
authorTristan Chabredier <wwp@claws-mail.org>
Mon, 13 Aug 2007 21:24:57 +0000 (21:24 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Mon, 13 Aug 2007 21:24:57 +0000 (21:24 +0000)
* src/msgcache.c
Re-enable mmap_reads in Windows with some missing
CloseHandle of mapping objects, thanks to
Marcus Brinkmann.

ChangeLog
PATCHSETS
configure.ac
src/msgcache.c

index da4801f16be877eaa208d8224049852e3611466b..f266f56e242255f6ca4ce88dd557a57bba636ca9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-08-13 [wwp]       2.10.0cvs118
+
+       * src/msgcache.c
+               Re-enable mmap_reads in Windows with some missing
+               CloseHandle of mapping objects, thanks to
+               Marcus Brinkmann.
+
 2007-08-13 [paul]      2.10.0cvs117
 
        * src/common/utils.c
index fed57fb4e5b8816aac31179a7a91e380c99c1983..4349255214a5d42014d4fe828d59126e74c091f6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.10.2.14 -r 1.10.2.15 src/privacy.h;  ) > 2.10.0cvs115.patchset
 ( cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/plugins/pgpcore/prefs_gpg.c;  ) > 2.10.0cvs116.patchset
 ( cvs diff -u -r 1.36.2.107 -r 1.36.2.108 src/common/utils.c;  ) > 2.10.0cvs117.patchset
+( cvs diff -u -r 1.16.2.57 -r 1.16.2.58 src/msgcache.c;  ) > 2.10.0cvs118.patchset
index ec18a538109acf3831af110c077dc5ee24892574..16b794b3f2dd3dc71047a9f2ce83e1773e68c33e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=117
+EXTRA_VERSION=118
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5313f6d6ed87b4a2d28cf7cb87e01365e8ad6681..84bdb67145090e7995b4780b58e7e0299f33ee1f 100644 (file)
         ((x[2]&0xff) << 16) |          \
         ((x[3]&0xff) << 24))
 
-#ifdef G_OS_WIN32
-static gboolean msgcache_use_mmap_read = FALSE;
-#else
 static gboolean msgcache_use_mmap_read = TRUE;
-#endif
 static gboolean msgcache_use_mmap_write = FALSE;
 
 #else
@@ -91,11 +87,7 @@ static gboolean msgcache_use_mmap_write = FALSE;
         ((x[2]&0xff) << 16) |          \
         ((x[3]&0xff) << 24))
 
-#ifdef G_OS_WIN32
-static gboolean msgcache_use_mmap_read = FALSE;
-#else
 static gboolean msgcache_use_mmap_read = TRUE;
-#endif
 static gboolean msgcache_use_mmap_write = FALSE;
 #endif
 
@@ -648,6 +640,7 @@ MsgCache *msgcache_read_cache(FolderItem *item, const gchar *cache_file)
                        if (!hMapping)
                                goto w32_fail;
                        cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+                       CloseHandle (hMapping);
                w32_fail:
                        ;
 #else
@@ -830,6 +823,7 @@ void msgcache_read_mark(MsgCache *cache, const gchar *mark_file)
                        if (!hMapping)
                                goto w32_fail2;
                        cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+                       CloseHandle (hMapping);
                w32_fail2:
                        ;
 #else
@@ -913,6 +907,7 @@ void msgcache_read_tags(MsgCache *cache, const gchar *tags_file)
                        if (!hMapping)
                                goto w32_fail6;
                        cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+                       CloseHandle (hMapping);
                w32_fail6:
                        ;
 #else
@@ -1248,6 +1243,7 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, const gchar
                        if (!hMapping)
                                goto w32_fail3;
                        cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+                       CloseHandle (hMapping);
                w32_fail3:
                        ;
 #else
@@ -1267,6 +1263,7 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, const gchar
                                if (!hMapping)
                                        goto w32_fail4;
                                mark_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+                               CloseHandle (hMapping);
                        w32_fail4:
                                ;
 #else
@@ -1293,6 +1290,7 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, const gchar
                                                if (!hMapping)
                                                        goto w32_fail5;
                                                tags_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+                                               CloseHandle (hMapping);
                                        w32_fail5:
                                                ;
 #else