aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-camel-stream.c4
-rw-r--r--mail/em-sync-stream.c4
3 files changed, 17 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 556a492dfe..80f33e7760 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2005-12-21 Tor Lillqvist <tml@novell.com>
+
+ * em-camel-stream.c (em_camel_stream_init)
+ * em-sync-stream.c (em_sync_stream_init): Use
+ g_io_channel_win32_new_socket() on Win32 instead of
+ g_io_channel_unix_new() to avoid confusion between file
+ descriptors and sockets (which can and do overlap!). We know that
+ e_msgport_fd() returns a socket on Win32.
+
2005-12-21 Not Zed <NotZed@Ximian.com>
* mail-component.c (impl_createView, view_changed_cb): api updates.
diff --git a/mail/em-camel-stream.c b/mail/em-camel-stream.c
index 4b1c3f4a4b..0dc5617ebd 100644
--- a/mail/em-camel-stream.c
+++ b/mail/em-camel-stream.c
@@ -162,7 +162,11 @@ em_camel_stream_init (CamelObject *object)
estream->data_port = e_msgport_new();
estream->reply_port = e_msgport_new();
+#ifndef G_OS_WIN32
estream->gui_channel = g_io_channel_unix_new(e_msgport_fd(estream->data_port));
+#else
+ estream->gui_channel = g_io_channel_win32_new_socket(e_msgport_fd(estream->data_port));
+#endif
estream->gui_watch = g_io_add_watch(estream->gui_channel, G_IO_IN, emcs_gui_received, estream);
estream->used = 0;
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index 2b18f782d9..d6654985c0 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -188,7 +188,11 @@ em_sync_stream_init (CamelObject *object)
p->data_port = e_msgport_new();
p->reply_port = e_msgport_new();
+#ifndef G_OS_WIN32
p->gui_channel = g_io_channel_unix_new(e_msgport_fd(p->data_port));
+#else
+ p->gui_channel = g_io_channel_win32_new_socket(e_msgport_fd(p->data_port));
+#endif
p->gui_watch = g_io_add_watch(p->gui_channel, G_IO_IN, emcs_gui_received, emss);
#ifdef LOG_STREAM