sync with 0.9.3
authorPaul Mangan <paul@claws-mail.org>
Fri, 4 Jul 2003 09:30:36 +0000 (09:30 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 4 Jul 2003 09:30:36 +0000 (09:30 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/common/defs.h
src/common/session.c
src/common/socket.c
src/common/socket.h
src/send_message.c

index 2a4b660..0832bcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2003-07-04
+
+       * version 0.9.3
+
+2003-07-04
+
+       * src/defs.h: changed UI_REFRESH_INTERVAL from 40msec to 50msec.
+       * src/session.c: session_read_msg_cb(): make it always fail if
+         sock_read() returns by error.
+       * src/socket.[ch]: sock_check(): handle exceptional SSL condition.
+         sock_has_pending_data(): removed.
+         Removed debug output.
+       * src/send_message.c: send_recv_message(): display messages to
+         statusbar.
+
 2003-07-03
 
        * src/inc.[ch]: update received message number on CList while
index 66e1904..05c2fb7 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-04 [paul]      0.9.0claws77
+
+       * sync with 0.9.3 release
+               see ChangeLog 2003-07-04
+
 2003-07-03 [christoph] 0.9.0claws76
 
        * src/folder.[ch]
index b9d3e53..02046da 100644 (file)
@@ -1,3 +1,18 @@
+2003-07-04
+
+       * version 0.9.3
+
+2003-07-04
+
+       * src/defs.h: UI_REFRESH_INTERVAL ¤ò 40msec ¤«¤é 50msec ¤ËÊѹ¹¡£
+       * src/session.c: session_read_msg_cb(): sock_read() ¤¬¥¨¥é¡¼¤Ç
+         ÊÖ¤ë¤È¤­¤Ï¾ï¤Ë¼ºÇÔ¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£
+       * src/socket.[ch]: sock_check(): Î㳰Ū¤Ê SSL ¤Î¾õÂÖ¤ËÂбþ¡£
+         sock_has_pending_data(): ºï½ü¡£
+         ¥Ç¥Ð¥Ã¥°½ÐÎϤòºï½ü¡£
+       * src/send_message.c: send_recv_message(): ¥á¥Ã¥»¡¼¥¸¤ò¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼
+         ¤Ëɽ¼¨¡£
+
 2003-07-03
 
        * src/inc.[ch]: ¼õ¿®Ãæ¤Ë CList ¤Î¼õ¿®ºÑ¥á¥Ã¥»¡¼¥¸¿ô¤ò¹¹¿·¡£
index d0e8f4b..f03df2b 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws76
+EXTRA_VERSION=claws77
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index f036613..7b3ff35 100644 (file)
@@ -99,7 +99,7 @@
 #define FOLDER_SPACING                 4
 #define MAX_ENTRY_LENGTH               8191
 #define COLOR_DIM                      35000
-#define UI_REFRESH_INTERVAL            40000   /* usec */
+#define UI_REFRESH_INTERVAL            50000   /* usec */
 #define SESSION_TIMEOUT                        60      /* sec */
 #define MAX_HISTORY_SIZE               16
 
index 8e66924..25618c1 100644 (file)
@@ -171,6 +171,7 @@ void session_destroy(Session *session)
        g_return_if_fail(session->destroy != NULL);
 
        debug_print("session: session_destroy()\n");
+
        session_close(session);
        session->destroy(session);
        g_free(session->server);
@@ -401,14 +402,9 @@ static gboolean session_read_msg_cb(SockInfo *source, GIOCondition condition,
 
        /* this should always succeed */
        if (read_len < 0) {
-               switch (errno) {
-               case EAGAIN:
-                       return TRUE;
-               default:
-                       g_warning("sock_read: %s\n", g_strerror(errno));
-                       session->state = SESSION_ERROR;
-                       return FALSE;
-               }
+               g_warning("sock_read: %s\n", g_strerror(errno));
+               session->state = SESSION_ERROR;
+               return FALSE;
        }
 
        buf[read_len] = '\0';
index 581c683..8b5f073 100644 (file)
@@ -282,14 +282,20 @@ static gboolean sock_check(gpointer source_data, GTimeVal *current_time,
        SockInfo *sock = (SockInfo *)source_data;
        struct timeval timeout = {0, 0};
        fd_set fds;
+       GIOCondition condition = sock->condition;
 
 #if USE_OPENSSL
        if (sock->ssl) {
-               if (sock->condition & G_IO_IN) {
-                       if (SSL_pending(sock->ssl) > 0) {
-                               g_print("SSL has pending data\n");
+               if (condition & G_IO_IN) {
+                       if (SSL_pending(sock->ssl) > 0)
                                return TRUE;
-                       }
+                       if (SSL_want_write(sock->ssl))
+                               condition |= G_IO_OUT;
+               }
+
+               if (condition & G_IO_OUT) {
+                       if (SSL_want_read(sock->ssl))
+                               condition |= G_IO_IN;
                }
        }
 #endif
@@ -298,8 +304,8 @@ static gboolean sock_check(gpointer source_data, GTimeVal *current_time,
        FD_SET(sock->sock, &fds);
 
        select(sock->sock + 1,
-              (sock->condition & G_IO_IN)  ? &fds : NULL,
-              (sock->condition & G_IO_OUT) ? &fds : NULL,
+              (condition & G_IO_IN)  ? &fds : NULL,
+              (condition & G_IO_OUT) ? &fds : NULL,
               NULL, &timeout);
 
        return FD_ISSET(sock->sock, &fds) != 0;
@@ -337,31 +343,6 @@ guint sock_add_watch(SockInfo *sock, GIOCondition condition, SockFunc func,
        return g_io_add_watch(sock->sock_ch, condition, sock_watch_cb, sock);
 }
 
-gboolean sock_has_pending_data(SockInfo *sock)
-{
-       struct timeval timeout = {0, 0};
-       fd_set fds;
-
-#if USE_OPENSSL
-       if (sock->ssl) {
-               if (SSL_pending(sock->ssl) > 0)
-                       g_print("socket has pending data\n");
-
-               return SSL_pending(sock->ssl) > 0;
-       }
-#endif
-
-       FD_ZERO(&fds);
-       FD_SET(sock->sock, &fds);
-
-       select(sock->sock + 1, &fds, NULL, NULL, &timeout);
-
-       if (FD_ISSET(sock->sock, &fds))
-               g_print("socket has pending data\n");
-
-       return FD_ISSET(sock->sock, &fds);
-}
-
 static gint fd_check_io(gint fd, GIOCondition cond)
 {
        struct timeval timeout;
@@ -1046,11 +1027,7 @@ gint ssl_read(SSL *ssl, gchar *buf, gint len)
        case SSL_ERROR_NONE:
                return ret;
        case SSL_ERROR_WANT_READ:
-               g_print("ssl_read(): SSL_ERROR_WANT_READ\n");
-               errno = EAGAIN;
-               return -1;
        case SSL_ERROR_WANT_WRITE:
-               g_print("ssl_read(): SSL_ERROR_WANT_WRITE\n");
                errno = EAGAIN;
                return -1;
        default:
@@ -1096,11 +1073,7 @@ gint ssl_write(SSL *ssl, const gchar *buf, gint len)
        case SSL_ERROR_NONE:
                return ret;
        case SSL_ERROR_WANT_READ:
-               g_print("ssl_write(): SSL_ERROR_WANT_READ\n");
-               errno = EAGAIN;
-               return -1;
        case SSL_ERROR_WANT_WRITE:
-               g_print("ssl_write(): SSL_ERROR_WANT_WRITE\n");
                errno = EAGAIN;
                return -1;
        default:
@@ -1344,11 +1317,7 @@ gint ssl_peek(SSL *ssl, gchar *buf, gint len)
        case SSL_ERROR_NONE:
                return ret;
        case SSL_ERROR_WANT_READ:
-               g_print("ssl_peek(): SSL_ERROR_WANT_READ\n");
-               errno = EAGAIN;
-               return -1;
        case SSL_ERROR_WANT_WRITE:
-               g_print("ssl_peek(): SSL_ERROR_WANT_WRITE\n");
                errno = EAGAIN;
                return -1;
        default:
index 20b996c..a600dd2 100644 (file)
@@ -74,8 +74,6 @@ gboolean sock_is_nonblocking_mode     (SockInfo *sock);
 guint sock_add_watch                   (SockInfo *sock, GIOCondition condition,
                                         SockFunc func, gpointer data);
 
-gboolean sock_has_pending_data         (SockInfo *sock);
-
 struct hostent *my_gethostbyname       (const gchar *hostname);
 
 SockInfo *sock_connect                 (const gchar *hostname, gushort port);
index ea9a105..349dfac 100644 (file)
 #include "procheader.h"
 #include "account.h"
 #include "progressdialog.h"
+#include "statusbar.h"
 #include "inputdialog.h"
 #include "alertpanel.h"
 #include "manage_window.h"
 #include "utils.h"
 #include "gtkutils.h"
-#include "statusbar.h"
 #include "inc.h"
 #include "log.h"
 
@@ -454,10 +454,12 @@ static gint send_recv_message(Session *session, const gchar *msg, gpointer data)
        case SMTP_HELO:
                g_snprintf(buf, sizeof(buf), _("Sending HELO..."));
                state_str = _("Authenticating");
+               statusbar_print_all(_("Sending message..."));
                break;
        case SMTP_EHLO:
                g_snprintf(buf, sizeof(buf), _("Sending EHLO..."));
                state_str = _("Authenticating");
+               statusbar_print_all(_("Sending message..."));
                break;
        case SMTP_AUTH:
                g_snprintf(buf, sizeof(buf), _("Authenticating..."));