unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 5/6] lib/message-file: stash pointer to "parent" notmuch database
Date: Sat,  5 Feb 2022 15:52:14 -0400	[thread overview]
Message-ID: <20220205195215.166213-6-david@tethera.net> (raw)
In-Reply-To: <20220205195215.166213-1-david@tethera.net>

Since we know the database anyway when creating the
notmuch_message_file struct, keep it to e.g. retrieve configuration
information later.
---
 lib/message-file.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/message-file.c b/lib/message-file.c
index 68f646a4..0f356cf1 100644
--- a/lib/message-file.c
+++ b/lib/message-file.c
@@ -27,6 +27,7 @@
 #include <glib.h> /* GHashTable */
 
 struct _notmuch_message_file {
+    notmuch_database_t *notmuch;
     /* open stream to (possibly gzipped) file */
     GMimeStream *stream;
     char *filename;
@@ -90,6 +91,8 @@ _notmuch_message_file_open_ctx (notmuch_database_t *notmuch,
     if (message->stream == NULL)
 	goto FAIL;
 
+    message->notmuch = notmuch;
+
     return message;
 
   FAIL:
-- 
2.34.1

  parent reply	other threads:[~2022-02-05 19:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05 19:52 allow disabling the check for multi-message mboxes David Bremner
2022-02-05 19:52 ` [PATCH 1/6] test: start new corpus of test messages for indexing code David Bremner
2022-02-05 19:52 ` [PATCH 2/6] test: add known broken test for non-email false positive David Bremner
2022-02-05 19:52 ` [PATCH 3/6] lib/config: add configuration item for controlling check for mbox David Bremner
2022-02-05 19:52 ` [PATCH 4/6] test: add known broken test for index.check_mbox=false David Bremner
2022-02-05 19:52 ` David Bremner [this message]
2022-02-05 19:52 ` [PATCH 6/6] lib/message-file: allow disabling check for mbox files David Bremner
2022-02-06 19:42   ` [PATCH] doc: document index.check_mbox option David Bremner
2022-02-08 20:58 ` allow disabling the check for multi-message mboxes David Bremner
2022-02-20 13:23 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220205195215.166213-6-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).