diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-01-03 18:04:28 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-01-03 18:30:32 +0200 |
commit | efa513048a74fca2e3ab1b16cc927f8331347f75 (patch) | |
tree | 06360b65fed31192dd5b51cb5cf53ba5f8060083 /libmailutils/tests/Makefile.am | |
parent | 3a6ea349ae7b1a941acd6ec882e93ad5b3a27ca4 (diff) | |
download | mailutils-efa513048a74fca2e3ab1b16cc927f8331347f75.tar.gz mailutils-efa513048a74fca2e3ab1b16cc927f8331347f75.tar.bz2 |
Make sure modifications to a message or its parts become visible in the message stream.
* include/mailutils/sys/body.h (_mu_body)<rawstream>: New member.
* include/mailutils/sys/message.h (_mu_message)<rawstream>: New member.
* libmailutils/mailbox/body.c: Rewrite. Return the specially crafted
"body-stream" for user I/O operations. Writes to that stream trigger
creation of a temporary stream (write-through mode) which will be used
for subsequent I/O.
* libmailutils/mailbox/msgbody.c (mu_message_get_body): Use msg->rawstream.
* libmailutils/mailbox/msgheader.c (message_header_fill): Do not
call mu_message_get_streamref, as that can result in endless recursion.
Use msg->rawstream instead.
* libmailutils/mailbox/msgref.c (_mu_message_free): Destroy both
rawstream and outstream.
* libmailutils/mailbox/msgstream.c (mu_message_set_stream): Set
rawstream.
(mu_message_get_stream): Create outstream as needed.
(mu_message_get_streamref): If the message has been modified,
create the outstream and return it to the caller. This way, the
modifications become visible via the stream interface.
* libmailutils/tests/Makefile.am: Add new testcases.
* libmailutils/tests/testsuite.at: Likewise.
* libmailutils/tests/modmesg.c: New file.
* libmailutils/tests/modmesg00.at: New file.
* libmailutils/tests/modmesg01.at: New file.
* libmailutils/tests/modmesg02.at: New file.
* libmailutils/tests/modmesg03.at: New file.
* mh/mhn.c: Fix message reference counting.
Diffstat (limited to 'libmailutils/tests/Makefile.am')
-rw-r--r-- | libmailutils/tests/Makefile.am | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libmailutils/tests/Makefile.am b/libmailutils/tests/Makefile.am index 3e3a5bacc..65574bf5e 100644 --- a/libmailutils/tests/Makefile.am +++ b/libmailutils/tests/Makefile.am @@ -38,7 +38,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac ## Non-installable programs ## -------------------------- ## -INCLUDES = @MU_LIB_COMMON_INCLUDES@ +AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@ noinst_PROGRAMS = \ addr\ cidr\ @@ -55,6 +55,7 @@ noinst_PROGRAMS = \ mimehdr\ modtofsaf\ msgset\ + modmesg\ prop\ scantime\ strftime\ @@ -94,6 +95,10 @@ TESTSUITE_AT = \ list.at\ mailcap.at\ mimehdr.at\ + modmesg00.at\ + modmesg01.at\ + modmesg02.at\ + modmesg03.at\ modtofsaf.at\ msgset.at\ prop.at\ |