* mailbox/amd.c (_amd_attach_message): Call mu_body_clear_modified
and mu_message_clear_modified after constructing the message to make sure it is not marked as modified.
Showing
2 changed files
with
15 additions
and
0 deletions
1 | 2008-11-18 Sergey Poznyakoff <gray@gnu.org.ua> | ||
2 | |||
3 | * mailbox/amd.c (_amd_attach_message): Call mu_body_clear_modified | ||
4 | and mu_message_clear_modified after constructing the message to | ||
5 | make sure it is not marked as modified. | ||
6 | |||
1 | 2008-11-16 Sergey Poznyakoff <gray@gnu.org.ua> | 7 | 2008-11-16 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 8 | ||
3 | * mailbox/argcv.c (quote_transtab): Add vertical tabulation | 9 | * mailbox/argcv.c (quote_transtab): Add vertical tabulation | ... | ... |
... | @@ -474,6 +474,7 @@ _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, | ... | @@ -474,6 +474,7 @@ _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, |
474 | mu_stream_set_readline (stream, amd_body_readline, body); | 474 | mu_stream_set_readline (stream, amd_body_readline, body); |
475 | mu_stream_set_size (stream, amd_stream_size, body); | 475 | mu_stream_set_size (stream, amd_stream_size, body); |
476 | mu_body_set_stream (body, stream, msg); | 476 | mu_body_set_stream (body, stream, msg); |
477 | mu_body_clear_modified (body); | ||
477 | mu_body_set_size (body, amd_body_size, msg); | 478 | mu_body_set_size (body, amd_body_size, msg); |
478 | mu_body_set_lines (body, amd_body_lines, msg); | 479 | mu_body_set_lines (body, amd_body_lines, msg); |
479 | mu_message_set_body (msg, body, mhm); | 480 | mu_message_set_body (msg, body, mhm); |
... | @@ -502,6 +503,14 @@ _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, | ... | @@ -502,6 +503,14 @@ _amd_attach_message (mu_mailbox_t mailbox, struct _amd_message *mhm, |
502 | mhm->message = msg; | 503 | mhm->message = msg; |
503 | mu_message_set_mailbox (msg, mailbox, mhm); | 504 | mu_message_set_mailbox (msg, mailbox, mhm); |
504 | 505 | ||
506 | /* Some of mu_message_set_ functions above mark message as modified. | ||
507 | Undo it now. | ||
508 | |||
509 | FIXME: Marking message as modified is not always appropriate. Find | ||
510 | a better way. */ | ||
511 | |||
512 | mu_message_clear_modified (msg); | ||
513 | |||
505 | if (pmsg) | 514 | if (pmsg) |
506 | *pmsg = msg; | 515 | *pmsg = msg; |
507 | 516 | ... | ... |
-
Please register or sign in to post a comment