From ec2171174c019bdc83002cc29d06357e30b4b90d Mon Sep 17 00:00:00 2001 From: Philipp Takacs Date: Sat, 5 Jan 2019 14:30:57 +0100 Subject: [PATCH] fail in pick if a massage of -thread has no thread-id If pick -thread is used with a message without a message-id or a references header field pick now fails. This prevents falling back to all messages as default. --- test/tests/pick/test-thread-without-msgid | 10 ++++++---- uip/pick.c | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/tests/pick/test-thread-without-msgid b/test/tests/pick/test-thread-without-msgid index d693439..6058815 100644 --- a/test/tests/pick/test-thread-without-msgid +++ b/test/tests/pick/test-thread-without-msgid @@ -12,11 +12,13 @@ actual_out=$MH_TEST_DIR/$$.actual_out # All messages should be go to stdout cat > $expected_out < $expected_err +cat > $expected_err < $actual_out 2> $actual_err -diff -u $expected_err $actual_err -diff -u $expected_out $actual_out +diff -u $expected_err $actual_err || exit 1 +diff -u $expected_out $actual_out || exit 1 diff --git a/uip/pick.c b/uip/pick.c index 049be8a..f700a0c 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -1330,6 +1330,7 @@ createpickthread(char *msgs) for (i = 0; i < files.size; i++) { buf = getthreadid(files.msgs[i]); if (!buf) { + adios(EX_DATAERR, NULL, "message %s is not part of a thread", basename(files.msgs[i])); continue; } -- 1.7.10.4