sync with sylpheed 0.7.3cvs1 (bug fix)
authorPaul Mangan <paul@claws-mail.org>
Wed, 6 Mar 2002 09:06:40 +0000 (09:06 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 6 Mar 2002 09:06:40 +0000 (09:06 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/inc.c
src/inc.h
src/pop.c

index 9547587..b7ad4ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-05
+
+       * src/inc.c: inc_write_uidl_list(): fixed a bug that lost UIDL
+         information if any errors occured before issuing UIDL command.
+         src/inc.h: added uidl_is_valid to Pop3State.
+         src/pop.c: set uidl_is_valid to TRUE if UIDL becomes valid.
+
 2002-03-03
 
        * version 0.7.3
index 1d14194..fb4a79a 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-06 [paul]      0.7.2claws33
+
+       * sync with sylpheed 0.7.3cvs1
+               bug fix, see ChangeLog entry 2002-03-05
+
 2002-03-05 [paul]      0.7.2claws32
 
        * src/mimeview.c
index 748e4b0..1d275c7 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-05
+
+       * src/inc.c: inc_write_uidl_list(): UIDL ¥³¥Þ¥ó¥É¤òȯ¹Ô¤¹¤ëÁ°¤Ë
+         ²¿¤«¥¨¥é¡¼¤¬µ¯¤³¤ë¤È UIDL ¾ðÊ󤬼º¤ï¤ì¤Æ¤·¤Þ¤¦¥Ð¥°¤ò½¤Àµ¡£
+         src/inc.h: uidl_is_valid ¤ò Pop3State ¤ËÄɲá£
+         src/pop.c: UIDL ¤¬Í­¸ú¤Ë¤Ê¤ì¤Ð uidl_is_valid ¤ò TRUE ¤Ë¤¹¤ë¡£
+
 2002-03-03
 
        * version 0.7.3
index 2cd0d29..81051b8 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws32
+EXTRA_VERSION=claws33
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index f2e4112..8a20a27 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -395,7 +395,7 @@ static Pop3State *inc_pop3_state_new(PrefsAccount *account)
 
        state->ac_prefs = account;
        state->folder_table = g_hash_table_new(NULL, NULL);
-       state->id_table = inc_get_uidl_table(account);
+       state->uidl_table = inc_get_uidl_table(account);
        state->inc_state = INC_SUCCESS;
 
        return state;
@@ -411,9 +411,9 @@ static void inc_pop3_state_destroy(Pop3State *state)
                g_free(state->msg[n].uidl);
        g_free(state->msg);
 
-       if (state->id_table) {
-               hash_free_strings(state->id_table);
-               g_hash_table_destroy(state->id_table);
+       if (state->uidl_table) {
+               hash_free_strings(state->uidl_table);
+               g_hash_table_destroy(state->uidl_table);
        }
 
        g_free(state->greeting);
@@ -774,6 +774,8 @@ static void inc_write_uidl_list(Pop3State *state)
        FILE *fp;
        gint n;
 
+       if (!state->uidl_is_valid) return;
+
        path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
                           "uidl-", state->ac_prefs->recv_server,
                           "-", state->user, NULL);
index 02696af..184f0fc 100644 (file)
--- a/src/inc.h
+++ b/src/inc.h
@@ -88,7 +88,9 @@ struct _Pop3State
 
        Pop3MsgInfo *msg;
 
-       GHashTable *id_table;
+       GHashTable *uidl_table;
+
+       gboolean uidl_is_valid;
 
        gint error_val;
        IncState inc_state;
index e5d4498..fbc976f 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -216,9 +216,10 @@ gint pop3_getrange_stat_recv(SockInfo *sock, gpointer data)
                        log_warning(_("POP3 protocol error\n"));
                        return -1;
                } else {
-                       if (state->count == 0)
+                       if (state->count == 0) {
+                               state->uidl_is_valid = TRUE;
                                return POP3_LOGOUT_SEND;
-                       else {
+                       else {
                                state->msg = g_new0
                                        (Pop3MsgInfo, state->count + 1);
                                state->cur_msg = 1;
@@ -286,7 +287,7 @@ gint pop3_getrange_uidl_recv(SockInfo *sock, gpointer data)
 
        if (pop3_ok(sock, NULL) != PS_SUCCESS) return POP3_GETRANGE_LAST_SEND;
 
-       if (!state->id_table) new = TRUE;
+       if (!state->uidl_table) new = TRUE;
        if (state->ac_prefs->rmmail || state->ac_prefs->getall)
                get_all = TRUE;
 
@@ -300,9 +301,9 @@ gint pop3_getrange_uidl_recv(SockInfo *sock, gpointer data)
 
                state->msg[num].uidl = g_strdup(id);
 
-               if (state->id_table) {
+               if (state->uidl_table) {
                        if (!get_all &&
-                           g_hash_table_lookup(state->id_table, id) != NULL)
+                           g_hash_table_lookup(state->uidl_table, id) != NULL)
                                state->msg[num].received = TRUE;
                        else {
                                if (new == FALSE) {
@@ -313,6 +314,8 @@ gint pop3_getrange_uidl_recv(SockInfo *sock, gpointer data)
                }
        }
 
+       state->uidl_is_valid = TRUE;
+
        if (new == TRUE)
                return POP3_GETSIZE_LIST_SEND;
        else