summaryrefslogtreecommitdiffstats
path: root/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c
diff options
context:
space:
mode:
authorYDBot <[email protected]>2025-10-23 18:38:13 +0000
committerYDBot <[email protected]>2025-10-23 18:38:13 +0000
commit564cf7cb2255a107b4f44c18b2a1844041f20b4d (patch)
tree6a4a60e8bde612dcc3ac7fd93fffbd36351d4e35 /contrib/libs/ngtcp2/lib/ngtcp2_qlog.c
parent89a17b25091c24744b7ebd0650b5b810457b1145 (diff)
parenta703d86902fd02bd8e373d959b2498c034657449 (diff)
Merge pull request #27203 from ydb-platform/merge-rightlib-251021-0051
Diffstat (limited to 'contrib/libs/ngtcp2/lib/ngtcp2_qlog.c')
-rw-r--r--contrib/libs/ngtcp2/lib/ngtcp2_qlog.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c b/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c
index c0f920746a4..19667e17dba 100644
--- a/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c
+++ b/contrib/libs/ngtcp2/lib/ngtcp2_qlog.c
@@ -227,13 +227,11 @@ void ngtcp2_qlog_start(ngtcp2_qlog *qlog, const ngtcp2_cid *odcid, int server) {
}
void ngtcp2_qlog_end(ngtcp2_qlog *qlog) {
- uint8_t buf[1] = {0};
-
if (!qlog->write) {
return;
}
- qlog->write(qlog->user_data, NGTCP2_QLOG_WRITE_FLAG_FIN, &buf, 0);
+ qlog->write(qlog->user_data, NGTCP2_QLOG_WRITE_FLAG_FIN, "", 0);
}
static ngtcp2_vec vec_pkt_type_initial = ngtcp2_make_vec_lit("initial");
@@ -1095,7 +1093,6 @@ void ngtcp2_qlog_metrics_updated(ngtcp2_qlog *qlog,
void ngtcp2_qlog_pkt_lost(ngtcp2_qlog *qlog, ngtcp2_rtb_entry *ent) {
uint8_t buf[256];
uint8_t *p = buf;
- ngtcp2_pkt_hd hd = {0};
if (!qlog->write) {
return;
@@ -1107,11 +1104,11 @@ void ngtcp2_qlog_pkt_lost(ngtcp2_qlog *qlog, ngtcp2_rtb_entry *ent) {
p = write_verbatim(
p, ",\"name\":\"recovery:packet_lost\",\"data\":{\"header\":");
- hd.type = ent->hd.type;
- hd.flags = ent->hd.flags;
- hd.pkt_num = ent->hd.pkt_num;
-
- p = write_pkt_hd(p, &hd);
+ p = write_pkt_hd(p, &(ngtcp2_pkt_hd){
+ .pkt_num = ent->hd.pkt_num,
+ .type = ent->hd.type,
+ .flags = ent->hd.flags,
+ });
p = write_verbatim(p, "}}\n");
qlog->write(qlog->user_data, NGTCP2_QLOG_WRITE_FLAG_NONE, buf,
@@ -1154,20 +1151,19 @@ void ngtcp2_qlog_stateless_reset_pkt_received(
ngtcp2_qlog *qlog, const ngtcp2_pkt_stateless_reset *sr) {
uint8_t buf[256];
uint8_t *p = buf;
- ngtcp2_pkt_hd hd = {0};
if (!qlog->write) {
return;
}
- hd.type = NGTCP2_PKT_STATELESS_RESET;
-
*p++ = '\x1e';
*p++ = '{';
p = qlog_write_time(qlog, p);
p = write_verbatim(
p, ",\"name\":\"transport:packet_received\",\"data\":{\"header\":");
- p = write_pkt_hd(p, &hd);
+ p = write_pkt_hd(p, &(ngtcp2_pkt_hd){
+ .type = NGTCP2_PKT_STATELESS_RESET,
+ });
*p++ = ',';
p = write_pair_hex(p, "stateless_reset_token", sr->stateless_reset_token,
NGTCP2_STATELESS_RESET_TOKENLEN);