2006-10-05 [colin] 2.5.3cvs8
authorColin Leroy <colin@colino.net>
Thu, 5 Oct 2006 17:26:59 +0000 (17:26 +0000)
committerColin Leroy <colin@colino.net>
Thu, 5 Oct 2006 17:26:59 +0000 (17:26 +0000)
* src/folderview.c
Fix go to next * after preferences apply
* src/msgcache.c
Do the fd lock/unlock ourselves instead of
letting the libc do it at each write

ChangeLog
PATCHSETS
configure.ac
src/folderview.c
src/msgcache.c

index 98794d3fa54425edec7351ec05a37ad8865ddc25..e80ae1b41ce39181f3f55361f8edc38de23fb250 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-05 [colin]     2.5.3cvs8
+
+       * src/folderview.c
+               Fix go to next * after preferences apply
+       * src/msgcache.c
+               Do the fd lock/unlock ourselves instead of
+               letting the libc do it at each write 
+
 2006-10-05 [colin]     2.5.3cvs7
 
        * src/common/utils.c
index 55b6e620f971a993ca91ac002ea0712bb05506a5..12daf493d917423d1f399a9db323b0d30be0ea5a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.213.2.121 -r 1.213.2.122 src/folder.c;  ) > 2.5.3cvs5.patchset
 ( cvs diff -u -r 1.36.2.82 -r 1.36.2.83 src/common/utils.c;  ) > 2.5.3cvs6.patchset
 ( cvs diff -u -r 1.36.2.83 -r 1.36.2.84 src/common/utils.c;  ) > 2.5.3cvs7.patchset
+( cvs diff -u -r 1.207.2.128 -r 1.207.2.129 src/folderview.c;  cvs diff -u -r 1.16.2.44 -r 1.16.2.45 src/msgcache.c;  ) > 2.5.3cvs8.patchset
index b8253b14fbf758c10fb60e55d7c5a4ab61885441..66c68cb30347b76a33cebfd3fedc488011d78de2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f3c31d7ebe69436f8bd5a8c11e5366cacde523c2..c5ab94ae21f012ea9900392ac55f1482a74d1b11 100644 (file)
@@ -2085,6 +2085,7 @@ static void folderview_selected(GtkCTree *ctree, GtkCTreeNode *row,
        item = gtk_ctree_node_get_row_data(ctree, row);
        if (!item || item->no_select) {
                END_TIMING();
+               folderview->open_folder = FALSE;
                return;
        }
 
@@ -2604,6 +2605,7 @@ void folderview_reflect_prefs(void)
                        GTK_CTREE(folderview->ctree), NULL, item);
 
                folderview_select(folderview, item);
+               folderview->open_folder = FALSE;
                folderview->selected = node;
        }
 
index fa29998ced4e7c5b6983b25c014e0948c4332594..49b5eb1dde088788a32ddb13b6bdc3817d0d7321 100644 (file)
@@ -320,7 +320,7 @@ gint msgcache_get_memory_usage(MsgCache *cache)
        guint32 idata;                                  \
                                                        \
        idata = (guint32)bswap_32(n);                   \
-       if (fwrite(&idata, sizeof(idata), 1, fp) != 1)  \
+       if (fwrite_unlocked(&idata, sizeof(idata), 1, fp) != 1) \
                w_err = 1;                              \
        wrote += 4;                                     \
 }
@@ -344,7 +344,7 @@ gint msgcache_get_memory_usage(MsgCache *cache)
                len = strlen(data);                     \
        WRITE_CACHE_DATA_INT(len, fp);                  \
        if (w_err == 0 && len > 0) {                    \
-               if (fwrite(data, 1, len, fp) != len)    \
+               if (fwrite_unlocked(data, 1, len, fp) != len)   \
                        w_err = 1;                      \
                wrote += len;                           \
        } \
@@ -1022,7 +1022,11 @@ gint msgcache_write(const gchar *cache_file, const gchar *mark_file, MsgCache *c
                ftruncate(fileno(write_fps.cache_fp), write_fps.cache_size);
                ftruncate(fileno(write_fps.mark_fp), write_fps.mark_size);
        } else {
+               flockfile(write_fps.cache_fp);
+               flockfile(write_fps.mark_fp);
                g_hash_table_foreach(cache->msgnum_table, msgcache_write_func, (gpointer)&write_fps);
+               funlockfile(write_fps.mark_fp);
+               funlockfile(write_fps.cache_fp);
        }
        
        fflush(write_fps.cache_fp);