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 C167740D148
\r
6 for <notmuch@notmuchmail.org>; Wed, 13 Oct 2010 05:14:24 -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 S8qUl8hVZCuz for <notmuch@notmuchmail.org>;
\r
16 Wed, 13 Oct 2010 05:14:12 -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 10CD340D144
\r
19 for <notmuch@notmuchmail.org>; Wed, 13 Oct 2010 05:14:12 -0700 (PDT)
\r
20 Received: from localhost (unknown [192.168.200.4])
\r
21 by max.feld.cvut.cz (Postfix) with ESMTP id 44F9B19F33E1;
\r
22 Wed, 13 Oct 2010 14:14:11 +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 Neeq4+cg3LpK; Wed, 13 Oct 2010 14:14:09 +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 DD56219F33D8;
\r
30 Wed, 13 Oct 2010 14:14:09 +0200 (CEST)
\r
31 Received: from steelpick.2x.cz (note-sojka.felk.cvut.cz [147.32.86.30])
\r
32 (Authenticated sender: sojkam1)
\r
33 by imap.feld.cvut.cz (Postfix) with ESMTPSA id D9FF515C086;
\r
34 Wed, 13 Oct 2010 14:14:09 +0200 (CEST)
\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.72)
\r
36 (envelope-from <sojkam1@fel.cvut.cz>)
\r
37 id 1P60Dg-0005VJ-K8; Wed, 13 Oct 2010 14:14:08 +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: Wed, 13 Oct 2010 14:13:55 +0200
\r
43 Message-Id: <1286972038-21064-2-git-send-email-sojkam1@fel.cvut.cz>
\r
44 X-Mailer: git-send-email 1.7.1.3.g75e44
\r
45 In-Reply-To: <1286972038-21064-1-git-send-email-sojkam1@fel.cvut.cz>
\r
46 References: <1286972038-21064-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: Wed, 13 Oct 2010 12:14:25 -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 e4ac970..9a4f715 100644
\r
68 --- a/lib/database.cc
\r
69 +++ b/lib/database.cc
\r
70 @@ -1671,7 +1671,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