+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
+Wed Sep 19 13:03:38 2001 Owen Taylor <otaylor@redhat.com>
+
+ * glib/giochannel.c (g_io_channel_read/write_chars): Handle NUL
+ bytes_written, bytes_read. (Suggested by Joshua N Pritikin, #59550)
+
Wed Sep 19 12:49:11 2001 Owen Taylor <otaylor@redhat.com>
* glib/gutils.c (g_get_any_init): Handle failure of
g_assert (this_time > 0);
status = channel->funcs->io_write (channel,
- channel->write_buf->str + bytes_written,
- channel->write_buf->len - bytes_written,
- &this_time, error);
+ channel->write_buf->str + bytes_written,
+ channel->write_buf->len - bytes_written,
+ &this_time, error);
bytes_written += this_time;
}
while ((bytes_written < channel->write_buf->len)
if (!channel->use_buffer)
{
+ gint tmp_bytes;
+
g_assert (!channel->read_buf || channel->read_buf->len == 0);
- return channel->funcs->io_read (channel, buf, count, bytes_read, error);
+ status = channel->funcs->io_read (channel, buf, count, &tmp_bytes, error);
+
+ if (bytes_read)
+ *bytes_read = tmp_bytes;
+
+ return status;
}
status = G_IO_STATUS_NORMAL;
if (!channel->use_buffer)
{
+ gint tmp_bytes;
+
g_assert (!channel->write_buf || channel->write_buf->len == 0);
g_assert (channel->partial_write_buf[0] == '\0');
- return channel->funcs->io_write (channel, buf, count, bytes_written, error);
+
+ status = channel->funcs->io_write (channel, buf, count, &tmp_bytes, error);
+
+ if (bytes_written)
+ *bytes_written = tmp_bytes;
+
+ return status;
}
/* General case */