summaryrefslogtreecommitdiff
path: root/lib/message-file.c
AgeCommit message (Collapse)Author
2012-12-24lib/message-file.c: use g_malloc () & g_free () in hash table valuesTomi Ollila
The message->headers hash table values get data returned by g_mime_utils_header_decode_text (). The pointer returned by g_mime_utils_header_decode_text is from the following line in rfc2047_decode_tokens return g_string_free (decoded, FALSE); The docs for g_string_free say Frees the memory allocated for the GString. If free_segment is TRUE it also frees the character data. If it's FALSE, the caller gains ownership of the buffer and must free it after use with g_free(). The remaining frees and allocations referencing to message->headers hash values have been changed to use g_free and g_malloc functions. This combines and completes the changes started by David Bremner.
2011-06-10Fix appending of Received headersStewart Smith
We're not properly concatenating the Received headers if we parse them while requesting a header that isn't Received. this fixes notmuch-reply address detection in a bunch of situations.
2011-06-03lib/message-file: plug three memleaks.Anton Khirnov
Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
2010-04-26Make Received: header special in notmuch_message_file_get_headerDirk Hohndel
With this patch the Received: header becomes special in the way we treat headers - this is the only header for which we concatenate all the instances we find (instead of just returning the first one). This will be used in the From guessing code for replies as we need to be able to walk ALL of the Received: headers in a message to have a good chance to guess which mailbox this email was delivered to. Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
2010-04-06fix notmuch_message_file_get_headerDirk Hohndel
fix notmuch_message_file_get_header to always return the first instance of the header you are looking for Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
2009-11-17message_file_get_header: Use break where more clear than continue.Carl Worth
Calling continue here worked only because we set a flag before the continue, and, check the flag at the beginning of the loop, and *then* break. It's much more clear to just break in the first place.
2009-11-17Close message file after parsing message headersMikhail Gusarov
Keeping unused files open helps to see "Too many open files" often. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2009-11-11notmuch show: Avoid segmentation for message with no subject.Carl Worth
It's safer to return an empty string rather than NULL for missing header values.
2009-11-09libify: Move library sources down into lib directory.Carl Worth
A "make" invocation still works from the top-level, but not from down inside the lib directory yet.