2006-10-27 [colin] 2.5.6cvs8
authorColin Leroy <colin@colino.net>
Fri, 27 Oct 2006 08:54:27 +0000 (08:54 +0000)
committerColin Leroy <colin@colino.net>
Fri, 27 Oct 2006 08:54:27 +0000 (08:54 +0000)
* src/folder.c
* src/imap.c
Probably fix bug 1044, 'sylpheed-claws
segfaults while moving mails' - Fix relation
usage when moving to an IMAP mailbox from another
mailbox

ChangeLog
PATCHSETS
configure.ac
src/folder.c
src/imap.c

index b1e9498a975e84d98104491671ebf613a51f5d7a..873b595b1df0a9d3dee1d2e15316f033196147d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-10-27 [colin]     2.5.6cvs8
+
+       * src/folder.c
+       * src/imap.c
+               Probably fix bug 1044, 'sylpheed-claws 
+               segfaults while moving mails' - Fix relation
+               usage when moving to an IMAP mailbox from another
+               mailbox
+
 2006-10-26 [paul]      2.5.6cvs7
 
        * src/gtk/about.c
index efb0d637a12a410cd807a53c0b6fbdae7c951f4f..38ee7fdb4bb4fca196ac448d20d1697b42e05233 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 manual/es/advanced.xml;  cvs diff -u -r 1.60.2.36 -r 1.60.2.37 po/es.po;  ) > 2.5.6cvs5.patchset
 ( cvs diff -u -r 1.96.2.156 -r 1.96.2.157 src/textview.c;  cvs diff -u -r 1.5.2.40 -r 1.5.2.41 src/gtk/gtkutils.c;  ) > 2.5.6cvs6.patchset
 ( cvs diff -u -r 1.4.2.35 -r 1.4.2.36 src/gtk/about.c;  ) > 2.5.6cvs7.patchset
+( cvs diff -u -r 1.213.2.122 -r 1.213.2.123 src/folder.c;  cvs diff -u -r 1.179.2.134 -r 1.179.2.135 src/imap.c;  ) > 2.5.6cvs8.patchset
index fc7746d328eaf82b2f9464edc2d50678525e2e2e..cb86f227a0c7b876db5c18aaf72ddc316e061d7a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 14deda3ba157952e6ec1bd9c0e51d204aa686f6f..4fd32c36ca5ed87e2eb57d8710b43c60d2052c11 100644 (file)
@@ -3036,11 +3036,15 @@ static gint do_copy_msgs(FolderItem *dest, GSList *msglist, gboolean remove_sour
 
                        tuples = g_relation_select(relation, msginfo, 0);
                        if (tuples) {
-                               num = GPOINTER_TO_INT(g_tuples_index(tuples, 0, 1));
+                               if (tuples->len)
+                                       num = GPOINTER_TO_INT(g_tuples_index(tuples, 0, 1));
+                               else
+                                       num = 0;
                                g_tuples_destroy(tuples);
                        } else {
                                num = -1;
                        }
+
                        if (g_slist_find(not_moved, msginfo))
                                continue;
 
@@ -3073,9 +3077,14 @@ static gint do_copy_msgs(FolderItem *dest, GSList *msglist, gboolean remove_sour
                 GTuples *tuples;
 
                 tuples = g_relation_select(relation, msginfo, 0);
-                num = GPOINTER_TO_INT(g_tuples_index(tuples, 0, 1));
-                g_tuples_destroy(tuples);
-
+               if (tuples->len > 0) {
+                       num = GPOINTER_TO_INT(g_tuples_index(tuples, 0, 1));
+                       g_tuples_destroy(tuples);
+               } else {
+                       num = 0;
+                       if (tuples)
+                               g_tuples_destroy(tuples);
+               }
                statusbar_progress_all(curmsg++,total, 100);
                if (curmsg % 100 == 0)
                        GTK_EVENTS_FLUSH();
index ecfeead3e7f3a9b4fcf28c060b9abaa510ccfebe..4baf6502d7633377c37c1e26d5535a0671b72030 100644 (file)
@@ -1277,7 +1277,7 @@ static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest,
                if (tuples->len > 0) {
                        gint num = GPOINTER_TO_INT(g_tuples_index(tuples, 0, 1));
                        g_relation_insert(relation, msginfo,
-                                         GPOINTER_TO_INT(num));
+                                         GINT_TO_POINTER(num));
                        if (num > last_num)
                                last_num = num;
                        debug_print("copied new message as %d\n", num);
@@ -1306,7 +1306,7 @@ static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest,
                        }
                } else
                        g_relation_insert(relation, msginfo,
-                                         GPOINTER_TO_INT(0));
+                                         GINT_TO_POINTER(0));
                g_tuples_destroy(tuples);
        }
        statusbar_pop_all();