diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-07-16 10:32:30 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-07-16 10:32:30 +0800 |
commit | 6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2 (patch) | |
tree | 076e6508458fc2fc6e45ec6dd0d7ea4ae9ef0a99 /camel | |
parent | 32380aa7c9a7d50f47d7b50780c560da6ce5fe3c (diff) | |
download | gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.tar gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.tar.gz gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.tar.bz2 gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.tar.lz gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.tar.xz gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.tar.zst gsoc2013-evolution-6c397fa70c89c4e3dbcab5b30901a64dbc5b89a2.zip |
If we read 0 bytes, then set eos to TRUE.
2003-07-15 Jeffrey Stedfast <fejj@ximian.com>
* camel-stream-fs.c (stream_read): If we read 0 bytes, then set
eos to TRUE.
svn path=/trunk/; revision=21820
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 9 | ||||
-rw-r--r-- | camel/camel-stream-fs.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 5a4e8953cb..f766ba1b49 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,7 +1,12 @@ +2003-07-15 Jeffrey Stedfast <fejj@ximian.com> + + * camel-stream-fs.c (stream_read): If we read 0 bytes, then set + eos to TRUE. + 2003-07-09 Jeffrey Stedfast <fejj@ximian.com> - Get rid of the #ifdef ENABLE_THREADS since - we no longer plan to support/maintain this. + Get rid of the #ifdef ENABLE_THREADS since we no longer plan to + support/maintain this. * providers/nntp/camel-nntp-store.c: Here. diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c index 501f704b6d..9f67cd9e40 100644 --- a/camel/camel-stream-fs.c +++ b/camel/camel-stream-fs.c @@ -215,11 +215,15 @@ stream_read (CamelStream *stream, char *buffer, size_t n) { CamelStreamFs *stream_fs = CAMEL_STREAM_FS (stream); CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream); + ssize_t nread; if (seekable->bound_end != CAMEL_STREAM_UNBOUND) n = MIN (seekable->bound_end - seekable->position, n); - return camel_read (stream_fs->fd, buffer, n); + if ((nread = camel_read (stream_fs->fd, buffer, n)) == 0) + stream->eos = TRUE; + + return nread; } static ssize_t |