projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dab6a2
)
Close message file after parsing message headers
author
Mikhail Gusarov
<dottedmag@dottedmag.net>
Tue, 17 Nov 2009 15:28:37 +0000
(21:28 +0600)
committer
Carl Worth
<cworth@cworth.org>
Tue, 17 Nov 2009 16:53:16 +0000
(08:53 -0800)
Keeping unused files open helps to see "Too many open files" often.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
lib/message-file.c
patch
|
blob
|
history
diff --git
a/lib/message-file.c
b/lib/message-file.c
index 8a3f8ee0fd2b66e04e0dd3e68b4abea37ae591f7..197ab0143f18e029cdd3b8858ce087fde507c3a4 100644
(file)
--- a/
lib/message-file.c
+++ b/
lib/message-file.c
@@
-325,6
+325,11
@@
notmuch_message_file_get_header (notmuch_message_file_t *message,
return decoded_value;
}
+ if (message->parsing_finished) {
+ fclose (message->file);
+ message->file = NULL;
+ }
+
if (message->line)
free (message->line);
message->line = NULL;