From 527a42249344f1eb654b54f37420225a56ec88fd Mon Sep 17 00:00:00 2001 From: Andy Lanoix Date: Mon, 2 Jul 2001 23:57:19 +0000 Subject: [PATCH] *giowin32.c: g_source_remove()ing an socket iochannel closes the socket when it should not. Patch by Peter Zelezny *giowin32.c: Fix a few typos --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-12 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ glib/giowin32.c | 10 +++------- 9 files changed, 67 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ca174e..a9a1dea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1ca174e..a9a1dea 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Mon Jul 2 19:48:52 2001 Andrew Lanoix + + *giowin32.c: g_source_remove()ing an socket iochannel closes + the socket when it should not. Patch by Peter Zelezny + + + *giowin32.c: Fix a few typos + Mon Jul 2 16:03:21 2001 Owen Taylor * glib/giochannel.c (g_io_channel_get_buffer_condition): Fix. diff --git a/glib/giowin32.c b/glib/giowin32.c index af184ce..740f57d 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -170,7 +170,6 @@ static unsigned __stdcall read_thread (void *parameter) { GIOWin32Channel *channel = parameter; - GSList *tmp; guchar *buffer; guint nbytes; @@ -464,10 +463,7 @@ select_thread (void *parameter) LOCK (channel->mutex); if (channel->fd != -1) { - if (channel->debug) - g_print ("select_thread %#x: channel fd %d needs closing\n", - channel->thread_id, channel->fd); - closesocket (channel->fd); + /* DO NOT close the fd here */ channel->fd = -1; } @@ -691,7 +687,7 @@ g_io_win32_msg_write (GIOChannel *channel, memmove (&msg, buf, sizeof (MSG)); if (!PostMessage (win32_channel->hwnd, msg.message, msg.wParam, msg.lParam)) { - g_set_error(err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED + g_set_error(err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, _("Unknown error")); /* Correct error message? FIXME */ return G_IO_STATUS_ERROR; } @@ -707,7 +703,7 @@ g_io_win32_no_seek (GIOChannel *channel, GSeekType type, GError **err) { - g_set_error(error, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_SPIPE, + g_set_error(err, G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_SPIPE, _("Seeking not allowed on this type of channel")); return G_IO_STATUS_ERROR; -- 2.7.4