From 40bf3831e0aae6d77cdcdbcc96fa916c22233c96 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 4 Jul 2019 14:51:28 +0200 Subject: [esock] Fixed debug "file" Debug printouts is done to "dbgout", but the dbg macro flushed "stdout" (which was the default). So, in order to make the macro work properly in all cases, we rename dbgout to esock_dbgout and make it extern (was static), and then used that in the macro. OTP-15817 --- erts/emulator/nifs/common/socket_dbg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/emulator/nifs/common/socket_dbg.h') diff --git a/erts/emulator/nifs/common/socket_dbg.h b/erts/emulator/nifs/common/socket_dbg.h index 47739b46da..8fce211a8a 100644 --- a/erts/emulator/nifs/common/socket_dbg.h +++ b/erts/emulator/nifs/common/socket_dbg.h @@ -40,12 +40,12 @@ #endif typedef unsigned long long llu_t; - +extern FILE* esock_dbgout; // Initiated by the 'init' function #define ESOCK_DBG_PRINTF( ___COND___ , proto ) \ if ( ___COND___ ) { \ esock_dbg_printf proto; \ - fflush(stdout); \ + fflush(esock_dbgout); \ } -- cgit v1.2.3