CLEANUP: qpack: suppress by default stdout traces

Remove the definition of DEBUG_HPACK on qpack-dec.c which forces the
QPACK decoding traces on stderr. Also change the name to use a dedicated
one for QPACK decoding as DEBUG_QPACK.
This commit is contained in:
Amaury Denoyelle 2022-03-25 14:56:51 +01:00
parent 18a10d07b6
commit d96361b270
2 changed files with 3 additions and 5 deletions

View File

@ -257,7 +257,7 @@ SMALL_OPTS =
# DEBUG_MEM_STATS, DEBUG_DONT_SHARE_POOLS, DEBUG_FD, DEBUG_POOL_INTEGRITY,
# DEBUG_NO_POOLS, DEBUG_FAIL_ALLOC, DEBUG_STRICT_ACTION=[0-3], DEBUG_HPACK,
# DEBUG_AUTH, DEBUG_SPOE, DEBUG_UAF, DEBUG_THREAD, DEBUG_STRICT, DEBUG_DEV,
# DEBUG_TASK, DEBUG_MEMORY_POOLS, DEBUG_POOL_TRACING.
# DEBUG_TASK, DEBUG_MEMORY_POOLS, DEBUG_POOL_TRACING, DEBUG_QPACK.
DEBUG = -DDEBUG_STRICT -DDEBUG_MEMORY_POOLS
#### Trace options

View File

@ -35,9 +35,7 @@
#include <haproxy/http-hdr.h>
#include <haproxy/tools.h>
#define DEBUG_HPACK
#if defined(DEBUG_HPACK)
#if defined(DEBUG_QPACK)
#define qpack_debug_printf fprintf
#define qpack_debug_hexdump debug_hexdump
#else
@ -207,7 +205,7 @@ int qpack_decode_fs(const unsigned char *raw, size_t len, struct buffer *tmp,
if (efl_type == QPACK_LFL_WPBNM) {
/* Literal field line with post-base name reference */
uint64_t index __maybe_unused, length;
unsigned int n __maybe_unused, h;
unsigned int n __maybe_unused, h __maybe_unused;
qpack_debug_printf(stderr, "literal field line with post-base name reference:");
n = *raw & 0x08;