1 Return-Path: <sojkam1@fel.cvut.cz>
\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 5786B418C34
\r
6 for <notmuch@notmuchmail.org>; Tue, 11 May 2010 05:14:47 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 OKjKy5wKx9tu for <notmuch@notmuchmail.org>;
\r
16 Tue, 11 May 2010 05:14:34 -0700 (PDT)
\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])
\r
18 by olra.theworths.org (Postfix) with ESMTP id E1F174196F2
\r
19 for <notmuch@notmuchmail.org>; Tue, 11 May 2010 05:14:33 -0700 (PDT)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 87BCF19F3411;
\r
22 Tue, 11 May 2010 14:14:32 +0200 (CEST)
\r
23 X-Virus-Scanned: IMAP AMAVIS
\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])
\r
25 by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,
\r
27 with ESMTP id mnhg+Tkzpivj; Tue, 11 May 2010 14:14:31 +0200 (CEST)
\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])
\r
29 by max.feld.cvut.cz (Postfix) with ESMTP id 3E24119F33FC;
\r
30 Tue, 11 May 2010 14:14:31 +0200 (CEST)
\r
31 Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30])
\r
32 (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id 380CFFA004;
\r
34 Tue, 11 May 2010 14:14:31 +0200 (CEST)
\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.71)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1OBoM3-0005sq-1a; Tue, 11 May 2010 14:14:31 +0200
\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 1/4] lib: Return added message even if it already was in the
\r
42 Date: Tue, 11 May 2010 14:14:18 +0200
\r
43 Message-Id: <1273580061-22580-2-git-send-email-sojkam1@fel.cvut.cz>
\r
44 X-Mailer: git-send-email 1.7.1
\r
45 In-Reply-To: <1273580061-22580-1-git-send-email-sojkam1@fel.cvut.cz>
\r
46 References: <1273580061-22580-1-git-send-email-sojkam1@fel.cvut.cz>
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\r
50 List-Id: "Use and development of the notmuch mail system."
\r
51 <notmuch.notmuchmail.org>
\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
55 List-Post: <mailto:notmuch@notmuchmail.org>
\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
59 X-List-Received-Date: Tue, 11 May 2010 12:14:47 -0000
\r
62 lib/database.cc | 3 ++-
\r
63 lib/notmuch.h | 3 ++-
\r
64 2 files changed, 4 insertions(+), 2 deletions(-)
\r
66 diff --git a/lib/database.cc b/lib/database.cc
\r
67 index 6afc8d9..694b7ec 100644
\r
68 --- a/lib/database.cc
\r
69 +++ b/lib/database.cc
\r
70 @@ -1613,7 +1613,8 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
74 - if (ret == NOTMUCH_STATUS_SUCCESS && message_ret)
\r
75 + if ((ret == NOTMUCH_STATUS_SUCCESS ||
\r
76 + ret == NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) && message_ret)
\r
77 *message_ret = message;
\r
79 notmuch_message_destroy (message);
\r
80 diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
81 index 505ad19..0ba1416 100644
\r
84 @@ -238,7 +238,8 @@ notmuch_database_get_directory (notmuch_database_t *database,
\r
85 * notmuch database will reference the filename, and will not copy the
\r
86 * entire contents of the file.
\r
88 - * If 'message' is not NULL, then, on successful return '*message'
\r
89 + * If 'message' is not NULL, then, on successful return
\r
90 + * (NOTMUCH_STATUS_SUCCESS or NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) '*message'
\r
91 * will be initialized to a message object that can be used for things
\r
92 * such as adding tags to the just-added message. The user should call
\r
93 * notmuch_message_destroy when done with the message. On any failure
\r