]> git.cworth.org Git - notmuch/blob - test/corpora/default/01:2,
test: replace aging OpenPGP key used in the test suite
[notmuch] / test / corpora / default / 01:2,
1 From: "Mikhail Gusarov" <dottedmag@dottedmag.net>
2 To: notmuch@notmuchmail.org
3 Date: Tue, 17 Nov 2009 21:28:37 +0600
4 Subject: [notmuch] [PATCH 1/2] Close message file after parsing message
5         headers
6 Message-ID: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net>
7
8 Keeping unused files open helps to see "Too many open files" often.
9
10 Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
11 ---
12  lib/message-file.c |    5 +++++
13  1 files changed, 5 insertions(+), 0 deletions(-)
14
15 diff --git a/lib/message-file.c b/lib/message-file.c
16 index 8a3f8ee..197ab01 100644
17 --- a/lib/message-file.c
18 +++ b/lib/message-file.c
19 @@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
20             return decoded_value;
21      }
22  
23 +    if (message->parsing_finished) {
24 +        fclose (message->file);
25 +        message->file = NULL;
26 +    }
27 +
28      if (message->line)
29         free (message->line);
30      message->line = NULL;
31 -- 
32 1.6.3.3
33
34