mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
The code didn't compile (must have been sleepy when committing). "return"
2000-07-31 Tor Lillqvist <tml@iki.fi> * giowin32.c (buffer_read): The code didn't compile (must have been sleepy when committing). "return" instead of "break" (g_io_win32_fd_add_watch): Cannot check if the file descriptor is readable by calling ReadFile to read zero bytes. ReadFile blocks on NT even if trying to read nothing at all. So, don't check if file descriptor is readable; assume this function isn't called otherwise.
This commit is contained in:
parent
33efff673a
commit
beed3997ab
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
2000-07-31 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* giowin32.c (buffer_read): The code didn't compile (must
|
||||||
|
have been sleepy when committing). "return" instead of "break"
|
||||||
|
|
||||||
|
(g_io_win32_fd_add_watch): Cannot check if the file descriptor is
|
||||||
|
readable by calling ReadFile to read zero bytes. ReadFile blocks
|
||||||
|
on NT even if trying to read nothing at all. So, don't check if
|
||||||
|
file descriptor is readable; assume this function isn't called
|
||||||
|
otherwise.
|
||||||
|
|
||||||
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
Sun Jul 30 10:44:16 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gmain.c (g_get_current_time): fix tor's recent changes which
|
* gmain.c (g_get_current_time): fix tor's recent changes which
|
||||||
|
10
giowin32.c
10
giowin32.c
@ -273,7 +273,10 @@ buffer_read (GIOWin32Channel *channel,
|
|||||||
WaitForSingleObject (channel->data_avail_event, INFINITE);
|
WaitForSingleObject (channel->data_avail_event, INFINITE);
|
||||||
LOCK (channel->mutex);
|
LOCK (channel->mutex);
|
||||||
if (channel->rdp == channel->wrp && !channel->running)
|
if (channel->rdp == channel->wrp && !channel->running)
|
||||||
break;
|
{
|
||||||
|
UNLOCK (channel->mutex);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel->rdp < channel->wrp)
|
if (channel->rdp < channel->wrp)
|
||||||
@ -635,10 +638,7 @@ g_io_win32_fd_add_watch (GIOChannel *channel,
|
|||||||
g_print ("g_io_win32_fd_add_watch: fd:%d handle:%#x\n",
|
g_print ("g_io_win32_fd_add_watch: fd:%d handle:%#x\n",
|
||||||
win32_channel->fd, watch->pollfd.fd);
|
win32_channel->fd, watch->pollfd.fd);
|
||||||
|
|
||||||
/* Is it readable? (Would be strange to watch it otherwise, but... */
|
create_reader_thread (win32_channel, fd_reader);
|
||||||
if (ReadFile ((HANDLE) _get_osfhandle (win32_channel->fd),
|
|
||||||
dummy, 0, &nbytes, NULL))
|
|
||||||
create_reader_thread (win32_channel, fd_reader);
|
|
||||||
|
|
||||||
g_main_add_poll (&watch->pollfd, priority);
|
g_main_add_poll (&watch->pollfd, priority);
|
||||||
|
|
||||||
|
@ -273,7 +273,10 @@ buffer_read (GIOWin32Channel *channel,
|
|||||||
WaitForSingleObject (channel->data_avail_event, INFINITE);
|
WaitForSingleObject (channel->data_avail_event, INFINITE);
|
||||||
LOCK (channel->mutex);
|
LOCK (channel->mutex);
|
||||||
if (channel->rdp == channel->wrp && !channel->running)
|
if (channel->rdp == channel->wrp && !channel->running)
|
||||||
break;
|
{
|
||||||
|
UNLOCK (channel->mutex);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel->rdp < channel->wrp)
|
if (channel->rdp < channel->wrp)
|
||||||
@ -635,10 +638,7 @@ g_io_win32_fd_add_watch (GIOChannel *channel,
|
|||||||
g_print ("g_io_win32_fd_add_watch: fd:%d handle:%#x\n",
|
g_print ("g_io_win32_fd_add_watch: fd:%d handle:%#x\n",
|
||||||
win32_channel->fd, watch->pollfd.fd);
|
win32_channel->fd, watch->pollfd.fd);
|
||||||
|
|
||||||
/* Is it readable? (Would be strange to watch it otherwise, but... */
|
create_reader_thread (win32_channel, fd_reader);
|
||||||
if (ReadFile ((HANDLE) _get_osfhandle (win32_channel->fd),
|
|
||||||
dummy, 0, &nbytes, NULL))
|
|
||||||
create_reader_thread (win32_channel, fd_reader);
|
|
||||||
|
|
||||||
g_main_add_poll (&watch->pollfd, priority);
|
g_main_add_poll (&watch->pollfd, priority);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user