summaryrefslogtreecommitdiff
path: root/libmailutils
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-11-16 14:04:13 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-11-16 14:04:13 +0200
commit645bfb5b4da280808f537929064807ba5abd8626 (patch)
treeb6a2d39f498200612a07df91ede2c5a0d95d862a /libmailutils
parent500bab2e34400206f0e8982b11d6cc07fac52ffa (diff)
downloadmailutils-645bfb5b4da280808f537929064807ba5abd8626.tar.gz
mailutils-645bfb5b4da280808f537929064807ba5abd8626.tar.bz2
Fix message append notifications for maildir, mh, and dotmail.
* testsuite/mbop.c: Implement notification mode. * comsat/tests/testsuite.at: Fix mh qid. * libproto/dotmail/dotmail.c (dotmail_append_message): Lock the monitor before and unlock it after the operation. * libproto/dotmail/tests/notify.at: New file. * libproto/dotmail/tests/Makefile.am: Add notify.at * libproto/dotmail/tests/testsuite.at: Include notify.at. * include/mailutils/sys/amd.h (cur_msg_file_name): Change signature. * libmailutils/base/amd.c: Use amd->cur_msg_file_name with 0 as its second argument to get qid. * libproto/maildir/mbox.c (maildir_cur_message_name): Take three argument, second one specifying whether an absolute or relative filename is requested. All uses changed. * libproto/maildir/tests/notify.at: New file. * libproto/maildir/tests/Makefile.am: Add notify.at * libproto/maildir/tests/testsuite.at: Include notify.at * libproto/mh/mbox.c (_mh_cur_message_name): Take three argument, second one specifying whether an absolute or relative filename is requested. All uses changed. * libproto/mh/tests/notify.at: New file. * libproto/mh/tests/Makefile.am: Add notify.at * libproto/mh/tests/testsuite.at: Include notify.at
Diffstat (limited to 'libmailutils')
-rw-r--r--libmailutils/base/amd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c
index 9b8728d15..d209ffce3 100644
--- a/libmailutils/base/amd.c
+++ b/libmailutils/base/amd.c
@@ -542,7 +542,7 @@ amd_message_qid (mu_message_t msg, mu_message_qid_t *pqid)
{
struct _amd_message *mhm = mu_message_get_owner (msg);
- return mhm->amd->cur_msg_file_name (mhm, pqid);
+ return mhm->amd->cur_msg_file_name (mhm, 0, pqid);
}
static void
@@ -810,7 +810,7 @@ _amd_message_save (struct _amd_data *amd, struct _amd_message *mhm,
{
/* Unlink the original file */
char *old_name;
- status = amd->cur_msg_file_name (mhm, &old_name);
+ status = amd->cur_msg_file_name (mhm, 1, &old_name);
free (msg_name);
if (status == 0 && unlink (old_name))
status = errno;
@@ -946,7 +946,7 @@ _amd_message_save (struct _amd_data *amd, struct _amd_message *mhm,
free (buf);
fclose (fp);
- status = amd->cur_msg_file_name (mhm, &old_name);
+ status = amd->cur_msg_file_name (mhm, 1, &old_name);
if (status == 0)
{
if (rename (name, msg_name))
@@ -1053,7 +1053,7 @@ amd_append_message (mu_mailbox_t mailbox, mu_message_t msg)
if (status == 0 && mailbox->observable)
{
char *qid;
- if (amd->cur_msg_file_name (mhm, &qid) == 0)
+ if (amd->cur_msg_file_name (mhm, 0, &qid) == 0)
{
mu_observable_notify (mailbox->observable,
MU_EVT_MAILBOX_MESSAGE_APPEND,
@@ -1339,7 +1339,7 @@ amd_expunge (mu_mailbox_t mailbox)
char *old_name;
char *new_name;
- rc = amd->cur_msg_file_name (mhm, &old_name);
+ rc = amd->cur_msg_file_name (mhm, 1, &old_name);
if (rc)
return rc;
rc = amd->new_msg_file_name (mhm, mhm->attr_flags, 1,
@@ -1613,7 +1613,7 @@ amd_scan_message (struct _amd_message *mhm)
int amd_capa = amd->capabilities;
/* Check if the message was modified after the last scan */
- status = mhm->amd->cur_msg_file_name (mhm, &msg_name);
+ status = mhm->amd->cur_msg_file_name (mhm, 1, &msg_name);
if (status)
{
mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
@@ -1811,7 +1811,7 @@ amd_message_stream_open (struct _amd_message *mhm)
int status;
int flags = 0;
- status = amd->cur_msg_file_name (mhm, &filename);
+ status = amd->cur_msg_file_name (mhm, 1, &filename);
if (status)
{
mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,

Return to:

Send suggestions and report system problems to the System administrator.