From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MISBM5fV/mE2UQAAgWs5BA (envelope-from ) for ; Sat, 05 Feb 2022 20:52:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cLhRMJfV/mGGbQEAauVa8A (envelope-from ) for ; Sat, 05 Feb 2022 20:52:55 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9C2263D0DE for ; Sat, 5 Feb 2022 20:52:55 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 696755F725; Sat, 5 Feb 2022 19:52:37 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 5D29E5F70D for ; Sat, 5 Feb 2022 19:52:34 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id A397C5FBD4; Sat, 5 Feb 2022 14:52:33 -0500 (EST) Received: (nullmailer pid 166347 invoked by uid 1000); Sat, 05 Feb 2022 19:52:28 -0000 From: David Bremner 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 Message-Id: <20220205195215.166213-6-david@tethera.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220205195215.166213-1-david@tethera.net> References: <20220205195215.166213-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: ZB3QJ3QHM3DIOIMKLLFX3WGT4UAH662V X-Message-ID-Hash: ZB3QJ3QHM3DIOIMKLLFX3WGT4UAH662V X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644090775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=T1vT21IemeYVDEvbWkvrPw5JlR5Q1rDV9PfJtI1hDTg=; b=G+j4XKkOIKNlJv+V5nXfz7mnvRtmxfDbgrl0tatQvSCEQ3C8wslZbbqxSJEwXufyykBJJO JCnzSV3yvDdVKV1jHGnBn/6Q1UKsNUJ/4t0fnWwiFkXaOwwuDH+GU1ttSSYq8rjGFhvDdj xyR1FclRdMHQNIKypufoB5csuJ1oEmGGUZQGBRJtbfckXFjT3PYu25pgnThlbbXlPNIxvP LR3btrm3R/5njFu9uGVWQbCFdPuXu6u156hyycLAaBdDcghVRr0AdKCyz5ETav418ZWS/9 0EUeEpCGCUysMJsOD/Ta+5gtzqcZ3ny0yB7wkSRbVRKPJcoWP4Qk5iUoSvvFYg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644090775; a=rsa-sha256; cv=none; b=ldSBVZtQCkSyTUg8jQemyVaildSNzVzNuc61A+dLgC8LDoNJ5uNSfjNve3lE+z0sGNaBYl QmIya7RHUgXZchDnH0c4RDg/Qufg4rn605nYcG5qUTgY0caMcuChAHlc2wuGa+i5Pp+VdS SG6YY0sexmYz/5MHt1TyhGynP70H25tZxwdkfukRWFWgYY7fJOygBMMUiUtZabzLuwQTEJ 8fr8MFBjIj7NJF6DPKcLdIP7AmwpHwF3Z+nqslB08SDoy5IE2Gzgl4e9P6XgXdUk49f42d urA904lmkIEQShX2VSVOlIMIGLCX1ijMG/V7bSWnfV7RApPZPDidKnifa+oBzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 9C2263D0DE X-Spam-Score: -1.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: xBXVsGG+SeiJ 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 /* 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