MINOR: mux-quic: adjust return value of decode_qcs
Use 0 for success of decode_qcs operation else non-zero. This is to follow the same model which is in use in most of the function in MUX/H3 code.
This commit is contained in:
parent
e1cad8bc03
commit
0ffd6e7e64
3
src/h3.c
3
src/h3.c
@ -261,7 +261,8 @@ static int h3_data_to_htx(struct qcs *qcs, struct ncbuf *buf, uint64_t len,
|
|||||||
|
|
||||||
/* Decode <qcs> remotely initiated bidi-stream. <fin> must be set to indicate
|
/* Decode <qcs> remotely initiated bidi-stream. <fin> must be set to indicate
|
||||||
* that we received the last data of the stream.
|
* that we received the last data of the stream.
|
||||||
* Returns <0 on error else 0.
|
*
|
||||||
|
* Returns 0 on success else non-zero.
|
||||||
*/
|
*/
|
||||||
static int h3_decode_qcs(struct qcs *qcs, int fin, void *ctx)
|
static int h3_decode_qcs(struct qcs *qcs, int fin, void *ctx)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ static int hq_interop_decode_qcs(struct qcs *qcs, int fin, void *ctx)
|
|||||||
|
|
||||||
sl = htx_add_stline(htx, HTX_BLK_REQ_SL, 0, ist("GET"), path, ist("HTTP/1.0"));
|
sl = htx_add_stline(htx, HTX_BLK_REQ_SL, 0, ist("GET"), path, ist("HTTP/1.0"));
|
||||||
if (!sl)
|
if (!sl)
|
||||||
return -1;
|
return 1;
|
||||||
|
|
||||||
sl->flags |= HTX_SL_F_BODYLESS;
|
sl->flags |= HTX_SL_F_BODYLESS;
|
||||||
sl->info.req.meth = find_http_meth("GET", 3);
|
sl->info.req.meth = find_http_meth("GET", 3);
|
||||||
@ -74,7 +74,7 @@ static int hq_interop_decode_qcs(struct qcs *qcs, int fin, void *ctx)
|
|||||||
|
|
||||||
cs = qc_attach_cs(qcs, &htx_buf);
|
cs = qc_attach_cs(qcs, &htx_buf);
|
||||||
if (!cs)
|
if (!cs)
|
||||||
return -1;
|
return 1;
|
||||||
|
|
||||||
qcs_consume(qcs, ncb_data(rxbuf, 0));
|
qcs_consume(qcs, ncb_data(rxbuf, 0));
|
||||||
b_free(&htx_buf);
|
b_free(&htx_buf);
|
||||||
|
@ -433,7 +433,7 @@ static int qcc_decode_qcs(struct qcc *qcc, struct qcs *qcs)
|
|||||||
{
|
{
|
||||||
TRACE_ENTER(QMUX_EV_QCS_RECV, qcc->conn, qcs);
|
TRACE_ENTER(QMUX_EV_QCS_RECV, qcc->conn, qcs);
|
||||||
|
|
||||||
if (qcc->app_ops->decode_qcs(qcs, qcs->flags & QC_SF_FIN_RECV, qcc->ctx) < 0) {
|
if (qcc->app_ops->decode_qcs(qcs, qcs->flags & QC_SF_FIN_RECV, qcc->ctx)) {
|
||||||
TRACE_DEVEL("leaving on decoding error", QMUX_EV_QCS_RECV, qcc->conn, qcs);
|
TRACE_DEVEL("leaving on decoding error", QMUX_EV_QCS_RECV, qcc->conn, qcs);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user