Added compile time urbdrc debug option
authorakallabeth <akallabeth@posteo.net>
Fri, 3 Jul 2020 10:50:11 +0000 (12:50 +0200)
committerakallabeth <akallabeth@posteo.net>
Tue, 7 Jul 2020 08:44:11 +0000 (10:44 +0200)
(cherry picked from commit 5244efadcfb158c813d79b8e8c068fc33198f79b)

channels/urbdrc/CMakeLists.txt
channels/urbdrc/common/urbdrc_helpers.c
config.h.in

index 54d983f..bc570e0 100644 (file)
@@ -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})
index 0df6e59..80d6149 100644 (file)
  * 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 <winpr/print.h>
@@ -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
index 7e6fdfd..2264e59 100644 (file)
 #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