sync with 0.9.2cvs9
authorPaul Mangan <paul@claws-mail.org>
Mon, 30 Jun 2003 06:21:21 +0000 (06:21 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 30 Jun 2003 06:21:21 +0000 (06:21 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/common/socket.c
src/common/socket.h
src/mimeview.c

index fe4a377..a01ecc6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-06-30
+
+       * src/socket.c: check return value in SSL functions.
+
+2003-06-30
+
+       * src/mimeview.c: mimeview_init(): initialize TextView to prevent
+         slowdown caused by GTK+ themes (thanks to Yuri Arapov).
+
 2003-06-27
 
        * src/session.c: session_read_data_cb(): clear Session::read_data_buf
index 357ab11..95da3a5 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-30 [paul]      0.9.0claws69
+
+       * sync with 0.9.2cvs9
+               see ChangeLog 2003-06-30
+
 2003-06-28 [match]     0.9.0claws68
 
        * src/addressbook.c
index 9e19ada..51332d2 100644 (file)
@@ -1,3 +1,12 @@
+2003-06-30
+
+       * src/socket.c: SSL ´Ø¿ô¤ÇÌá¤êÃͤò¥Á¥§¥Ã¥¯¡£
+
+2003-06-30
+
+       * src/mimeview.c: mimeview_init(): GTK+ ¥Æ¡¼¥Þ¤Ë¤è¤ë®ÅÙÄã²¼¤òËɤ°
+         ¤¿¤á¤Ë TextView ¤ò½é´ü²½(Yuri Arapov ¤µ¤ó thanks)¡£
+
 2003-06-27
 
        * src/session.c: session_read_data_cb(): ¥³¡¼¥ë¥Ð¥Ã¥¯¤ò¸Æ¤ÖÁ°¤Ë
index 80cfe8e..c178a04 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws68
+EXTRA_VERSION=claws69
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index a843d5f..0b9764f 100644 (file)
@@ -925,7 +925,24 @@ gint fd_read(gint fd, gchar *buf, gint len)
 #if USE_OPENSSL
 gint ssl_read(SSL *ssl, gchar *buf, gint len)
 {
-       return SSL_read(ssl, buf, len);
+       gint ret;
+
+       ret = SSL_read(ssl, buf, len);
+
+       switch (SSL_get_error(ssl, ret)) {
+       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:
+               return -1;
+       }
 }
 #endif
 
@@ -958,7 +975,24 @@ gint fd_write(gint fd, const gchar *buf, gint len)
 #if USE_OPENSSL
 gint ssl_write(SSL *ssl, const gchar *buf, gint len)
 {
-       return SSL_write(ssl, buf, len);
+       gint ret;
+
+       ret = SSL_write(ssl, buf, len);
+
+       switch (SSL_get_error(ssl, ret)) {
+       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:
+               return -1;
+       }
 }
 #endif
 
@@ -1007,7 +1041,7 @@ gint ssl_write_all(SSL *ssl, const gchar *buf, gint len)
        gint n, wrlen = 0;
 
        while (len) {
-               n = SSL_write(ssl, buf, len);
+               n = ssl_write(ssl, buf, len);
                if (n <= 0)
                        return -1;
                len -= n;
@@ -1076,11 +1110,11 @@ gint ssl_gets(SSL *ssl, gchar *buf, gint len)
        if (--len < 1)
                return -1;
        do {
-               if ((n = SSL_peek(ssl, bp, len)) <= 0)
+               if ((n = ssl_peek(ssl, bp, len)) <= 0)
                        return -1;
                if ((newline = memchr(bp, '\n', n)) != NULL)
                        n = newline - bp + 1;
-               if ((n = SSL_read(ssl, bp, n)) < 0)
+               if ((n = ssl_read(ssl, bp, n)) < 0)
                        return -1;
                bp += n;
                len -= n;
@@ -1186,13 +1220,37 @@ gint sock_puts(SockInfo *sock, const gchar *buf)
 }
 
 /* peek at the socket data without actually reading it */
+#if USE_OPENSSL
+gint ssl_peek(SSL *ssl, gchar *buf, gint len)
+{
+       gint ret;
+
+       ret = SSL_peek(ssl, buf, len);
+
+       switch (SSL_get_error(ssl, ret)) {
+       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:
+               return -1;
+       }
+}
+#endif
+
 gint sock_peek(SockInfo *sock, gchar *buf, gint len)
 {
        g_return_val_if_fail(sock != NULL, -1);
 
 #if USE_OPENSSL
        if (sock->ssl)
-               return SSL_peek(sock->ssl, buf, len);
+               return ssl_peek(sock->ssl, buf, len);
 #endif
        return fd_recv(sock->sock, buf, len, MSG_PEEK);
 }
index 9e4fe89..2660cda 100644 (file)
@@ -107,6 +107,7 @@ gint ssl_write              (SSL *ssl, const gchar *buf, gint len);
 gint ssl_write_all     (SSL *ssl, const gchar *buf, gint len);
 gint ssl_gets          (SSL *ssl, gchar *buf, gint len);
 gint ssl_getline       (SSL *ssl, gchar **str);
+gint ssl_peek          (SSL *ssl, gchar *buf, gint len);
 #endif
 
 #endif /* __SOCKET_H__ */
index 0c73a49..3a3d8fa 100644 (file)
@@ -226,6 +226,7 @@ MimeView *mimeview_create(void)
 
 void mimeview_init(MimeView *mimeview)
 {
+       textview_init(mimeview->textview);
 }
 
 /*