sync with 0.8.3cvs5
authorPaul Mangan <paul@claws-mail.org>
Wed, 25 Sep 2002 06:15:31 +0000 (06:15 +0000)
committerPaul Mangan <paul@claws-mail.org>
Wed, 25 Sep 2002 06:15:31 +0000 (06:15 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.in
src/inc.c
src/pop.c
src/pop.h

index 2243d5d..635b1f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2002-09-24
+
+       * src/addr_compl.c:
+         replace_address_in_edit(): check if newtext is NULL.
+         completion_window_button_press(): fixed a memory leak.
+       * src/pop.c: LOOKUP_NEXT_MSG(): don't expire messages whose
+         recv_time is RECV_TIME_KEEP.
+         pop3_getrange_uidl_recv(): only set get_all flag if
+         ac_prefs->getall is set.
+         pop3_retr_recv(): don't delete messages which are not received
+         by filter, and set recv_time to RECV_TIME_KEEP in the case.
+       * src/pop.h: added an enum RecvTime.
+       * src/inc.c: inc_drop_message(): unlink temporary message file if
+         not received by filter.
+
 2002-09-20
 
        * src/mainwindow.c: added 'Edit/Select thread' menu.
index b395d74..8b452b1 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-25 [paul]      0.8.3claws22
+
+       * sync with 0.8.3cvs5
+               see ChangeLog 2002-09-24
+
 2002-09-24 [alfons]    0.8.3claws21
 
        patch by Satoshi Nagayasu: allows appending / saving multiple 
index efedc95..3201f52 100644 (file)
@@ -1,3 +1,19 @@
+2002-09-24
+
+       * src/addr_compl.c:
+         replace_address_in_edit(): newtext ¤¬ NULL ¤«¤É¤¦¤«¤ò¥Á¥§¥Ã¥¯¡£
+         completion_window_button_press(): ¥á¥â¥ê¥ê¡¼¥¯¤ò½¤Àµ¡£
+       * src/pop.c: LOOKUP_NEXT_MSG(): recv_time ¤¬ RECV_TIME_KEEP ¤Ç¤¢¤ë
+         ¥á¥Ã¥»¡¼¥¸¤ò´ü¸ÂÀÚ¤ì¤Ë¤·¤Ê¤¤¤è¤¦¤Ë¤·¤¿¡£
+         pop3_getrange_uidl_recv(): ac_prefs->getall ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë
+         ¤È¤­¤Î¤ß get_all ¥Õ¥é¥°¤ò¥»¥Ã¥È¡£
+         pop3_retr_recv(): ¥Õ¥£¥ë¥¿¤Ç¼õ¿®¤µ¤ì¤Ê¤«¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤òºï½ü
+         ¤·¤Ê¤¤¤è¤¦¤Ë¤·¡¢¤½¤Î¾ì¹ç recv_time ¤ò RECV_TIME_KEEP ¤ËÀßÄꤹ¤ë
+         ¤è¤¦¤Ë¤·¤¿¡£
+       * src/pop.h: enum RecvTime ¤òÄɲá£
+       * src/inc.c: inc_drop_message(): ¥Õ¥£¥ë¥¿¤Ç¼õ¿®¤µ¤ì¤Ê¤¤¾ì¹ç°ì»þ
+         ¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤ò unlink ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
 2002-09-20
 
        * src/mainwindow.c: ¡ÖÊÔ½¸/¥¹¥ì¥Ã¥É¤òÁªÂò¡×¥á¥Ë¥å¡¼¤òÄɲá£
index 13c9a15..ef1ac8a 100644 (file)
@@ -10,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws21
+EXTRA_VERSION=claws22
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 7f5ce9c..f39bc5a 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -989,7 +989,8 @@ gint inc_drop_message(const gchar *file, Pop3State *state)
                                filter_get_dest_folder(prefs_common.fltlist, file);
                        if (!dropfolder) dropfolder = inbox;
                        else if (!strcmp(dropfolder->path, FILTER_NOT_RECEIVE)) {
-                               g_warning(_("a message won't be received\n"));
+                               debug_print("a message won't be received\n");
+                               unlink(file);
                                return 1;
                        }
                } else
index 76e5ff0..1f201e3 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -59,7 +59,8 @@
                     size > ac->size_limit * 1024);                             \
                                                                                \
                if (ac->rmmail &&                                               \
-                   msg->recv_time != 0 &&                                      \
+                   msg->recv_time != RECV_TIME_NONE &&                         \
+                   msg->recv_time != RECV_TIME_KEEP &&                         \
                    state->current_time - msg->recv_time >=                     \
                    ac->msg_leave_time * 24 * 60 * 60) {                        \
                        log_print(_("POP3: Deleting expired message %d\n"),     \
@@ -337,8 +338,11 @@ gint pop3_getrange_uidl_recv(SockInfo *sock, gpointer data)
        gint next_state;
 
        if (!state->uidl_table) new = TRUE;
+#if 0
        if (state->ac_prefs->getall ||
            (state->ac_prefs->rmmail && state->ac_prefs->msg_leave_time == 0))
+#endif
+       if (state->ac_prefs->getall)
                get_all = TRUE;
 
        if (pop3_ok(sock, NULL) != PS_SUCCESS) {
@@ -368,11 +372,12 @@ gint pop3_getrange_uidl_recv(SockInfo *sock, gpointer data)
                recv_time = (time_t)g_hash_table_lookup(state->uidl_table, id);
                state->msg[num].recv_time = recv_time;
 
-               if (!get_all && recv_time != 0)
+               if (!get_all && recv_time != RECV_TIME_NONE)
                        state->msg[num].received = TRUE;
 
                if (new == FALSE &&
-                   (get_all || recv_time == 0 || state->ac_prefs->rmmail)) {
+                   (get_all || recv_time == RECV_TIME_NONE ||
+                    state->ac_prefs->rmmail)) {
                        state->cur_msg = num;
                        new = TRUE;
                }
@@ -506,6 +511,7 @@ gint pop3_retr_recv(SockInfo *sock, gpointer data)
                        return -1;
                }
 
+               /* drop_ok: 0: success 1: don't receive -1: error */
                drop_ok = inc_drop_message(file, state);
                g_free(file);
                if (drop_ok < 0) {
@@ -521,9 +527,10 @@ gint pop3_retr_recv(SockInfo *sock, gpointer data)
                state->cur_total_num++;
 
                state->msg[state->cur_msg].received = TRUE;
-               state->msg[state->cur_msg].recv_time = state->current_time;
+               state->msg[state->cur_msg].recv_time =
+                       drop_ok == 1 ? RECV_TIME_KEEP : state->current_time;
 
-               if (state->ac_prefs->rmmail &&
+               if (drop_ok == 0 && state->ac_prefs->rmmail &&
                    state->ac_prefs->msg_leave_time == 0)
                        return POP3_DELETE_SEND;
 
@@ -860,8 +867,8 @@ GHashTable *pop3_get_uidl_table(PrefsAccount *ac_prefs)
        GHashTable *table;
        gchar *path;
        FILE *fp;
-       gchar buf[IDLEN + 3];
-       gchar uidl[IDLEN + 3];
+       gchar buf[POPBUFSIZE];
+       gchar uidl[POPBUFSIZE];
        time_t recv_time;
        time_t now;
 
@@ -888,15 +895,15 @@ GHashTable *pop3_get_uidl_table(PrefsAccount *ac_prefs)
 
        while (fgets(buf, sizeof(buf), fp) != NULL) {
                strretchomp(buf);
-               recv_time = 0;
+               recv_time = RECV_TIME_NONE;
                if (sscanf(buf, "%s\t%ld", uidl, &recv_time) != 2) {
                        if (sscanf(buf, "%s", uidl) != 1)
                                continue;
                        else
                                recv_time = now;
                }
-               if (recv_time == 0)
-                       recv_time = 1;
+               if (recv_time == RECV_TIME_NONE)
+                       recv_time = RECV_TIME_RECEIVED;
                g_hash_table_insert(table, g_strdup(uidl),
                                    GINT_TO_POINTER(recv_time));
        }
index b755ec5..bbb5a88 100644 (file)
--- a/src/pop.h
+++ b/src/pop.h
@@ -65,6 +65,12 @@ typedef enum {
        N_POP3_PHASE
 } Pop3Phase;
 
+typedef enum {
+       RECV_TIME_NONE     = 0,
+       RECV_TIME_RECEIVED = 1,
+       RECV_TIME_KEEP     = 2
+} RecvTime;
+
 struct _Pop3MsgInfo
 {
        gint size;