From 58212876b427e1c60ce11ae42e145f802d443e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Wed, 26 Dec 2007 10:24:31 +0000 Subject: [PATCH] Remove hack, as we can use 'filter' command in kdbg instead Fix debug level definitions svn path=/trunk/; revision=31443 --- reactos/drivers/network/tcpip/include/debug.h | 10 +++++----- reactos/drivers/network/tcpip/tcpip/main.c | 11 ----------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/reactos/drivers/network/tcpip/include/debug.h b/reactos/drivers/network/tcpip/include/debug.h index af16b58769d..9b8664974f1 100644 --- a/reactos/drivers/network/tcpip/include/debug.h +++ b/reactos/drivers/network/tcpip/include/debug.h @@ -9,9 +9,9 @@ #ifndef __DEBUG_H #define __DEBUG_H -#define MIN_TRACE DPFLTR_WARNING_LEVEL -#define MID_TRACE DPFLTR_WARNING_LEVEL | DPFLTR_TRACE_LEVEL -#define MAX_TRACE DPFLTR_WARNING_LEVEL | DPFLTR_TRACE_LEVEL | DPFLTR_INFO_LEVEL +#define MIN_TRACE ((1 << DPFLTR_WARNING_LEVEL)) +#define MID_TRACE ((1 << DPFLTR_WARNING_LEVEL) | (1 << DPFLTR_TRACE_LEVEL)) +#define MAX_TRACE ((1 << DPFLTR_WARNING_LEVEL) | (1 << DPFLTR_TRACE_LEVEL) | (1 << DPFLTR_INFO_LEVEL)) #define DEBUG_CHECK 0x00000100 #define DEBUG_MEMORY 0x00000200 @@ -37,8 +37,8 @@ #define REMOVE_PARENS(...) __VA_ARGS__ #define TI_DbgPrint(_t_, _x_) \ - DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) & DPFLTR_MASK, "(%s:%d) ", __FILE__, __LINE__), \ - DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) & DPFLTR_MASK, REMOVE_PARENS _x_) + DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) | DPFLTR_MASK, "(%s:%d) ", __FILE__, __LINE__), \ + DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) | DPFLTR_MASK, REMOVE_PARENS _x_) #else /* DBG */ diff --git a/reactos/drivers/network/tcpip/tcpip/main.c b/reactos/drivers/network/tcpip/tcpip/main.c index 370b8fb90bc..84a53d120ec 100644 --- a/reactos/drivers/network/tcpip/tcpip/main.c +++ b/reactos/drivers/network/tcpip/tcpip/main.c @@ -9,14 +9,6 @@ */ #include "precomp.h" -#define NDEBUG - -#ifndef NDEBUG -DWORD DebugTraceLevel = DEBUG_ULTRA & ~(DEBUG_LOCK | DEBUG_PBUFFER); -#else -DWORD DebugTraceLevel = 0; -#endif /* NDEBUG */ - PDEVICE_OBJECT TCPDeviceObject = NULL; PDEVICE_OBJECT UDPDeviceObject = NULL; PDEVICE_OBJECT IPDeviceObject = NULL; @@ -861,9 +853,6 @@ DriverEntry( DueTime.QuadPart = -(LONGLONG)IP_TIMEOUT * 10000; KeSetTimerEx(&IPTimer, DueTime, IP_TIMEOUT, &IPTimeoutDpc); - /* ROS Hack: ideally, DebugTraceLevel variable should be removed */ - DbgSetDebugFilterState(DPFLTR_TCPIP_ID, DebugTraceLevel, TRUE); - return STATUS_SUCCESS; }