diff options
author | Dan Winship <danw@src.gnome.org> | 2000-05-09 06:33:39 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-05-09 06:33:39 +0800 |
commit | 3ab48c957cdade2b751d98fda4c37ae2c0d71aee (patch) | |
tree | 09ce1562b087ab1acd6f4c4765acb2f2b8e6ad61 /tests/test13.c | |
parent | 38165888d297d91e1bdf5f1ac6027b900b23b740 (diff) | |
download | gsoc2013-evolution-3ab48c957cdade2b751d98fda4c37ae2c0d71aee.tar.gz gsoc2013-evolution-3ab48c957cdade2b751d98fda4c37ae2c0d71aee.tar.zst gsoc2013-evolution-3ab48c957cdade2b751d98fda4c37ae2c0d71aee.zip |
update for camelstream changes
svn path=/trunk/; revision=2926
Diffstat (limited to 'tests/test13.c')
-rw-r--r-- | tests/test13.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/test13.c b/tests/test13.c index f9fde1720f..3e191eddf5 100644 --- a/tests/test13.c +++ b/tests/test13.c @@ -40,7 +40,7 @@ dump_message_content(CamelDataWrapper *object) left = 0; if (stream) { - while ( (len = camel_stream_read(stream, buffer+left, sizeof(buffer)-left)) > 0) { + while ( (len = camel_stream_read(stream, buffer+left, sizeof(buffer)-left, NULL)) > 0) { fwrite(buffer, len, 1, stdout); } printf("\n"); @@ -95,7 +95,7 @@ main (int argc, char**argv) message = camel_mime_message_new (); - input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0); + input_stream = camel_stream_fs_new_with_name ("mail.test", O_RDONLY, 0, NULL); if (!input_stream) { perror ("could not open input file\n"); printf ("You must create the file mail.test before running this test\n"); @@ -110,12 +110,11 @@ main (int argc, char**argv) dump_message_content(CAMEL_DATA_WRAPPER (message)); - camel_stream_close (input_stream); gtk_object_unref (GTK_OBJECT (input_stream)); - output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_CREAT|O_TRUNC, 0600); - camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream); - camel_stream_close (output_stream); + output_stream = camel_stream_fs_new_with_name ("mail2.test", O_WRONLY|O_CREAT|O_TRUNC, 0600, NULL); + camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), output_stream, NULL); + camel_stream_flush (output_stream, NULL); gtk_object_unref (GTK_OBJECT (output_stream)); //gtk_object_unref (GTK_OBJECT (message)); |