summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-11-23 20:21:02 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-11-23 20:21:02 +0200
commitc004169d5bd1a93270b5fb195d0c737b1c76af0e (patch)
treefbcfc8e8e20617dccdd4585e1869812205d8fccb
parentf04055b0a9ac91afedc0b8ccca8361f7c7dd4505 (diff)
downloadmailutils-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.c3
-rw-r--r--libproto/mboxrb/tests/notify.at2
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

Return to:

Send suggestions and report system problems to the System administrator.