Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
set the fd before using it.
Browse files Browse the repository at this point in the history
2001-11-15  Michael Meeks  <michael@ximian.com>

	* glib/giounix.c (g_io_channel_unix_new): set the fd
	before using it.
  • Loading branch information
Michael Meeks authored and Michael Meeks committed Nov 15, 2001
1 parent da611e7 commit 33904bd
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-0
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-10
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-12
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-2
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-4
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-6
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-8
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2001-11-15 Michael Meeks <michael@ximian.com>

* glib/giounix.c (g_io_channel_unix_new): set the fd
before using it.

2001-11-15 Tor Lillqvist <tml@iki.fi>

* tests/makefile.{mingw,msc}.in (TESTS): Add back mainloop-test
Expand Down
4 changes: 2 additions & 2 deletions glib/giounix.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ g_io_channel_unix_new (gint fd)
g_io_channel_init (channel);
channel->funcs = &unix_channel_funcs;

unix_channel->fd = fd;

/* I'm not sure if fstat on a non-file (e.g., socket) works
* it should be safe to say if it fails, the fd isn't seekable.
*/
Expand All @@ -568,8 +570,6 @@ g_io_channel_unix_new (gint fd)
else /* Assume not seekable */
channel->is_seekable = FALSE;

unix_channel->fd = fd;

g_io_unix_get_flags (channel); /* Sets is_readable, is_writeable */

return channel;
Expand Down

0 comments on commit 33904bd

Please sign in to comment.