2004-08-09 [colin] 0.9.12cvs56
authorColin Leroy <colin@colino.net>
Mon, 9 Aug 2004 17:02:41 +0000 (17:02 +0000)
committerColin Leroy <colin@colino.net>
Mon, 9 Aug 2004 17:02:41 +0000 (17:02 +0000)
* src/main.c
* src/common/ssl.c
* src/common/sylpheed.c
* src/common/sylpheed.h
Reverting previous commit, doesn't work

ChangeLog.claws
PATCHSETS
configure.ac
src/common/ssl.c
src/common/sylpheed.c
src/common/sylpheed.h
src/main.c

index e30d3444af439623b5f6cd7832f234940c3b990d..e09cca3dca07a549985a15818f0aca9be2ee4394 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-09 [colin]     0.9.12cvs56
+
+       * src/main.c
+       * src/common/ssl.c
+       * src/common/sylpheed.c
+       * src/common/sylpheed.h
+               Reverting previous commit, doesn't work 
+
 2004-08-09 [colin]     0.9.12cvs55
 
        * src/main.c
index 11dd82d87c43723d5425424ba4738be6d7cec3a9..3634c49f034e2ef6198f729a3131112af07aa5dd 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -37,3 +37,4 @@
 ( cvs diff -u -r 1.5 -r 1.6 src/folderutils.c; ) > 0.9.12cvs53.patchset
 ( cvs diff -u -r 1.71 -r 1.72 po/POTFILES.in; cvs diff -u -r 1.138 -r 1.139 src/main.c ) > 0.9.12cvs54.patchset
 ( cvs diff -u -r 1.139 -r 1.140 src/main.c; cvs diff -u -r 1.13 -r 1.14 src/common/ssl.c; cvs diff -u -r 1.7 -r 1.8 src/common/sylpheed.c; cvs diff -u -r 1.5 -r 1.6 src/common/sylpheed.h; ) > 0.9.12cvs55.patchset
+( cvs diff -u -r 1.140 -r 1.141 src/main.c; cvs diff -u -r 1.14 -r 1.15 src/common/ssl.c; cvs diff -u -r 1.8 -r 1.9 src/common/sylpheed.c; cvs diff -u -r 1.6 -r 1.7 src/common/sylpheed.h; ) > 0.9.12cvs56.patchset
index 274e5014b6d5974d9245d34e8f8c892b3c1e3a6e..59fcaaa1b4e8a2816244c75021f4f03f55815e47 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=55
+EXTRA_VERSION=56
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index f063ec818bd94cd4fb9ebd31c34d269369a80a24..27f9fdf3956a5d8e75bbac7e8d24524c7f6f6fde 100644 (file)
 
 #include <glib.h>
 
-#include "sylpheed.h"
 #include "intl.h"
 #include "utils.h"
 #include "ssl.h"
 #include "ssl_certificate.h"
 
-#ifdef USE_PTHREAD
-#include <pthread.h>
-#endif
-
-#ifdef USE_PTHREAD
-typedef struct _thread_data {
-       SSL *ssl;
-       gboolean done;
-} thread_data;
-#endif
-
-
 static SSL_CTX *ssl_ctx;
 
 void ssl_init(void)
@@ -75,52 +62,6 @@ void ssl_done(void)
        SSL_CTX_free(ssl_ctx);
 }
 
-#ifdef USE_PTHREAD
-void *SSL_connect_thread(void *data)
-{
-       thread_data *td = (thread_data *)data;
-       int result = SSL_connect(td->ssl);
-       td->done = TRUE; /* let the caller thread join() */
-       return GINT_TO_POINTER(result);
-}
-#endif
-
-gint SSL_connect_nb(SSL *ssl)
-{
-#ifdef USE_PTHREAD
-       thread_data *td = g_new0(thread_data, 1);
-       pthread_t pt;
-       void *res = NULL;
-       
-       td->ssl  = ssl;
-       td->done = FALSE;
-       
-       /* try to create a thread to initialize the SSL connection,
-        * fallback to blocking method in case of problem 
-        */
-       if (pthread_create(&pt, PTHREAD_CREATE_JOINABLE, 
-                       SSL_connect_thread, td) != 0)
-               return SSL_connect(ssl);
-       
-       debug_print("waiting for SSL_connect thread...\n");
-       while(!td->done) {
-               /* don't let the interface freeze while waiting */
-               sylpheed_do_idle();
-       }
-
-       /* get the thread's return value and clean its resources */
-       pthread_join(pt, &res);
-       g_free(td);
-
-       debug_print("SSL_connect thread returned %d\n", 
-                       GPOINTER_TO_INT(res));
-       
-       return GPOINTER_TO_INT(res);
-#else
-       return SSL_connect(ssl);
-#endif
-}
-
 gboolean ssl_init_socket(SockInfo *sockinfo)
 {
        return ssl_init_socket_with_method(sockinfo, SSL_METHOD_SSLv23);
@@ -151,7 +92,7 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
        }
 
        SSL_set_fd(ssl, sockinfo->sock);
-       if (SSL_connect_nb(ssl) == -1) {
+       if (SSL_connect(ssl) == -1) {
                g_warning(_("SSL connect failed (%s)\n"),
                            ERR_error_string(ERR_get_error(), NULL));
                SSL_free(ssl);
index 4e2ee2e9396755b4a28fc657597f1692f964a7a5..e00231e2622ed3ae4f3469f0650caa999b21460d 100644 (file)
@@ -37,7 +37,6 @@
 
 static gboolean sylpheed_initialized = FALSE;
 static gchar *startup_dir;
-static void (*sylpheed_idle_function)(void) = NULL;
 
 /**
  * Parse program parameters and remove all parameters
@@ -135,14 +134,3 @@ guint sylpheed_get_version(void)
 {
        return VERSION_NUMERIC;
 }
-
-void sylpheed_register_idle_function   (void (*idle_func)(void))
-{
-       sylpheed_idle_function = idle_func;
-}
-
-void sylpheed_do_idle(void)
-{
-       if (sylpheed_idle_function != NULL)
-               sylpheed_idle_function();
-}
index 8233def87ed7a30d6883f26fd57c2db88218e50d..f7a9b1bfd039b265bd231f721751059e758ebe34 100644 (file)
@@ -26,7 +26,5 @@ gboolean sylpheed_init                        (int *argc, char ***argv);
 void sylpheed_done                     (void);
 const gchar *sylpheed_get_startup_dir  (void);
 guint sylpheed_get_version             (void);
-void sylpheed_register_idle_function   (void (*idle_func)(void));
-void sylpheed_do_idle                  (void);
 
 #endif /* SYLPHEED_H */
index c3538405a6f503d18ca51346ae427cc184f974d3..7a78821006988123dc94c8a271b1d5dd3614261a 100644 (file)
@@ -165,12 +165,6 @@ _("File `%s' already exists.\n"
 
 static MainWindow *static_mainwindow;
 
-void sylpheed_gtk_idle(void) 
-{
-       while(gtk_events_pending())
-               gtk_main_iteration();
-}
-
 int main(int argc, char *argv[])
 {
        gchar *userrc;
@@ -357,8 +351,6 @@ int main(int argc, char *argv[])
                cmd.status_full_folders = NULL;
        }
 
-       sylpheed_register_idle_function(sylpheed_gtk_idle);
-
        prefs_toolbar_init();
 
        plugin_load_all("GTK");