2005-11-29 [colin] 1.9.100cvs43
authorColin Leroy <colin@colino.net>
Tue, 29 Nov 2005 18:09:39 +0000 (18:09 +0000)
committerColin Leroy <colin@colino.net>
Tue, 29 Nov 2005 18:09:39 +0000 (18:09 +0000)
* src/matcher.c
Fix body_part and such, not skipping headers
if the matchcriteria wasn't the first in the rule

ChangeLog
PATCHSETS
configure.ac
src/matcher.c

index 40501fc9d3f648f357611590029534b0a44114de..5ebd8b9e51d7e7021ab9bd4920d0b491199f3274 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-29 [colin]     1.9.100cvs43
+
+       * src/matcher.c
+               Fix body_part and such, not skipping headers 
+               if the matchcriteria wasn't the first in the rule
+
 2005-11-29 [colin]     1.9.100cvs42
 
        * src/compose.c
index e58795adfc55f1c7d0059a36c7346af7a29092e8..00b6f56c9b333cabe692de6499b20d2c71a288b2 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.2.2.14 -r 1.2.2.15 src/mh_gtk.c;  ) > 1.9.100cvs40.patchset
 ( cvs diff -u -r 1.60.2.19 -r 1.60.2.20 po/es.po;  ) > 1.9.100cvs41.patchset
 ( cvs diff -u -r 1.382.2.197 -r 1.382.2.198 src/compose.c;  cvs diff -u -r 1.75.2.10 -r 1.75.2.11 src/matcher.c;  cvs diff -u -r 1.94.2.70 -r 1.94.2.71 src/messageview.c;  cvs diff -u -r 1.9.2.32 -r 1.9.2.33 src/gtk/gtkaspell.c;  ) > 1.9.100cvs42.patchset
+( cvs diff -u -r 1.75.2.11 -r 1.75.2.12 src/matcher.c;  ) > 1.9.100cvs43.patchset
index f914d9bf96e5799570a645f2066b20a17a0c2a53..9c860c6e87dc394871661489647b4fae5df600b2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=42
+EXTRA_VERSION=43
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1e290c19051f831d2255c85518ede10c09124e81..fd530dc993d0720319868770cb0bd2efe3825879 100644 (file)
@@ -766,13 +766,17 @@ static gboolean matcherprop_match_line(MatcherProp *matcher, const gchar *line)
  *
  *\return      gboolean TRUE if succesful match
  */
-static gboolean matcherlist_match_body(MatcherList *matchers, FILE *fp)
+static gboolean matcherlist_match_body(MatcherList *matchers, FILE *fp, gboolean read_headers)
 {
        GSList *l;
        gchar buf[BUFFSIZE];
        
        for (l = matchers->matchers ; l != NULL ; l = g_slist_next(l)) {
                MatcherProp *matcher = (MatcherProp *) l->data;
+               
+               if (!read_headers)
+                       matcherlist_skip_headers(fp);
+
                while (fgets(buf, sizeof(buf), fp) != NULL) {
                        
                        /* if the criteria is ~body_part or ~message, ZERO lines
@@ -864,13 +868,10 @@ gboolean matcherlist_match_file(MatcherList *matchers, MsgInfo *info,
                if (matcherlist_match_headers(matchers, fp))
                        read_body = FALSE;
        }
-       else {
-               matcherlist_skip_headers(fp);
-       }
 
        /* read the body */
        if (read_body) {
-               matcherlist_match_body(matchers, fp);
+               matcherlist_match_body(matchers, fp, read_headers);
        }
        
        for (l = matchers->matchers; l != NULL; l = g_slist_next(l)) {