bugfix for scoring - age in days instead of seconds
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Sun, 6 May 2001 05:05:41 +0000 (05:05 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Sun, 6 May 2001 05:05:41 +0000 (05:05 +0000)
src/matcher.c
src/scoring.c

index 10b3603ad76bc0dc57fa147b37e6483d702ebec2..2e6a5a1e46d0cafef403c7666c8867a386892716 100644 (file)
@@ -466,10 +466,10 @@ gboolean matcherprop_match(MatcherProp * prop, MsgInfo * info)
                || matcherprop_string_match(prop, info->cc));
        case SCORING_AGE_SUP:
                t = time(NULL);
-               return (t - info->date_t) > prop->age;
+               return ((t - info->date_t) / (60 * 60 * 24)) >= prop->age;
        case SCORING_AGE_INF:
                t = time(NULL);
-               return (t - info->date_t) < prop->age;
+               return ((t - info->date_t) / (60 * 60 * 24)) <= prop->age;
        case SCORING_NEWSGROUPS:
                return matcherprop_string_match(prop, info->newsgroups);
        case SCORING_NOT_NEWSGROUPS:
index 8511e10de4e1377e35975ca05f78f3d76c83401a..7e7cdde08d592d15e005d64c972eb8da8f5031d7 100644 (file)
@@ -166,7 +166,7 @@ void prefs_scoring_read_config(void)
 
                g_strchomp(buf);
 
-               if (*buf != '#') {
+               if ((*buf != '#') && (*buf != '\0')) {
                        tmp = buf;
                        scoring = scoringprop_parse(&tmp);
                        if (tmp != NULL) {