From: Colin Leroy Date: Tue, 29 Nov 2005 18:41:15 +0000 (+0000) Subject: 2005-11-29 [colin] 1.9.100cvs44 X-Git-Tag: rel_2_0_0~176 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=cbc313e8c94b1f0cd07635d30ede8fd269c99e31 2005-11-29 [colin] 1.9.100cvs44 * src/matcher.c Skip headers unconditionnaly in match_body if the rule is not message or ~message --- diff --git a/ChangeLog b/ChangeLog index 5ebd8b9e5..083520796 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-29 [colin] 1.9.100cvs44 + + * src/matcher.c + Skip headers unconditionnaly in match_body if the + rule is not message or ~message + 2005-11-29 [colin] 1.9.100cvs43 * src/matcher.c diff --git a/PATCHSETS b/PATCHSETS index 00b6f56c9..d46d4efbd 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -1027,3 +1027,4 @@ ( 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 +( cvs diff -u -r 1.75.2.12 -r 1.75.2.13 src/matcher.c; ) > 1.9.100cvs44.patchset diff --git a/configure.ac b/configure.ac index 9c860c6e8..cb6b206fe 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=100 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=43 +EXTRA_VERSION=44 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/matcher.c b/src/matcher.c index fd530dc99..35a117732 100644 --- a/src/matcher.c +++ b/src/matcher.c @@ -766,7 +766,7 @@ 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, gboolean read_headers) +static gboolean matcherlist_match_body(MatcherList *matchers, FILE *fp) { GSList *l; gchar buf[BUFFSIZE]; @@ -774,7 +774,8 @@ static gboolean matcherlist_match_body(MatcherList *matchers, FILE *fp, gboolean for (l = matchers->matchers ; l != NULL ; l = g_slist_next(l)) { MatcherProp *matcher = (MatcherProp *) l->data; - if (!read_headers) + rewind(fp); + if (!matcherprop_criteria_message(matcher)) matcherlist_skip_headers(fp); while (fgets(buf, sizeof(buf), fp) != NULL) { @@ -806,9 +807,6 @@ static gboolean matcherlist_match_body(MatcherList *matchers, FILE *fp, gboolean if (!matchers->bool_and) return TRUE; } - - /* restart at beginning */ - rewind(fp); } return FALSE; } @@ -871,7 +869,7 @@ gboolean matcherlist_match_file(MatcherList *matchers, MsgInfo *info, /* read the body */ if (read_body) { - matcherlist_match_body(matchers, fp, read_headers); + matcherlist_match_body(matchers, fp); } for (l = matchers->matchers; l != NULL; l = g_slist_next(l)) {