From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D70D66DE0B6D for ; Fri, 9 Sep 2016 23:28:27 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.581 X-Spam-Level: X-Spam-Status: No, score=-0.581 tagged_above=-999 required=5 tests=[AWL=0.139, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hADs1GHyo2XC for ; Fri, 9 Sep 2016 23:28:27 -0700 (PDT) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by arlo.cworth.org (Postfix) with ESMTPS id E24306DE0B64 for ; Fri, 9 Sep 2016 23:28:26 -0700 (PDT) Received: by mail-wm0-f42.google.com with SMTP id w12so65444792wmf.0 for ; Fri, 09 Sep 2016 23:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=XMg2NBSAH1dgezZntVVWYaoLJEm1cM8a24V/0j8eCe8=; b=dTdfCmDe3IegzUcudIs+OthUkk49gHqhsokqImitR8QTmrvkBFanIy5QLe1vLbL0fH AmhO/5VriXua/7GWqtfWddy5oNNlOjwN7rDMb48enVDaMsw4LMDMCq2ua2RESk9pqcZf xq7g34BK3NviuSjNq0lRBqEb72+uqTrsKc4SfovXR8dRznSyAdok7OO5cn6U/nLq3UrU RAF/ABnI16XfbTlauKIgcZRp7KhTkwQF2ID1EauWYo+ApV49eIpOAUWsZB0wtDzDcKck FFIB4kVxHm1qg3TjQ2StAsjHz4xufVnBir95m2D2OgsyoHMpePur0FQo6CNUdHJDMyI7 P+Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=XMg2NBSAH1dgezZntVVWYaoLJEm1cM8a24V/0j8eCe8=; b=SgjDgQwyuXkLwVqA+kHB7GnL8tmTRSvUuP8DQ31cj54nzv/2uIvb3yW7EAUxOrTPKU KJlJIqD53L6Za2IAPOg6Cmlj1DfGRFsiwmuO7CBnofLCeDLbY/sKbKUIiJNTY/iRrORz 2o4Rn0xpwT5xy2oen2HzfzGaTv7iH15my/6+2vKQC11wGRxLQJGhPeRzFgjxQYDJHq1n QN0cwrIOfl/2Gg2aao49tQ17TFdjkgUOtKVBIJ6VKQ8vnoJTcapgqsugr5lGJjZzdht8 0qTm7tB6q5toK+PIWBuDEMfJLyblqg5PJtXYz2utLPGD5Fxts7zSzuT8hB66IPImUYmm yW5w== X-Gm-Message-State: AE9vXwMvvkISuZhpTgZPJ0V88DutssJuxz/xP+JCbgOFYLAc/ikNdlOX49Pm/ncyIrVkvQ== X-Received: by 10.194.191.162 with SMTP id gz2mr5945397wjc.182.1473488905505; Fri, 09 Sep 2016 23:28:25 -0700 (PDT) Received: from localhost (mobile-access-bcee6a-45.dhcp.inet.fi. [188.238.106.45]) by smtp.gmail.com with ESMTPSA id ka5sm6813050wjb.7.2016.09.09.23.28.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 23:28:25 -0700 (PDT) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH v2 04/14] cli/reply: unify reply format functions In-Reply-To: <87h99o1qll.fsf@zancas.localnet> References: <87h99o1qll.fsf@zancas.localnet> Date: Sat, 10 Sep 2016 09:26:43 +0300 Message-ID: <87eg4sw9r0.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2016 06:28:28 -0000 On Sat, 10 Sep 2016, David Bremner wrote: > Jani Nikula writes: > >> Prepare for further future unification by making the code similar. The >> only functional change is that errors in mime_node_open() also break >> execution in default reply format. > >> GMimeMessage *reply; >> - mime_node_t *root; >> + mime_node_t *node; >> + >> + if (mime_node_open (ctx, message, ¶ms->crypto, &node)) >> + return 1; >> >> reply = create_reply_message (ctx, config, message, reply_all); >> if (!reply) >> return 1; >> >> show_reply_headers (reply); >> + format_part_reply (node); >> >> g_object_unref (G_OBJECT (reply)); > > I'm not sure if this matters in the long run, but a related change is > that the g_object_unref is skipped in case mime_node_open returns an > error. The order changes too, we don't yet have an object to g_object_unref if mime_node_open fails. BR, Jani.