[PATCH v2 11/14] cli/reply: return internet address list from get header funcs
[notmuch-archives.git] / 77 / 7603cf79cc674e220aa2bf29b29880695e1e87
1 Return-Path: <dottedmag@dottedmag.net>\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 966D9431FBF\r
6         for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 07:28:42 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id T6gZjMwgV4Pb for <notmuch@notmuchmail.org>;\r
11         Tue, 17 Nov 2009 07:28:41 -0800 (PST)\r
12 Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82])\r
13         by olra.theworths.org (Postfix) with ESMTP id AF4F7431FBC\r
14         for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 07:28:41 -0800 (PST)\r
15 Received: from vertex.dottedmag (unknown [91.197.127.125])\r
16         by dottedmag.net (Postfix) with ESMTPSA id 44E938C57C\r
17         for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 16:28:40 +0100 (CET)\r
18 Received: from dottedmag by vertex.dottedmag with local (Exim 4.69)\r
19         (envelope-from <dottedmag@dottedmag.net>) id 1NAPyw-0001lu-7S\r
20         for notmuch@notmuchmail.org; Tue, 17 Nov 2009 21:28:38 +0600\r
21 From: Mikhail Gusarov <dottedmag@dottedmag.net>\r
22 To: notmuch@notmuchmail.org\r
23 Date: Tue, 17 Nov 2009 21:28:37 +0600\r
24 Message-Id: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net>\r
25 X-Mailer: git-send-email 1.6.3.3\r
26 Subject: [notmuch] [PATCH 1/2] Close message file after parsing message\r
27         headers\r
28 X-BeenThere: notmuch@notmuchmail.org\r
29 X-Mailman-Version: 2.1.12\r
30 Precedence: list\r
31 List-Id: "Use and development of the notmuch mail system."\r
32         <notmuch.notmuchmail.org>\r
33 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
34         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
35 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
36 List-Post: <mailto:notmuch@notmuchmail.org>\r
37 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
38 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
40 X-List-Received-Date: Tue, 17 Nov 2009 15:28:42 -0000\r
41 \r
42 Keeping unused files open helps to see "Too many open files" often.\r
43 \r
44 Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>\r
45 ---\r
46  lib/message-file.c |    5 +++++\r
47  1 files changed, 5 insertions(+), 0 deletions(-)\r
48 \r
49 diff --git a/lib/message-file.c b/lib/message-file.c\r
50 index 8a3f8ee..197ab01 100644\r
51 --- a/lib/message-file.c\r
52 +++ b/lib/message-file.c\r
53 @@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,\r
54             return decoded_value;\r
55      }\r
56  \r
57 +    if (message->parsing_finished) {\r
58 +        fclose (message->file);\r
59 +        message->file = NULL;\r
60 +    }\r
61 +\r
62      if (message->line)\r
63         free (message->line);\r
64      message->line = NULL;\r
65 -- \r
66 1.6.3.3\r
67 \r