-
- /* hard_threshold parameter is an integer.
- * If the matching score of a ip get a score gretter than this threshold,
- * the hook "hard_match" is called.
- * hard_threshold = 0 means, that all matches are hard matches.
- * default is 0;
- */
- } else if (strcmp(param->name, "hard_threshold") == 0) {
- char *next;
- data->hard_threshold = strtol(param->value, &next, 10);
- PARSE_CHECK(*next, "invalid threshold value %s", param->value);
-
- /* soft_threshold parameter is an integer.
- * if the matching score of an ip get a score getter than this threshold
- * and smaller or equal than the hard_threshold, the hook "soft_match"
- * is called.
- * default is 0;
- */
- } else if (strcmp(param->name, "hard_threshold") == 0) {
- char *next;
- data->soft_threshold = strtol(param->value, &next, 10);
- PARSE_CHECK(*next, "invalid threshold value %s", param->value);
-
- } else {
- syslog(LOG_INFO, "ignored parameter %s in rbl filter %s",
- filter->name, param->name);
+ } break;
+
+ /* hard_threshold parameter is an integer.
+ * If the matching score is greater or equal than this threshold,
+ * the hook "hard_match" is called.
+ * hard_threshold = 1 means, that all matches are hard matches.
+ * default is 1;
+ */
+ FILTER_PARAM_PARSE_INT(HARD_THRESHOLD, data->hard_threshold);
+
+ /* soft_threshold parameter is an integer.
+ * if the matching score is greater or equal than this threshold
+ * and smaller or equal than the hard_threshold, the hook "soft_match"
+ * is called.
+ * default is 1;
+ */
+ FILTER_PARAM_PARSE_INT(SOFT_THRESHOLD, data->soft_threshold);
+
+ default: break;