When parsing QPACK encoder/decoder streams, h3_decode_qcs() displays an
error trace if they are empty. Change the return code used in QPACK code
to avoid this trace.
To uniformize with MUX/H3 code, 0 is now used to indicate success.
Beyond this spurious error trace, this bug has no impact.
switch (h3s->type) {
case H3S_T_QPACK_DEC:
- if (!qpack_decode_dec(qcs, NULL))
+ if (qpack_decode_dec(qcs, NULL))
return 1;
break;
case H3S_T_QPACK_ENC:
- if (!qpack_decode_enc(qcs, NULL))
+ if (qpack_decode_enc(qcs, NULL))
return 1;
break;
case H3S_T_UNKNOWN:
return 0;
}
-/* Decode an encoder stream */
+/* Decode an encoder stream.
+ *
+ * Returns 0 on success else non-zero.
+ */
int qpack_decode_enc(struct qcs *qcs, void *ctx)
{
size_t len;
/* Set dynamic table capacity */
}
- return 1;
+ return 0;
}
-/* Decode an decoder stream */
+/* Decode an decoder stream.
+ *
+ * Returns 0 on success else non-zero.
+ */
int qpack_decode_dec(struct qcs *qcs, void *ctx)
{
size_t len;
/* Stream cancellation */
}
- return 1;
+ return 0;
}
/* Decode a field section prefix made of <enc_ric> and <db> two varints.