1 Return-Path: <glasse@cs.rpi.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 BC12F429E43
\r
6 for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 14:09:03 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.54 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 RCVD_IN_BL_SPAMCOP_NET=1.246, RCVD_IN_DNSWL_MED=-2.3,
\r
14 RCVD_IN_SORBS_WEB=0.614] autolearn=disabled
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id zTEYsFfCblKZ for <notmuch@notmuchmail.org>;
\r
18 Wed, 15 Feb 2012 14:09:00 -0800 (PST)
\r
19 Received: from cliffclavin.cs.rpi.edu (cliffclavin.cs.rpi.edu
\r
20 [128.113.126.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
21 (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS
\r
22 id 18D69431E62 for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 14:09:00 -0800
\r
25 S|aae69e273e498d5de66d9e3bf68ac0c0606b5478|d4c21c0d0b80a5462346b7b26b45ba37
\r
26 X-Countries: Cameroon, United States
\r
27 X-SMTP-From: accepted <glasse@cs.rpi.edu> [195.24.209.20] [195.24.209.20]
\r
28 (localhost) {Cameroon}
\r
29 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=cs.rpi.edu; h=from
\r
30 :to:cc:subject:date:message-id:in-reply-to:references; s=
\r
31 default; i=glasse@cs.rpi.edu; t=1329343738; x=1329948538; l=2068;
\r
32 bh=0k/K3RQun05tWxgXhC3iFXolbX4=; b=myzeyUcltgZD6sw3FXw8s8j
\r
33 DWkQwAll8BNvVzPp5Tkpgn3hkUoxWV1b/U+sDm8ei2FpD/KyYz2VugaZJmED3lZk
\r
34 F8XBtv1HMACSDhfJma6URSSgBmPbMDjkNQXJz0OvI2TEZAax//afm0m9LbSiefo1
\r
35 0+dsYU3VF98FQhyeg6Gg=
\r
36 DomainKey-Signature: a=rsa-sha1; c=nofws; d=cs.rpi.edu; h=from:to:cc
\r
37 :subject:date:message-id:in-reply-to:references; q=dns; s=
\r
38 default; b=nVT88z7gJqsDfxH/kAE1glE5gD9mn3G7+QcOqNh3KdYZ0/i4upbbQ
\r
39 ZFCBdDtoppRpE4wtv46ZY0DOv9TPJdXlVMChrPidmwCWqiqhslBkdIT93x+Zos3L
\r
40 Jvub5o88Uvv/62EikywOSrXNGGos1JhEiDPKm8iERtQrs+99yATEzg=
\r
41 X-Spam-Info: -2.7; ALL_TRUSTED,AWL,BAYES_00
\r
42 X-Spam-Scanned-By: cliffclavin.cs.rpi.edu using SpamAssassin 3.2.5 (hard limit
\r
44 Authentication-Results: cliffclavin.cs.rpi.edu;
\r
45 DKIM=neutral (none) header.from=glasse@cs.rpi.edu;
\r
47 Mechanism '?all' matched) smtp.mail=glasse@cs.rpi.edu
\r
48 X-Auth-Passed: cliffclavin.cs.rpi.edu:q1FM8PIt008817 Auth:glasse
\r
49 X-Virus-Scanned-By: cliffclavin.cs.rpi.edu
\r
50 Received: from localhost ([195.24.209.20]) (authenticated bits=0)
\r
51 by cliffclavin.cs.rpi.edu (8.14.3/8.14.3) with ESMTP id q1FM8PIt008817
\r
52 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
\r
53 Wed, 15 Feb 2012 17:08:44 -0500 (EST)
\r
54 (envelope-from glasse@cs.rpi.edu)
\r
55 From: Ethan Glasser-Camp <glasse@cs.rpi.edu>
\r
56 To: notmuch@notmuchmail.org
\r
57 Subject: [RFC PATCH 06/13] Pass mailstore to _notmuch_message_index_file
\r
58 Date: Wed, 15 Feb 2012 17:01:59 -0500
\r
59 Message-Id: <1329343326-16410-7-git-send-email-glasse@cs.rpi.edu>
\r
60 X-Mailer: git-send-email 1.7.5.4
\r
61 In-Reply-To: <1329343326-16410-1-git-send-email-glasse@cs.rpi.edu>
\r
62 References: <1329343326-16410-1-git-send-email-glasse@cs.rpi.edu>
\r
63 X-Scanned-By: MIMEDefang 2.67 on 128.113.126.25
\r
64 Cc: Ethan Glasser-Camp <ethan@betacantrips.com>
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\r
68 List-Id: "Use and development of the notmuch mail system."
\r
69 <notmuch.notmuchmail.org>
\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
73 List-Post: <mailto:notmuch@notmuchmail.org>
\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
77 X-List-Received-Date: Wed, 15 Feb 2012 22:09:03 -0000
\r
79 From: Ethan Glasser-Camp <ethan@betacantrips.com>
\r
81 This is the last place where fopen(2) was used and had to be replaced.
\r
83 Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
\r
85 lib/database.cc | 2 +-
\r
86 lib/index.cc | 5 +++--
\r
87 lib/notmuch-private.h | 3 ++-
\r
88 3 files changed, 6 insertions(+), 4 deletions(-)
\r
90 diff --git a/lib/database.cc b/lib/database.cc
\r
91 index ff44e76..0ed4412 100644
\r
92 --- a/lib/database.cc
\r
93 +++ b/lib/database.cc
\r
94 @@ -1743,7 +1743,7 @@ notmuch_database_add_message (notmuch_database_t *notmuch,
\r
95 date = notmuch_message_file_get_header (message_file, "date");
\r
96 _notmuch_message_set_header_values (message, date, from, subject);
\r
98 - _notmuch_message_index_file (message, filename);
\r
99 + _notmuch_message_index_file (notmuch->mailstore, message, filename);
\r
101 ret = NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID;
\r
103 diff --git a/lib/index.cc b/lib/index.cc
\r
104 index d8f8b2b..54b8f73 100644
\r
107 @@ -409,7 +409,8 @@ _index_mime_part (notmuch_message_t *message,
\r
111 -_notmuch_message_index_file (notmuch_message_t *message,
\r
112 +_notmuch_message_index_file (notmuch_mailstore_t *mailstore,
\r
113 + notmuch_message_t *message,
\r
114 const char *filename)
\r
116 GMimeStream *stream = NULL;
\r
117 @@ -426,7 +427,7 @@ _notmuch_message_index_file (notmuch_message_t *message,
\r
121 - file = fopen (filename, "r");
\r
122 + file = notmuch_mailstore_open (mailstore, filename);
\r
124 fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno));
\r
125 ret = NOTMUCH_STATUS_FILE_ERROR;
\r
126 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
127 index 2589928..d93891e 100644
\r
128 --- a/lib/notmuch-private.h
\r
129 +++ b/lib/notmuch-private.h
\r
130 @@ -313,7 +313,8 @@ notmuch_message_get_author (notmuch_message_t *message);
\r
134 -_notmuch_message_index_file (notmuch_message_t *message,
\r
135 +_notmuch_message_index_file (notmuch_mailstore_t *mailstore,
\r
136 + notmuch_message_t *message,
\r
137 const char *filename);
\r
139 /* message-file.c */
\r