diff options
author | bertrand <bertrand@helixcode.com> | 2000-03-02 23:09:45 +0800 |
---|---|---|
committer | Bertrand Guiheneuf <bertrand@src.gnome.org> | 2000-03-02 23:09:45 +0800 |
commit | 01b2d34d032d0a675ef5f0fdcb811cdd41d690ed (patch) | |
tree | 3102247d7fd75ad16dc254196f3fa1e35933fe42 /camel/camel-data-wrapper.c | |
parent | d932fda48b3724f516fa5012b80c329644d72bdf (diff) | |
download | gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.tar gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.tar.gz gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.tar.bz2 gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.tar.lz gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.tar.xz gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.tar.zst gsoc2013-evolution-01b2d34d032d0a675ef5f0fdcb811cdd41d690ed.zip |
fix implementation so that it writes properly to the output stream even.
2000-03-02 bertrand <bertrand@helixcode.com>
* camel-data-wrapper.c (my_write_to_stream):
fix implementation so that it writes properly
to the output stream even.
* camel-stream-b64.c (camel_stream_b64_write_to_stream):
fix implementation.
svn path=/trunk/; revision=2013
Diffstat (limited to 'camel/camel-data-wrapper.c')
-rw-r--r-- | camel/camel-data-wrapper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c index 8fc258ac24..7110adcc60 100644 --- a/camel/camel-data-wrapper.c +++ b/camel/camel-data-wrapper.c @@ -236,6 +236,7 @@ my_write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) { gchar tmp_buf[4096]; gint nb_read; + gint nb_written; CamelStream *output_stream; /* @@ -249,8 +250,9 @@ my_write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) while (!camel_stream_eos (output_stream)) { nb_read = camel_stream_read (output_stream, tmp_buf, 4096); - if (nb_read) - camel_stream_write (stream, tmp_buf, nb_read); + nb_written = 0; + while (nb_written < nb_read) + nb_written += camel_stream_write (stream, tmp_buf, nb_read); } } |