[libgdata] core: Don't reach EOF in gdata_buffer_pop_data() unless it's the last read
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Don't reach EOF in gdata_buffer_pop_data() unless it's the last read
- Date: Mon, 20 Dec 2010 13:48:18 +0000 (UTC)
commit 9170ed2d603397a12be1cbfafd6408b7c37de98a
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Dec 16 23:37:09 2010 +0000
core: Don't reach EOF in gdata_buffer_pop_data() unless it's the last read
Helps: bgo#637036
gdata/gdata-buffer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-buffer.c b/gdata/gdata-buffer.c
index 4cd4d2d..c62d9d3 100644
--- a/gdata/gdata-buffer.c
+++ b/gdata/gdata-buffer.c
@@ -232,7 +232,7 @@ gdata_buffer_pop_data (GDataBuffer *self, guint8 *data, gsize length_requested,
/* Set reached_eof */
if (reached_eof != NULL)
- *reached_eof = self->reached_eof;
+ *reached_eof = self->reached_eof && length_requested >= self->total_length;
if (self->reached_eof == TRUE && length_requested > self->total_length) {
/* Return data up to the EOF */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]