Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dist/ipf/netinet Don't refer to ipf_log_soft_destroy(), ...



details:   https://anonhg.NetBSD.org/src/rev/707867d9ce83
branches:  trunk
changeset: 773401:707867d9ce83
user:      he <he%NetBSD.org@localhost>
date:      Wed Feb 01 10:18:04 2012 +0000

description:
Don't refer to ipf_log_soft_destroy(), ipf_log_soft_create(),
ipf_log_soft_init(), and ipf_log_soft_fini() unless IPFILTER_LOG is
defined, since ipf_log.c won't be built unless that flag is defined,
ref. sys/netinet/files.ipfilter.

diffstat:

 sys/dist/ipf/netinet/fil.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (67 lines):

diff -r 9001e2706f70 -r 707867d9ce83 sys/dist/ipf/netinet/fil.c
--- a/sys/dist/ipf/netinet/fil.c        Wed Feb 01 10:04:55 2012 +0000
+++ b/sys/dist/ipf/netinet/fil.c        Wed Feb 01 10:18:04 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fil.c,v 1.49 2012/02/01 10:03:24 he Exp $      */
+/*     $NetBSD: fil.c,v 1.50 2012/02/01 10:18:04 he Exp $      */
 
 /*
  * Copyright (C) 2012 by Darren Reed.
@@ -138,7 +138,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.49 2012/02/01 10:03:24 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.50 2012/02/01 10:18:04 he Exp $");
 #else
 static const char sccsid[] = "@(#)fil.c        1.36 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: fil.c,v 2.443.2.36 2012/01/29 05:30:35 darrenr Exp";
@@ -9318,11 +9318,13 @@
        if (softc == NULL)
                return NULL;
 
+#ifdef IPFILTER_LOG
        softc->ipf_log_soft = ipf_log_soft_create(softc);
        if (softc->ipf_log_soft == NULL) {
                ipf_destroy_all(softc);
                return NULL;
        }
+#endif
 
        softc->ipf_lookup_soft = ipf_lookup_soft_create(softc);
        if (softc->ipf_lookup_soft == NULL) {
@@ -9421,10 +9423,12 @@
                softc->ipf_lookup_soft = NULL;
        }
 
+#ifdef IPFILTER_LOG
        if (softc->ipf_log_soft != NULL) {
                ipf_log_soft_destroy(softc, softc->ipf_log_soft);
                softc->ipf_log_soft = NULL;
        }
+#endif
 
        ipf_main_soft_destroy(softc, NULL);
 }
@@ -9446,8 +9450,10 @@
        if (ipf_main_soft_init(softc) == -1)
                return -1;
 
+#ifdef IPFILTER_LOG
        if (ipf_log_soft_init(softc, softc->ipf_log_soft) == -1)
                return -1;
+#endif
 
        if (ipf_lookup_soft_init(softc, softc->ipf_lookup_soft) == -1)
                return -1;
@@ -9508,8 +9514,10 @@
        if (ipf_lookup_soft_fini(softc, softc->ipf_lookup_soft) == -1)
                return -1;
 
+#ifdef IPFILTER_LOG
        if (ipf_log_soft_fini(softc, softc->ipf_log_soft) == -1)
                return -1;
+#endif
 
        if (ipf_main_soft_fini(softc) == -1)
                return -1;



Home | Main Index | Thread Index | Old Index