diff --git a/channels/urbdrc/CMakeLists.txt b/channels/urbdrc/CMakeLists.txt index 54d983f09..bc570e0ae 100644 --- a/channels/urbdrc/CMakeLists.txt +++ b/channels/urbdrc/CMakeLists.txt @@ -21,11 +21,7 @@ include_directories(common) add_subdirectory(common) if(WITH_CLIENT_CHANNELS) - option(WITH_URBDRC_DEBUG "Dump data send/received in URBDRC channel" OFF) - - if (WITH_URBDRC_DEBUG) - add_definitions(-DWITH_URBDRC_DEBUG=1) - endif() + option(WITH_DEBUG_URBDRC "Dump data send/received in URBDRC channel" OFF) find_package(libusb-1.0 REQUIRED) include_directories(${LIBUSB_1_INCLUDE_DIRS}) diff --git a/channels/urbdrc/common/urbdrc_helpers.c b/channels/urbdrc/common/urbdrc_helpers.c index 0df6e5907..80d6149d4 100644 --- a/channels/urbdrc/common/urbdrc_helpers.c +++ b/channels/urbdrc/common/urbdrc_helpers.c @@ -17,6 +17,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "urbdrc_helpers.h" #include "urbdrc_types.h" #include @@ -406,7 +410,7 @@ void urbdrc_dump_message(wLog* log, BOOL client, BOOL write, wStream* s) ", FunctionId=%08" PRIx32 ", length=%" PRIdz, type, call_to_string(client, InterfaceId, FunctionId), FunctionId, InterfaceId, MessageId, FunctionId, length); -#if defined(WITH_URBDRC_DEBUG) +#if defined(WITH_DEBUG_URBDRC) if (write) WLog_Print(log, WLOG_TRACE, "-------------------------- URBDRC sent: ---"); else diff --git a/config.h.in b/config.h.in index 7e6fdfd9b..2264e5952 100644 --- a/config.h.in +++ b/config.h.in @@ -160,6 +160,7 @@ #cmakedefine WITH_DEBUG_RDPEI #cmakedefine WITH_DEBUG_TIMEZONE #cmakedefine WITH_DEBUG_THREADS +#cmakedefine WITH_DEBUG_URBDRC #cmakedefine WITH_DEBUG_MUTEX #cmakedefine WITH_DEBUG_TRANSPORT #cmakedefine WITH_DEBUG_WND