aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-data-wrapper.c
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-03-03 10:54:25 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-03-03 10:54:25 +0800
commit2392d67981785dac17f56305f8ee3fc0b5884694 (patch)
tree40b56668dd5c95dbe50fd6f1b70c67d7ac2dac73 /camel/camel-data-wrapper.c
parent9cf31d6b063eacf768ea835fad15377aaddf6dc1 (diff)
downloadgsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.gz
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.bz2
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.lz
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.xz
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.zst
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.zip
don't forget to set the state to 0 after 3. (my_read_encode): don't forget
2000-03-02 bertrand <bertrand@helixcode.com> * camel-stream-b64.c (my_read_encode): don't forget to set the state to 0 after 3. (my_read_encode): don't forget to encode, even in state 3. * camel-simple-data-wrapper.c: static functions are prefixed with my_ instead of _ * camel-multipart.c: static functions are prefixed with my_ instead of _ (my_write_to_stream): commented. (my_write_to_stream): warning in case the boudary is set but is a zero length string. * camel-mime-part.c (camel_mime_part_encoding_from_string): remove debug trace. * camel-mime-part.c: Replaced all static functions with name begining with _ by the same name begining with "my_" to prevent the possible conflicts with system symbols Dan warned us about. Mime mail generation works now, at least with b64 encoding. QP needs to be done now. svn path=/trunk/; revision=2016
Diffstat (limited to 'camel/camel-data-wrapper.c')
-rw-r--r--camel/camel-data-wrapper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c
index 7110adcc60..cd4fcce7de 100644
--- a/camel/camel-data-wrapper.c
+++ b/camel/camel-data-wrapper.c
@@ -146,6 +146,9 @@ my_set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
{
g_assert (data_wrapper);
data_wrapper->input_stream = stream;
+ if (!data_wrapper->output_stream && stream)
+ data_wrapper->output_stream = stream;
+
if (stream)
gtk_object_ref (GTK_OBJECT (stream));
}
@@ -252,7 +255,7 @@ my_write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream)
nb_read = camel_stream_read (output_stream, tmp_buf, 4096);
nb_written = 0;
while (nb_written < nb_read)
- nb_written += camel_stream_write (stream, tmp_buf, nb_read);
+ nb_written += camel_stream_write (stream, tmp_buf + nb_written, nb_read - nb_written);
}
}