mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-28 17:21:32 +02:00
MINOR: h3: refactor h3_control_send()
The only change is that the H3_CF_SETTINGS_SENT flag if-condition is replaced by a BUG_ON statement. This may help to catch multiple calls on h3_control_send() instead of silently ignore them.
This commit is contained in:
parent
160507d0ba
commit
65df3add33
8
src/h3.c
8
src/h3.c
@ -464,12 +464,13 @@ static int h3_control_send(struct h3_uqs *h3_uqs, void *ctx)
|
|||||||
struct h3c *h3c = ctx;
|
struct h3c *h3c = ctx;
|
||||||
unsigned char data[(2 + 3) * 2 * QUIC_VARINT_MAX_SIZE]; /* enough for 3 settings */
|
unsigned char data[(2 + 3) * 2 * QUIC_VARINT_MAX_SIZE]; /* enough for 3 settings */
|
||||||
struct buffer pos, *res;
|
struct buffer pos, *res;
|
||||||
|
size_t frm_len;
|
||||||
|
struct qcs *qcs = h3_uqs->qcs;
|
||||||
|
|
||||||
|
BUG_ON_HOT(h3c->flags & H3_CF_SETTINGS_SENT);
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
pos = b_make((char *)data, sizeof(data), 0, 0);
|
pos = b_make((char *)data, sizeof(data), 0, 0);
|
||||||
if (!(h3c->flags & H3_CF_SETTINGS_SENT)) {
|
|
||||||
struct qcs *qcs = h3_uqs->qcs;
|
|
||||||
size_t frm_len;
|
|
||||||
|
|
||||||
frm_len = quic_int_getsize(H3_SETTINGS_QPACK_MAX_TABLE_CAPACITY) +
|
frm_len = quic_int_getsize(H3_SETTINGS_QPACK_MAX_TABLE_CAPACITY) +
|
||||||
quic_int_getsize(h3_settings_qpack_max_table_capacity) +
|
quic_int_getsize(h3_settings_qpack_max_table_capacity) +
|
||||||
@ -506,7 +507,6 @@ static int h3_control_send(struct h3_uqs *h3_uqs, void *ctx)
|
|||||||
if (!(qcs->qcc->wait_event.events & SUB_RETRY_SEND))
|
if (!(qcs->qcc->wait_event.events & SUB_RETRY_SEND))
|
||||||
tasklet_wakeup(qcs->qcc->wait_event.tasklet);
|
tasklet_wakeup(qcs->qcc->wait_event.tasklet);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user