]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-index-message.cc
notmuch-index-message: Ignore more signature patterns.
[notmuch] / notmuch-index-message.cc
index 51c9f049d99190c7c1240ed450f9f92f91091bf1..561cb3a47278212e19fdacd6748953eb27e2570a 100644 (file)
@@ -215,6 +215,9 @@ add_terms_references (Xapian::Document doc,
 
     refs = g_mime_object_get_header (GMIME_OBJECT (message), "references");
 
 
     refs = g_mime_object_get_header (GMIME_OBJECT (message), "references");
 
+    if (refs == NULL)
+       return;
+
     while (*refs) {
        while (*refs && isspace (*refs))
            refs++;
     while (*refs) {
        while (*refs && isspace (*refs))
            refs++;
@@ -307,7 +310,9 @@ gen_terms_body (Xapian::TermGenerator term_gen,
 
        /* Skip signatures */
        /* XXX: Should only do this if "near" the end of the message. */
 
        /* Skip signatures */
        /* XXX: Should only do this if "near" the end of the message. */
-       if (strncmp (body_line, "-- ", 3) == 0)
+       if (strncmp (body_line, "-- ", 3) == 0 ||
+           strncmp (body_line, "----------", 10) == 0 ||
+           strncmp (body_line, "__________", 10) == 0)
            break;
 
        gen_terms (term_gen, "body", body_line);
            break;
 
        gen_terms (term_gen, "body", body_line);