2008-09-20 [colin] 3.5.0cvs116
authorColin Leroy <colin@colino.net>
Sat, 20 Sep 2008 08:15:55 +0000 (08:15 +0000)
committerColin Leroy <colin@colino.net>
Sat, 20 Sep 2008 08:15:55 +0000 (08:15 +0000)
* src/etpan/etpan-thread-manager.c
* src/etpan/imap-thread.c
* src/etpan/nntp-thread.c
Windows: Fix hang on IMAP/NNTP

ChangeLog
PATCHSETS
configure.ac
src/etpan/etpan-thread-manager.c
src/etpan/imap-thread.c
src/etpan/nntp-thread.c

index 262ab6c..d8d8cab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-20 [colin]     3.5.0cvs116
+
+       * src/etpan/etpan-thread-manager.c
+       * src/etpan/imap-thread.c
+       * src/etpan/nntp-thread.c
+               Windows: Fix hang on IMAP/NNTP
+
 2008-09-20 [colin]     3.5.0cvs115
 
        * src/common/utils.c
index 24f0bfc..a89465a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.94.2.186 -r 1.94.2.187 src/messageview.c;  cvs diff -u -r 1.49.2.115 -r 1.49.2.116 src/procmime.c;  cvs diff -u -r 1.96.2.206 -r 1.96.2.207 src/textview.c;  cvs diff -u -r 1.1.4.32 -r 1.1.4.33 src/gtk/logwindow.c;  cvs diff -u -r 1.1.4.15 -r 1.1.4.16 src/gtk/logwindow.h;  ) > 3.5.0cvs113.patchset
 ( cvs diff -u -r 1.49.2.116 -r 1.49.2.117 src/procmime.c;  cvs diff -u -r 1.96.2.207 -r 1.96.2.208 src/textview.c;  ) > 3.5.0cvs114.patchset
 ( cvs diff -u -r 1.36.2.146 -r 1.36.2.147 src/common/utils.c;  ) > 3.5.0cvs115.patchset
+( cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/etpan/etpan-thread-manager.c;  cvs diff -u -r 1.1.4.104 -r 1.1.4.105 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/etpan/nntp-thread.c;  ) > 3.5.0cvs116.patchset
index c43282a..372c05e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=115
+EXTRA_VERSION=116
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 51ae402..7fe3cd1 100644 (file)
@@ -283,10 +283,13 @@ static void manager_notify(struct etpan_thread_manager * manager)
 
 static void manager_ack(struct etpan_thread_manager * manager)
 {
+#ifndef G_OS_WIN32
   char ch;
   ssize_t r;
-  
   r = read(manager->notify_fds[0], &ch, 1);
+#else
+  /* done in the GIOChannel handler in imap-thread.c and nntp-thread.c */
+#endif
 }
 
 static void thread_lock(struct etpan_thread * thread)
index 30f3a60..6fa914c 100644 (file)
@@ -81,6 +81,13 @@ static gboolean thread_manager_event(GIOChannel * source,
     GIOCondition condition,
     gpointer data)
 {
+#ifdef G_OS_WIN32
+       gsize bytes_read;
+       gchar ch;
+       
+       if (condition & G_IO_IN)
+               g_io_channel_read_chars(source, &ch, 1, &bytes_read, NULL);
+#endif
        etpan_thread_manager_loop(thread_manager);
        
        return TRUE;
@@ -272,8 +279,11 @@ void imap_main_init(gboolean skip_ssl_cert_check)
        
        fd_thread_manager = etpan_thread_manager_get_fd(thread_manager);
        
+#ifndef G_OS_WIN32
        io_channel = g_io_channel_unix_new(fd_thread_manager);
-       
+#else
+       io_channel = g_io_channel_win32_new_fd(fd_thread_manager);
+#endif
        thread_manager_signal = g_io_add_watch_full(io_channel, 0, G_IO_IN,
                                                    thread_manager_event,
                                                    (gpointer) NULL,
index f21e383..78bdcc5 100644 (file)
@@ -116,6 +116,13 @@ static gboolean thread_manager_event(GIOChannel * source,
     GIOCondition condition,
     gpointer data)
 {
+#ifdef G_OS_WIN32
+       gsize bytes_read;
+       gchar ch;
+       
+       if (condition & G_IO_IN)
+               g_io_channel_read_chars(source, &ch, 1, &bytes_read, NULL);
+#endif
        etpan_thread_manager_loop(thread_manager);
        
        return TRUE;
@@ -137,7 +144,11 @@ void nntp_main_init(gboolean skip_ssl_cert_check)
        
        fd_thread_manager = etpan_thread_manager_get_fd(thread_manager);
        
+#ifndef G_OS_WIN32
        io_channel = g_io_channel_unix_new(fd_thread_manager);
+#else
+       io_channel = g_io_channel_win32_new_fd(fd_thread_manager);
+#endif
        
        thread_manager_signal = g_io_add_watch_full(io_channel, 0, G_IO_IN,
                                                    thread_manager_event,