set the fd before using it.
authorMichael Meeks <michael@ximian.com>
Thu, 15 Nov 2001 00:13:52 +0000 (00:13 +0000)
committerMichael Meeks <michael@src.gnome.org>
Thu, 15 Nov 2001 00:13:52 +0000 (00:13 +0000)
2001-11-15  Michael Meeks  <michael@ximian.com>

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

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/giounix.c

index 49b969a..8b93fae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index 49b969a..8b93fae 100644 (file)
@@ -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
index c2db911..34ba4e9 100644 (file)
@@ -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.
    */
@@ -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;