sync with 0.8.11cvs39
authorPaul Mangan <paul@claws-mail.org>
Tue, 6 May 2003 09:17:37 +0000 (09:17 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 6 May 2003 09:17:37 +0000 (09:17 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/common/ssl.c
src/pop.c
src/pop.h

index 0fceb82..a9f4be0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-06
+
+       * src/ssl.c: ssl_init_socket_with_method(): replaced log_warning()
+         by g_warning(), and log_print() by debug_print().
+       * src/pop.[ch]: added an error code PS_NOTSUPPORTED, and retry with
+         LAST if UIDL is not supported.
+
 2003-05-01
 
        * src/codeconv.c: conv_get_code_conv_func(): convert to EUC-JP only
@@ -6,7 +13,7 @@
 2003-05-01
 
        * src/action.c: execute_actions(): fixed crash when no text widget
-         is selected.
+         is selected (thanks to Paul and Melvin).
        * src/action.c
          src/prefs_actions.c: added missing reference to Claws team in the
          copyright.
index b9fbf8c..d76a719 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-06 [paul]      0.8.11claws143
+
+       * sync with 0.8.11cvs39
+               see ChangeLog 2003-05-06
+
 2003-05-06 [paul]      0.8.11claws142
 
        * AUTHORS
index dcf4095..118abb9 100644 (file)
@@ -1,3 +1,10 @@
+2003-05-06
+
+       * src/ssl.c: ssl_init_socket_with_method(): log_warning() ¤ò
+         g_warning() ¤Ç¡¢ log_print() ¤ò debug_print() ¤ÇÃÖ¤­´¹¤¨¤¿¡£
+       * src/pop.[ch]: ¥¨¥é¡¼¥³¡¼¥É PS_NOTSUPPORTED ¤òÄɲä·¡¢ UIDL ¤¬
+         ¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð LAST ¤ÇºÆ»î¹Ô¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+
 2003-05-01
 
        * src/codeconv.c: conv_get_code_conv_func(): dest_charset_str ¤¬ NULL
@@ -7,7 +14,7 @@
 2003-05-01
 
        * src/action.c: execute_actions(): ¥Æ¥­¥¹¥È¥¦¥£¥¸¥§¥Ã¥È¤¬Ì¤ÁªÂò¤Î
-         ¾ì¹ç¥¯¥é¥Ã¥·¥å¤¹¤ë¤Î¤ò½¤Àµ¡£
+         ¾ì¹ç¥¯¥é¥Ã¥·¥å¤¹¤ë¤Î¤ò½¤Àµ(Paul ¤µ¤ó¤È Melvin ¤µ¤ó thanks)¡£
        * src/action.c
          src/prefs_actions.c: Ãøºî¸¢É½¼¨¤Ë Claws ¥Á¡¼¥à¤Îɽ¼¨¤¬¤Ê¤«¤Ã¤¿¤Î¤Ç
          Äɲá£
index 549d26f..92de9b6 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws142
+EXTRA_VERSION=claws143
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 2f328d5..ebd397a 100644 (file)
@@ -30,7 +30,6 @@
 #include "intl.h"
 #include "utils.h"
 #include "ssl.h"
-#include "log.h"
 #include "ssl_certificate.h"
 
 static SSL_CTX *ssl_ctx;
@@ -85,7 +84,7 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
 
        ssl = SSL_new(ssl_ctx);
        if (ssl == NULL) {
-               log_warning(_("Error creating ssl context\n"));
+               g_warning(_("Error creating ssl context\n"));
                return FALSE;
        }
 
@@ -104,14 +103,16 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
 
        SSL_set_fd(ssl, sockinfo->sock);
        if (SSL_connect(ssl) == -1) {
-               log_warning(_("SSL connect failed (%s)\n"),
+               g_warning(_("SSL connect failed (%s)\n"),
                            ERR_error_string(ERR_get_error(), NULL));
                SSL_free(ssl);
                return FALSE;
        }
 
        /* Get the cipher */
-       log_print(_("SSL connection using %s\n"), SSL_get_cipher(ssl));
+
+       debug_print(_("SSL connection using %s\n"),
+                   SSL_get_cipher(sockinfo->ssl));
 
        /* Get server's certificate (note: beware of dynamic allocation) */
        if ((server_cert = SSL_get_peer_certificate(ssl)) == NULL) {
index c55448b..5c73b5b 100644 (file)
--- a/src/pop.c
+++ b/src/pop.c
@@ -271,7 +271,6 @@ static gint pop3_getsize_list_send(Pop3Session *session)
 static gint pop3_getsize_list_recv(Pop3Session *session, const gchar *msg)
 {
        guint num, size;
-       gint next_state;
 
        if (msg[0] == '.')
                return PS_SUCCESS;
@@ -644,6 +643,11 @@ static Pop3ErrorValue pop3_ok(Pop3Session *session, const gchar *msg)
                                log_warning(_("error occurred on authentication\n"));
                                ok = PS_AUTHFAIL;
                                break;
+                       case POP3_GETRANGE_LAST:
+                       case POP3_GETRANGE_UIDL:
+                               log_warning(_("command not supported\n"));
+                               ok = PS_NOTSUPPORTED;
+                               break;
                        default:
                                log_warning(_("error occurred on POP3 session\n"));
                                ok = PS_ERROR;
@@ -663,7 +667,7 @@ static Pop3ErrorValue pop3_ok(Pop3Session *session, const gchar *msg)
 static gint pop3_session_recv_msg(Session *session, const gchar *msg)
 {
        Pop3Session *pop3_session = POP3_SESSION(session);
-       Pop3ErrorValue val;
+       Pop3ErrorValue val = PS_SUCCESS;
        const gchar *body;
 
        body = msg;
@@ -671,8 +675,10 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
            pop3_session->state != POP3_GETSIZE_LIST_RECV) {
                val = pop3_ok(pop3_session, msg);
                if (val != PS_SUCCESS) {
-                       pop3_session->state = POP3_ERROR;
-                       return -1;
+                       if (val != PS_NOTSUPPORTED) {
+                               pop3_session->state = POP3_ERROR;
+                               return -1;
+                       }
                }
 
                if (*body == '+' || *body == '-')
@@ -723,7 +729,9 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
                        pop3_logout_send(pop3_session);
                break;
        case POP3_GETRANGE_LAST:
-               if (pop3_getrange_last_recv(pop3_session, body) < 0)
+               if (val == PS_NOTSUPPORTED)
+                       pop3_session->error_val = PS_SUCCESS;
+               else if (pop3_getrange_last_recv(pop3_session, body) < 0)
                        return -1;
                if (pop3_session->cur_msg > 0)
                        pop3_getsize_list_send(pop3_session);
@@ -731,8 +739,14 @@ static gint pop3_session_recv_msg(Session *session, const gchar *msg)
                        pop3_logout_send(pop3_session);
                break;
        case POP3_GETRANGE_UIDL:
-               pop3_session->state = POP3_GETRANGE_UIDL_RECV;
-               return 1;
+               if (val == PS_NOTSUPPORTED) {
+                       pop3_session->error_val = PS_SUCCESS;
+                       pop3_getrange_last_send(pop3_session);
+               } else {
+                       pop3_session->state = POP3_GETRANGE_UIDL_RECV;
+                       return 1;
+               }
+               break;
        case POP3_GETRANGE_UIDL_RECV:
                val = pop3_getrange_uidl_recv(pop3_session, body);
                if (val == PS_CONTINUE)
index 5f99893..67d3d2a 100644 (file)
--- a/src/pop.h
+++ b/src/pop.h
@@ -75,6 +75,8 @@ typedef enum {
        PS_BSMTP        = 12,   /* output batch could not be opened */
        PS_MAXFETCH     = 13,   /* poll ended by fetch limit */
 
+       PS_NOTSUPPORTED = 14,   /* command not supported */
+
        /* leave space for more codes */
 
        PS_UNDEFINED    = 23,   /* something I hadn't thought of */