]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/pppoe/if.c
Header file reorganization and cleaning up the public API for pppd version 2.5.0...
[ppp.git] / pppd / plugins / pppoe / if.c
index 225dd567c2e7486c5ef3998c108ac5e8bb18afce..87e5f6ec87921e1dd93fff200b2d1d78a1a8d314 100644 (file)
 static char const RCSID[] =
 "$Id: if.c,v 1.2 2008/06/09 08:34:23 paulus Exp $";
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #define _GNU_SOURCE 1
 #include "pppoe.h"
-#include "pppd/pppd.h"
+#include <pppd/pppd.h>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -201,7 +205,7 @@ sendPacket(PPPoEConnection *conn, int sock, PPPoEPacket *pkt, int size)
 {
     int err;
 
-    if (debug)
+    if (debug_on())
        pppoe_log_packet("Send ", pkt);
 #if defined(HAVE_STRUCT_SOCKADDR_LL)
     err = send(sock, pkt, size, 0);
@@ -236,7 +240,7 @@ receivePacket(int sock, PPPoEPacket *pkt, int *size)
        error("error receiving pppoe packet: %m");
        return -1;
     }
-    if (debug)
+    if (debug_on())
        pppoe_log_packet("Recv ", pkt);
     return 0;
 }