diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-11-23 20:21:02 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-11-23 20:21:02 +0200 |
commit | c004169d5bd1a93270b5fb195d0c737b1c76af0e (patch) | |
tree | fbcfc8e8e20617dccdd4585e1869812205d8fccb | |
parent | f04055b0a9ac91afedc0b8ccca8361f7c7dd4505 (diff) | |
download | mailutils-c004169d5bd1a93270b5fb195d0c737b1c76af0e.tar.gz mailutils-c004169d5bd1a93270b5fb195d0c737b1c76af0e.tar.bz2 |
Two bugfixes
* libproto/mboxrb/mboxrb.c (mboxrb_open): Propagate failure to
open the stream to the return code.
* libproto/mboxrb/tests/notify.at: Use cat to create test inbox
-rw-r--r-- | libproto/mboxrb/mboxrb.c | 3 | ||||
-rw-r--r-- | libproto/mboxrb/tests/notify.at | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libproto/mboxrb/mboxrb.c b/libproto/mboxrb/mboxrb.c index 17558e532..d4114e948 100644 --- a/libproto/mboxrb/mboxrb.c +++ b/libproto/mboxrb/mboxrb.c @@ -119,7 +119,8 @@ mboxrb_open (mu_mailbox_t mailbox, int flags) rc = mboxrb_mailbox_init_stream (dmp); - if (mailbox->locker == NULL + if (rc == 0 + && mailbox->locker == NULL && (flags & (MU_STREAM_WRITE | MU_STREAM_APPEND | MU_STREAM_CREAT))) { rc = mu_locker_create (&mailbox->locker, dmp->name, 0); diff --git a/libproto/mboxrb/tests/notify.at b/libproto/mboxrb/tests/notify.at index e923926f1..838e2871b 100644 --- a/libproto/mboxrb/tests/notify.at +++ b/libproto/mboxrb/tests/notify.at @@ -15,7 +15,7 @@ # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. AT_SETUP([append notification]) -AT_CHECK([cp $spooldir/mbox1 inbox]) +AT_CHECK([cat $spooldir/mbox1 > inbox]) AT_DATA([msg], [Received: (from alice@wonder.land) by wonder.land id 3304 |