2007-01-14 [colin] 2.7.0cvs28
authorColin Leroy <colin@colino.net>
Sun, 14 Jan 2007 17:36:32 +0000 (17:36 +0000)
committerColin Leroy <colin@colino.net>
Sun, 14 Jan 2007 17:36:32 +0000 (17:36 +0000)
* src/etpan/imap-thread.c
Delete the old imap just after allocating
the new one. Makes sure we don't get the
same pointer by sheer luck, which feels
strange in the debug log.

ChangeLog
PATCHSETS
configure.ac
src/etpan/imap-thread.c

index 2a76d9fbaa819b9c02b23fb0d34e7c4099feb004..e5d3ff4f3c6860fc24934234f676053eaf334e78 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-01-14 [colin]     2.7.0cvs28
+
+       * src/etpan/imap-thread.c
+               Delete the old imap just after allocating
+               the new one. Makes sure we don't get the
+               same pointer by sheer luck, which feels
+               strange in the debug log.
+
 2007-01-14 [colin]     2.7.0cvs27
 
        * src/gtk/inputdialog.c
index 3ff397386f389a00d2c8a6d9433089f85ed5e428..2eca3f1e2ae93650fead918c33f254672ad817e3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.66 -r 1.1.4.67 src/etpan/imap-thread.c;  ) > 2.7.0cvs25.patchset
 ( cvs diff -u -r 1.1.4.37 -r 1.1.4.38 src/gtk/gtksctree.c;  ) > 2.7.0cvs26.patchset
 ( cvs diff -u -r 1.2.2.21 -r 1.2.2.22 src/gtk/inputdialog.c;  ) > 2.7.0cvs27.patchset
+( cvs diff -u -r 1.1.4.67 -r 1.1.4.68 src/etpan/imap-thread.c;  ) > 2.7.0cvs28.patchset
index 962ceec4a3d5ea44c37bd50948edba8d4aeb83e5..06673d4fe230b85b8300bc56042a7d688e237e35 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=27
+EXTRA_VERSION=28
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 70696737f89b47468ad21c1235125a8343018055..b31ea52248c33c840449bf2fea0b16e4ea0593b3 100644 (file)
@@ -435,16 +435,17 @@ int imap_threaded_connect(Folder * folder, const char * server, int port)
        struct connect_result result;
        chashdatum key;
        chashdatum value;
-       mailimap * imap;
+       mailimap * imap, * oldimap;
        
-       imap = get_imap(folder);
-       if (imap) {
-               debug_print("deleting old imap %p\n", imap);
-               delete_imap(folder, imap);
-       }
+       oldimap = get_imap(folder);
 
        imap = mailimap_new(0, NULL);
        
+       if (oldimap) {
+               debug_print("deleting old imap %p\n", oldimap);
+               delete_imap(folder, oldimap);
+       }
+       
        key.data = &folder;
        key.len = sizeof(folder);
        value.data = imap;
@@ -512,18 +513,19 @@ int imap_threaded_connect_ssl(Folder * folder, const char * server, int port)
        struct connect_result result;
        chashdatum key;
        chashdatum value;
-       mailimap * imap;
+       mailimap * imap, * oldimap;
        unsigned char *certificate = NULL;
        int cert_len;
-
-       imap = get_imap(folder);
-       if (imap) {
-               debug_print("deleting old imap %p\n", imap);
-               delete_imap(folder, imap);
-       }
+       
+       oldimap = get_imap(folder);
 
        imap = mailimap_new(0, NULL);
        
+       if (oldimap) {
+               debug_print("deleting old imap %p\n", oldimap);
+               delete_imap(folder, oldimap);
+       }
+
        key.data = &folder;
        key.len = sizeof(folder);
        value.data = imap;
@@ -2731,16 +2733,17 @@ int imap_threaded_connect_cmd(Folder * folder, const char * command,
        struct connect_cmd_result result;
        chashdatum key;
        chashdatum value;
-       mailimap * imap;
+       mailimap * imap, * oldimap;
        
-       imap = get_imap(folder);
-       if (imap) {
-               debug_print("deleting old imap %p\n", imap);
-               delete_imap(folder, imap);
-       }
+       oldimap = get_imap(folder);
 
        imap = mailimap_new(0, NULL);
        
+       if (oldimap) {
+               debug_print("deleting old imap %p\n", oldimap);
+               delete_imap(folder, oldimap);
+       }
+
        key.data = &folder;
        key.len = sizeof(folder);
        value.data = imap;