mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-22 07:09:16 +02:00
Pass real &optval and &optlen to getsockopt() instead of NULL. Don't
2003-06-25 Tor Lillqvist <tml@iki.fi> * glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and &optlen to getsockopt() instead of NULL. Don't remember why I thought that NULL could be used (as we don't actually use the returned value for anything), the Platform SDK documentation doesn't imply so.
This commit is contained in:
parent
923e5080fb
commit
98ba2b5ee3
@ -1,3 +1,11 @@
|
|||||||
|
2003-06-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
|
||||||
|
&optlen to getsockopt() instead of NULL. Don't remember why I
|
||||||
|
thought that NULL could be used (as we don't actually use the
|
||||||
|
returned value for anything), the Platform SDK documentation
|
||||||
|
doesn't imply so.
|
||||||
|
|
||||||
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gutils.c (g_path_get_basename): Move the documentation
|
* glib/gutils.c (g_path_get_basename): Move the documentation
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-06-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
|
||||||
|
&optlen to getsockopt() instead of NULL. Don't remember why I
|
||||||
|
thought that NULL could be used (as we don't actually use the
|
||||||
|
returned value for anything), the Platform SDK documentation
|
||||||
|
doesn't imply so.
|
||||||
|
|
||||||
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gutils.c (g_path_get_basename): Move the documentation
|
* glib/gutils.c (g_path_get_basename): Move the documentation
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-06-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
|
||||||
|
&optlen to getsockopt() instead of NULL. Don't remember why I
|
||||||
|
thought that NULL could be used (as we don't actually use the
|
||||||
|
returned value for anything), the Platform SDK documentation
|
||||||
|
doesn't imply so.
|
||||||
|
|
||||||
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gutils.c (g_path_get_basename): Move the documentation
|
* glib/gutils.c (g_path_get_basename): Move the documentation
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-06-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
|
||||||
|
&optlen to getsockopt() instead of NULL. Don't remember why I
|
||||||
|
thought that NULL could be used (as we don't actually use the
|
||||||
|
returned value for anything), the Platform SDK documentation
|
||||||
|
doesn't imply so.
|
||||||
|
|
||||||
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gutils.c (g_path_get_basename): Move the documentation
|
* glib/gutils.c (g_path_get_basename): Move the documentation
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-06-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
|
||||||
|
&optlen to getsockopt() instead of NULL. Don't remember why I
|
||||||
|
thought that NULL could be used (as we don't actually use the
|
||||||
|
returned value for anything), the Platform SDK documentation
|
||||||
|
doesn't imply so.
|
||||||
|
|
||||||
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gutils.c (g_path_get_basename): Move the documentation
|
* glib/gutils.c (g_path_get_basename): Move the documentation
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
2003-06-25 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
|
* glib/giowin32.c (g_io_channel_unix_new): Pass real &optval and
|
||||||
|
&optlen to getsockopt() instead of NULL. Don't remember why I
|
||||||
|
thought that NULL could be used (as we don't actually use the
|
||||||
|
returned value for anything), the Platform SDK documentation
|
||||||
|
doesn't imply so.
|
||||||
|
|
||||||
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
2003-06-19 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gutils.c (g_path_get_basename): Move the documentation
|
* glib/gutils.c (g_path_get_basename): Move the documentation
|
||||||
|
@ -1605,14 +1605,17 @@ GIOChannel *
|
|||||||
g_io_channel_unix_new (gint fd)
|
g_io_channel_unix_new (gint fd)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
int optval, optlen;
|
||||||
|
|
||||||
if (fstat (fd, &st) == 0)
|
if (fstat (fd, &st) == 0)
|
||||||
return g_io_channel_win32_new_fd_internal (fd, &st);
|
return g_io_channel_win32_new_fd_internal (fd, &st);
|
||||||
|
|
||||||
if (getsockopt (fd, SOL_SOCKET, SO_TYPE, NULL, NULL) != SOCKET_ERROR)
|
optlen = sizeof (optval);
|
||||||
|
if (getsockopt (fd, SOL_SOCKET, SO_TYPE, (char *) &optval, &optlen) != SOCKET_ERROR)
|
||||||
return g_io_channel_win32_new_socket(fd);
|
return g_io_channel_win32_new_socket(fd);
|
||||||
|
|
||||||
g_warning (G_STRLOC ": %d is neither a file descriptor or a socket", fd);
|
g_warning (G_STRLOC ": %d is neither a file descriptor or a socket", fd);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user