From 51493afff8624177bd9e804b2f74474b59f7eebe Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 21 Dec 2005 14:10:25 +0000 Subject: em-camel-stream.c (em_camel_stream_init) Use 2005-12-21 Tor Lillqvist * 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. svn path=/trunk/; revision=30923 --- mail/ChangeLog | 9 +++++++++ mail/em-camel-stream.c | 4 ++++ mail/em-sync-stream.c | 4 ++++ 3 files changed, 17 insertions(+) (limited to 'mail') 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 + + * 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 * 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 -- cgit v1.2.3