CLEANUP: qpack: properly use the QPACK macros not HPACK ones in debug code
There were a few leftovers of DEBUG_HPACK and HPACK_SHT_SIZE instead of
their QPACK equivalent in the QPACK debug code. There's no harm anyway,
but it could lead to confusing results if the tables are not sized
equally.
diff --git a/src/qpack-tbl.c b/src/qpack-tbl.c
index 09f0115..7c59fd2 100644
--- a/src/qpack-tbl.c
+++ b/src/qpack-tbl.c
@@ -144,7 +144,7 @@
struct pool_head *pool_head_qpack_tbl = NULL;
-#ifdef DEBUG_HPACK
+#ifdef DEBUG_QPACK
/* dump the whole dynamic header table */
void qpack_dht_dump(FILE *out, const struct qpack_dht *dht)
{
@@ -152,8 +152,8 @@
unsigned int slot;
char name[4096], value[4096];
- for (i = HPACK_SHT_SIZE; i < HPACK_SHT_SIZE + dht->used; i++) {
- slot = (qpack_get_dte(dht, i - HPACK_SHT_SIZE + 1) - dht->dte);
+ for (i = QPACK_SHT_SIZE; i < QPACK_SHT_SIZE + dht->used; i++) {
+ slot = (qpack_get_dte(dht, i - QPACK_SHT_SIZE + 1) - dht->dte);
fprintf(out, "idx=%u slot=%u name=<%s> value=<%s> addr=%u-%u\n",
i, slot,
istpad(name, qpack_idx_to_name(dht, i)).ptr,
@@ -193,7 +193,7 @@
abort();
}
}
-#endif // DEBUG_HPACK
+#endif // DEBUG_QPACK
/* rebuild a new dynamic header table from <dht> with an unwrapped index and
* contents at the end. The new table is returned, the caller must not use the