Commit e669b218 authored by Ron Steinke's avatar Ron Steinke
Browse files

Matthias Classen's patch to give g_io_channel_flush() the correct sense


        * glib/giochannel.c: Matthias Classen's patch to give
        g_io_channel_flush() the correct sense when testing
        whether the buffer is empty
        * glib/giounix.c: Matthias Classen's patch to set
        the mode of a file created with g_io_channel_new_file()
parent 9599c062
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
2001-07-29 Ron Steinke <rsteinke@w-link.net>
* glib/giochannel.c: Matthias Classen's patch to give
g_io_channel_flush() the correct sense when testing
whether the buffer is empty
* glib/giounix.c: Matthias Classen's patch to set
the mode of a file created with g_io_channel_new_file()
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
......
......@@ -821,7 +821,7 @@ g_io_channel_flush (GIOChannel *channel,
g_return_val_if_fail (channel != NULL, G_IO_STATUS_ERROR);
g_return_val_if_fail ((error == NULL) || (*error == NULL), G_IO_STATUS_ERROR);
if (channel->write_buf && channel->write_buf->len > 0)
if (channel->write_buf == NULL || channel->write_buf->len == 0)
return G_IO_STATUS_NORMAL;
do
......
......@@ -410,6 +410,7 @@ g_io_channel_new_file (const gchar *filename,
GError **error)
{
int fid, flags;
mode_t create_mode;
GIOChannel *channel;
enum { /* Cheesy hack */
MODE_R = 1 << 0,
......@@ -479,7 +480,8 @@ g_io_channel_new_file (const gchar *filename,
flags = 0;
}
fid = open (filename, flags);
create_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
fid = open (filename, flags, create_mode);
if (fid < 0)
{
g_set_error (error, G_FILE_ERROR,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment