1 Return-Path: <amdragon@mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 266C4431FD0
\r
6 for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 07:49:10 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 3BHd+NCIC4h7 for <notmuch@notmuchmail.org>;
\r
16 Thu, 29 Sep 2011 07:49:09 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 984F6431FB6
\r
20 for <notmuch@notmuchmail.org>; Thu, 29 Sep 2011 07:49:09 -0700 (PDT)
\r
21 X-AuditID: 12074425-b7f116d0000008fe-c2-4e848564eca6
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 42.CF.02302.465848E4; Thu, 29 Sep 2011 10:49:09 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id p8TEn88i010557;
\r
27 Thu, 29 Sep 2011 10:49:08 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id p8TEn6E5016066
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Thu, 29 Sep 2011 10:49:07 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.72)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1R9HxR-0006p7-Ti; Thu, 29 Sep 2011 10:51:29 -0400
\r
37 Date: Thu, 29 Sep 2011 10:51:29 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Ali Polatel <polatel@gmail.com>
\r
40 Subject: Re: Concerns regarding some library functions
\r
41 Message-ID: <20110929145129.GB17905@mit.edu>
\r
42 References: <871uv2unfd.fsf@gmail.com> <87fwjhx6p5.fsf@convex-new.cs.unb.ca>
\r
43 <20110927224622.GR17905@mit.edu> <877h4tyug1.fsf@gmail.com>
\r
45 Content-Type: text/plain; charset=us-ascii
\r
46 Content-Disposition: inline
\r
47 In-Reply-To: <877h4tyug1.fsf@gmail.com>
\r
48 User-Agent: Mutt/1.5.20 (2009-06-14)
\r
49 X-Brightmail-Tracker:
\r
50 H4sIAAAAAAAAA+NgFuphleLIzCtJLcpLzFFi42IRYrdT101tbfEz6P7NYXGjtZvR4vrNmcwW
\r
51 fXu+sTowe+ycdZfd49mqW8weWw69Zw5gjuKySUnNySxLLdK3S+DK+PLlIUvBI96Klb93sjcw
\r
52 fuDqYuTkkBAwkWh7/YIVwhaTuHBvPVsXIxeHkMA+Rom3f/vYQRJCAhsYJWbttoVInGSS+LXg
\r
53 DzOEs4RRYtvtu0wgVSwCqhILJuwE62AT0JDYtn85YxcjB4eIgLJE3/ZEkDCzgJ3Eke9dYGFh
\r
54 ATOJVwvlQMK8AjoSTW+mMUKM7GOUuNyygxEiIShxcuYTFoheLYkb/14ygfQyC0hLLP/HARLm
\r
55 FFCXOPvnAzOILSqgInFtfzvbBEahWUi6ZyHpnoXQvYCReRWjbEpulW5uYmZOcWqybnFyYl5e
\r
56 apGuhV5uZoleakrpJkZwoLuo7mCccEjpEKMAB6MSD++PpGY/IdbEsuLK3EOMkhxMSqK8m5ta
\r
57 /IT4kvJTKjMSizPii0pzUosPMUpwMCuJ8PoXAOV4UxIrq1KL8mFS0hwsSuK8r3c4+AkJpCeW
\r
58 pGanphakFsFkZTg4lCR4z7cANQoWpaanVqRl5pQgpJk4OEGG8wANfwBSw1tckJhbnJkOkT/F
\r
59 qCglznsFJCEAksgozYPrhSWiV4ziQK8I854DqeIBJjG47ldAg5mABn8tbAQZXJKIkJJqYNQs
\r
60 enJu+rKQxrr41oorbtPKVnJJXOFsvbuw4v/emAs15js/XCubUCi44fdBeZf1d3T7AndIKXA3
\r
61 fp67KnIiU2jszZ9CSTNnvnGfxpbzdO+5rWcmLU9v7NpiOjHqHoP82WmaiyN+fvHQCSp5Eutp
\r
62 l5T45KCm8+RaXsugW5V7asPs91XpcLBXOiuxFGckGmoxFxUnAgBnF3+2HwMAAA==
\r
63 Cc: notmuch@notmuchmail.org
\r
64 X-BeenThere: notmuch@notmuchmail.org
\r
65 X-Mailman-Version: 2.1.13
\r
67 List-Id: "Use and development of the notmuch mail system."
\r
68 <notmuch.notmuchmail.org>
\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
72 List-Post: <mailto:notmuch@notmuchmail.org>
\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
75 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
76 X-List-Received-Date: Thu, 29 Sep 2011 14:49:10 -0000
\r
78 Quoth Ali Polatel on Sep 28 at 10:53 am:
\r
79 > On Tue, 27 Sep 2011 18:46:22 -0400, Austin Clements <amdragon@MIT.EDU> wrote:
\r
80 > > Quoth David Bremner on Sep 27 at 1:59 pm:
\r
81 > > > On Tue, 27 Sep 2011 16:25:58 +0300, Ali Polatel <polatel@gmail.com> wrote:
\r
83 > > > > The problem with their design is NULL return may both mean an error
\r
84 > > > > condition and "message not found". However, we already have a similar
\r
85 > > > > function which does not have such a flaw, namely notmuch_database_add_message().
\r
87 > > > So, I take there is no way to distinguish those two outcomes? That does
\r
88 > > > sound bad. Looking at the code for notmuch-new, it looks like the return
\r
89 > > > value of notmuch_database_find_message_by_filename is used without
\r
90 > > > checking it for NULL. Austin, can you comment on that at all?
\r
92 > > I'd be happy to distinguish these outcomes. I did
\r
93 > > notmuch_database_find_message_by_filename the way I did only to be
\r
94 > > consistent with notmuch_database_find_message. Since ndfmbf isn't
\r
95 > > entrenched yet, now is a good time to change it.
\r
97 > What about notmuch_database_find_message()? If we leave it as it is,
\r
98 > this will lead to inconsistency and if we change it, we need to think
\r
99 > about API breakage issues.
\r
101 Yes. We could just deal with that (there aren't *that* many API
\r
102 consumers). For binary compatibility, I suppose we could even use
\r
105 > > The call in notmuch-new should check the return, though if it can't
\r
106 > > find the message at that point, something has gone terribly wrong.
\r
107 > > Segfaulting is never the answer, though.
\r
109 > Indeed, just not to step on each other's feet, are you going to write a
\r
110 > patch or shall I start writing one?
\r
112 Please feel free to write a patch.
\r