Skip to content

Commit

Permalink
QUIC QLOG: Use set0
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from openssl#22037)
  • Loading branch information
hlandau authored and Sashan committed Feb 12, 2024
1 parent e261969 commit ebeb5f3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/internal/quic_fifd.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */

int ossl_quic_fifd_pkt_commit(QUIC_FIFD *fifd, QUIC_TXPIM_PKT *pkt);

void ossl_quic_fifd_set_qlog(QUIC_FIFD *fifd, QLOG *qlog);
void ossl_quic_fifd_set0_qlog(QUIC_FIFD *fifd, QLOG *qlog);

# endif

Expand Down
2 changes: 1 addition & 1 deletion include/internal/quic_record_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void ossl_qtx_set_msg_callback(OSSL_QTX *qtx, ossl_msg_cb msg_callback,
void ossl_qtx_set_msg_callback_arg(OSSL_QTX *qtx, void *msg_callback_arg);

/* Change QLOG instance in use after instantiation. */
void ossl_qtx_set_qlog(OSSL_QTX *qtx, QLOG *qlog);
void ossl_qtx_set0_qlog(OSSL_QTX *qtx, QLOG *qlog);

/*
* Secret Management
Expand Down
4 changes: 2 additions & 2 deletions include/internal/quic_txp.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ int ossl_quic_tx_packetiser_set_peer(OSSL_QUIC_TX_PACKETISER *txp,
/*
* Change the QLOG instance in use after instantiation.
*/
void ossl_quic_tx_packetiser_set_qlog(OSSL_QUIC_TX_PACKETISER *txp,
QLOG *qlog);
void ossl_quic_tx_packetiser_set0_qlog(OSSL_QUIC_TX_PACKETISER *txp,
QLOG *qlog);

/*
* Inform the TX packetiser that an EL has been discarded. Idempotent.
Expand Down
4 changes: 2 additions & 2 deletions ssl/quic/quic_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -3331,8 +3331,8 @@ int ossl_quic_channel_on_new_conn(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
return 0;

/* Setup QLOG, which did not happen earlier due to lacking an Initial ODCID. */
ossl_qtx_set_qlog(ch->qtx, ch_get_qlog(ch));
ossl_quic_tx_packetiser_set_qlog(ch->txp, ch_get_qlog(ch));
ossl_qtx_set0_qlog(ch->qtx, ch_get_qlog(ch));
ossl_quic_tx_packetiser_set0_qlog(ch->txp, ch_get_qlog(ch));

/* Plug in secrets for the Initial EL. */
if (!ossl_quic_provide_initial_secret(ch->port->engine->libctx,
Expand Down
2 changes: 1 addition & 1 deletion ssl/quic/quic_fifd.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ int ossl_quic_fifd_pkt_commit(QUIC_FIFD *fifd, QUIC_TXPIM_PKT *pkt)
return ossl_ackm_on_tx_packet(fifd->ackm, &pkt->ackm_pkt);
}

void ossl_quic_fifd_set_qlog(QUIC_FIFD *fifd, QLOG *qlog)
void ossl_quic_fifd_set0_qlog(QUIC_FIFD *fifd, QLOG *qlog)
{
fifd->qlog = qlog;
}
2 changes: 1 addition & 1 deletion ssl/quic/quic_record_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void ossl_qtx_set_mutator(OSSL_QTX *qtx, ossl_mutate_packet_cb mutatecb,
qtx->mutatearg = mutatearg;
}

void ossl_qtx_set_qlog(OSSL_QTX *qtx, QLOG *qlog)
void ossl_qtx_set0_qlog(OSSL_QTX *qtx, QLOG *qlog)
{
qtx->qlog = qlog;
}
Expand Down
6 changes: 3 additions & 3 deletions ssl/quic/quic_txp.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ void ossl_quic_tx_packetiser_set_ack_tx_cb(OSSL_QUIC_TX_PACKETISER *txp,
txp->ack_tx_cb_arg = cb_arg;
}

void ossl_quic_tx_packetiser_set_qlog(OSSL_QUIC_TX_PACKETISER *txp,
QLOG *qlog)
void ossl_quic_tx_packetiser_set0_qlog(OSSL_QUIC_TX_PACKETISER *txp,
QLOG *qlog)
{
ossl_quic_fifd_set_qlog(&txp->fifd, qlog);
ossl_quic_fifd_set0_qlog(&txp->fifd, qlog);
}

int ossl_quic_tx_packetiser_discard_enc_level(OSSL_QUIC_TX_PACKETISER *txp,
Expand Down

0 comments on commit ebeb5f3

Please sign in to comment.