From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gFszDzEKjmLYFAEAbAwnHQ (envelope-from ) for ; Wed, 25 May 2022 12:51:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UBYrDzEKjmLD0gAA9RJhRA (envelope-from ) for ; Wed, 25 May 2022 12:51:29 +0200 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 B46A6290F5 for ; Wed, 25 May 2022 12:51:28 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 480405F71C; Wed, 25 May 2022 10:51:25 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id DF5405F6BD for ; Wed, 25 May 2022 10:51:22 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id AA6555FBD7; Wed, 25 May 2022 06:51:21 -0400 (EDT) Received: (nullmailer pid 10838 invoked by uid 1000); Wed, 25 May 2022 10:51:20 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: notmuch_message* error handling cleanup part II Date: Wed, 25 May 2022 07:51:11 -0300 Message-Id: <20220525105117.10709-1-david@tethera.net> X-Mailer: git-send-email 2.35.2 MIME-Version: 1.0 Message-ID-Hash: 62MFKJXIZT4QZJTANN2TBICZ42H2JQBQ X-Message-ID-Hash: 62MFKJXIZT4QZJTANN2TBICZ42H2JQBQ 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-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653475888; 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:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=wA06AxyALPt9Ye//fs4bX5TCex830qVebq2MvGSDQho=; b=Z7Nb5Nc5/II7Fn1fFoxfpF1vcJ+OjctNH37pXhOGUnuwPp7l4IofiJLCjcBMu+4xk3Z4/L lLCDARrMqL5TjgwxSlesEPa9UbiTRcAh99RgLPsW3r1LmzmLDbNBtSdZabPBDjjz5hUmzP uR+z1ulxhyOfZFtVI9Q4uqk+8ETB2xq2vMfrcRT3cC/JUNhsMBR1ouS59TArkscwXc2iYv Yxus5jaXNaKgBh3qmY68Km0cZh7p14YylwgxAPscvOq8+nJR6GU2i95k+S7DIhaqbiEZZk XzdG6TsJjrInP0SbQ0qQNRYlwCsFOxVcXVV5l5Rdj3Z+q4NRqrHHwIWPvm3fcQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653475888; a=rsa-sha256; cv=none; b=Vhw17sI0tRtXexidmyI2a+F55xOTnbXFdOYnQJbDvA+wUratYbwx95xOMoezBeAqqsvikZ LJj95iJp+gkjVdXfAzVo1lay3T0/zW7LRejhOmOv5b1u3a3Sd5unpIJg9HvQHjIPds2YSq U1R0+xcd9A/48MQcccDeYHw0BP7uXkiQYFP6AoAaeJRTP8I04jQb6DxFHej+3UjhPRdyyl 0ZdTnzhVu0xwzAlI1+iSPt0eZ8AWV0ALaGaeLyssGw1UG71p0K+ftUf64iCtJcZOoqByOj gnG1U7Qb8Stzain2YsJEBG+YQIyf6DMhoITYS9Ute2MssHAyN2KSYtl14OrtUQ== 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.02 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: B46A6290F5 X-Spam-Score: -1.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: eK8pjg0cSMD6 This is a continuation of the series [1]. It should in principle be applicable to master, but I have not tried resolving the resulting conflicts. The big picture change here is having _notmuch_database_ensure_writable check for the database being open. The "open" flag was added for some other reason (config related iirc), but now that we have it, we may as well use it to make certain failures more atomic. [1]: id:20220523233901.3506880-1-david@tethera.net