diff options
| author | Jeffrey Stedfast <fejj@ximian.com> | 2003-07-16 02:32:30 +0000 |
|---|---|---|
| committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-07-16 02:32:30 +0000 |
| commit | 4eb6682f51b4d11de230f2e5282b7ebff02fa03a (patch) | |
| tree | f22dbc6c4c7a889d67934742f12e112150127806 | |
| parent | 4379a71eb625a60c62a5ab4c98a75b2116775ec5 (diff) | |
| download | evolution-data-server-4eb6682f51b4d11de230f2e5282b7ebff02fa03a.tar.gz | |
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.
| -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 5a4e8953c..f766ba1b4 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 501f704b6..9f67cd9e4 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 |
