blob: 7c5c08fb99b9b7fe0e90f5e062cef025a6764284 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-aa,v 1.2 2004/01/15 14:10:51 cube Exp $
--- mod.c.orig 2002-04-08 00:55:20.000000000 +0200
+++ mod.c
@@ -151,10 +151,19 @@ mod_close(void)
{
struct rule *rule;
+#if defined(FRAGROUTE_SYSTEM_SYS_QUEUE) && defined(__NetBSD__)
+ TAILQ_FOREACH_REVERSE(rule, &rules, head, next) {
+ if (rule->mod->close != NULL)
+ rule->data = rule->mod->close(rule->data);
+ TAILQ_REMOVE(&rules, rule, next);
+ free(rule);
+ }
+#else
TAILQ_FOREACH_REVERSE(rule, &rules, next, head) {
if (rule->mod->close != NULL)
rule->data = rule->mod->close(rule->data);
TAILQ_REMOVE(&rules, rule, next);
free(rule);
}
+#endif
}
|