summaryrefslogtreecommitdiffstats
path: root/src/erec.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-08-22 18:45:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-08-23 23:42:33 +0200
commitbe441e1ffdc2495162399b61053a8f8c18ebc5b6 (patch)
tree6c49381c37635690f69c8d21f52c24648b53210f /src/erec.c
parente1946ec7f11e2c6daa11b141eb344ef44642056f (diff)
src: add debugging mask to context structure
So this toggle is not global anymore. Update name that fits better with the semantics of this variable. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/erec.c')
-rw-r--r--src/erec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/erec.c b/src/erec.c
index 439add97..b5964465 100644
--- a/src/erec.c
+++ b/src/erec.c
@@ -112,7 +112,8 @@ struct error_record *erec_create(enum error_record_types type,
return erec;
}
-void erec_print(FILE *f, const struct error_record *erec)
+void erec_print(FILE *f, const struct error_record *erec,
+ unsigned int debug_mask)
{
const struct location *loc = erec->locations, *iloc;
const struct input_descriptor *indesc = loc->indesc, *tmp;
@@ -153,7 +154,7 @@ void erec_print(FILE *f, const struct error_record *erec)
fprintf(f, "%s\n", erec->msg);
for (l = 0; l < (int)erec->num_locations; l++) {
loc = &erec->locations[l];
- netlink_dump_expr(loc->nle);
+ netlink_dump_expr(loc->nle, debug_mask);
}
fprintf(f, "\n");
} else {
@@ -202,13 +203,13 @@ void erec_print(FILE *f, const struct error_record *erec)
fprintf(f, "\n");
}
-void erec_print_list(FILE *f, struct list_head *list)
+void erec_print_list(FILE *f, struct list_head *list, unsigned int debug_mask)
{
struct error_record *erec, *next;
list_for_each_entry_safe(erec, next, list, list) {
list_del(&erec->list);
- erec_print(f, erec);
+ erec_print(f, erec, debug_mask);
erec_destroy(erec);
}
}