return e;
}
-/* -------------------- XXX: MC READ MARK ------------- */
-
/* Compares mime types to the ok and except lists */
-static int count_body_parts_check(LIST **checklist, BODY *b, int dflt)
+static int count_body_parts_check(LIST **checklist, BODY *b)
{
LIST *type;
- ATTACH_MATCH *a;
-
- /* If list is null, use default behavior. */
- if (!*checklist)
- return 0;
for (type = *checklist; type; type = type->next) {
- a = (ATTACH_MATCH *)type->data;
- debug_print(5, ("cbpc: %s %d/%s ?? %s/%s [%d]... ",
- dflt ? "[OK] " : "[EXCL] ",
- b->type, b->subtype, a->major, a->minor, a->major_int));
- if ((a->major_int == TYPEANY || a->major_int == b->type) &&
- !regexec(&a->minor_rx, b->subtype, 0, NULL, 0)) {
- debug_print(5, ("yes\n"));
+ ATTACH_MATCH *a = (ATTACH_MATCH *)type->data;
+
+ if ((a->major_int == TYPEANY || a->major_int == b->type)
+ && !regexec(&a->minor_rx, b->subtype, 0, NULL, 0)) {
return 1;
- } else {
- debug_print(5, ("no\n"));
}
}
+
return 0;
}
+/* -------------------- XXX: MC READ MARK ------------- */
+
#define AT_COUNT(why) { shallcount = 1; }
#define AT_NOCOUNT(why) { shallcount = 0; }
*/
if (bp->disposition == DISPATTACH) {
- if (!count_body_parts_check(&AttachAllow, bp, 1))
+ if (!count_body_parts_check(&AttachAllow, bp))
AT_NOCOUNT("attach not allowed");
- if (count_body_parts_check(&AttachExclude, bp, 0))
+ if (count_body_parts_check(&AttachExclude, bp))
AT_NOCOUNT("attach excluded");
} else {
- if (!count_body_parts_check(&InlineAllow, bp, 1))
+ if (!count_body_parts_check(&InlineAllow, bp))
AT_NOCOUNT("inline not allowed");
- if (count_body_parts_check(&InlineExclude, bp, 0))
+ if (count_body_parts_check(&InlineExclude, bp))
AT_NOCOUNT("excluded");
}
}