Commit 090a8aa1 authored by Filippo Della Betta's avatar Filippo Della Betta Committed by Youness Alaoui

Added fix for Visual Studio platform

parent e3b023a8
......@@ -346,9 +346,20 @@ static void adjustMTU(PseudoTcpSocket *self);
// The following logging is for detailed (packet-level) pseudotcp analysis only.
static PseudoTcpDebugLevel debug_level = PSEUDO_TCP_DEBUG_NONE;
#ifndef _MSC_VER
#define DEBUG(level, fmt, ...) \
if (debug_level >= level) \
g_debug ("PseudoTcpSocket %p: " fmt, self, ## __VA_ARGS__)
#else
/* HACK ALERT: To avoid Visual Studio compiler error due to the following bug
* https://connect.microsoft.com/VisualStudio/feedback/details/604348/-va-args-support-has-an-error
* we need to expand the g_debug macro and use g_log directly
*/
#define DEBUG(level, fmt, ...) \
if (debug_level >= level) \
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "PseudoTcpSocket %p: " fmt, \
self, ## __VA_ARGS__)
#endif
void
pseudo_tcp_set_debug_level (PseudoTcpDebugLevel level)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment