diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-01-09 15:48:25 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-01-13 13:20:38 +0000 |
commit | b639475a9433c827675b8154ea9e0ce361403c76 (patch) | |
tree | f900924f6102dcde6e0425a4d34b48e8e907e879 /ssl | |
parent | df15e990ff2557fd43fe4d661c8e1988a3d0ffcc (diff) |
QUIC API: Rename want_net_read and want_net_write
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/quic_channel.c | 22 | ||||
-rw-r--r-- | ssl/quic/quic_impl.c | 12 | ||||
-rw-r--r-- | ssl/quic/quic_reactor.c | 20 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 8 |
4 files changed, 31 insertions, 31 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c index 0fb5c6d5d3..209309a424 100644 --- a/ssl/quic/quic_channel.c +++ b/ssl/quic/quic_channel.c @@ -998,9 +998,9 @@ static void ch_tick(QUIC_TICK_RESULT *res, void *arg) /* If we are in the TERMINATED state, there is nothing to do. */ if (ossl_quic_channel_is_terminated(ch)) { - res->want_net_read = 0; - res->want_net_write = 0; - res->tick_deadline = ossl_time_infinite(); + res->net_read_desired = 0; + res->net_write_desired = 0; + res->tick_deadline = ossl_time_infinite(); return; } @@ -1013,9 +1013,9 @@ static void ch_tick(QUIC_TICK_RESULT *res, void *arg) if (ossl_time_compare(now, ch->terminate_deadline) >= 0) { ch_on_terminating_timeout(ch); - res->want_net_read = 0; - res->want_net_write = 0; - res->tick_deadline = ossl_time_infinite(); + res->net_read_desired = 0; + res->net_write_desired = 0; + res->tick_deadline = ossl_time_infinite(); return; /* abort normal processing, nothing to do */ } } @@ -1057,9 +1057,9 @@ static void ch_tick(QUIC_TICK_RESULT *res, void *arg) * send a CONN_CLOSE frame; go straight to TERMINATED. */ ch_on_idle_timeout(ch); - res->want_net_read = 0; - res->want_net_write = 0; - res->tick_deadline = ossl_time_infinite(); + res->net_read_desired = 0; + res->net_write_desired = 0; + res->tick_deadline = ossl_time_infinite(); return; } @@ -1079,10 +1079,10 @@ static void ch_tick(QUIC_TICK_RESULT *res, void *arg) * errors in ch_rx_pre() or ch_tx() may have caused us to transition to the * Terminated state. */ - res->want_net_read = !ossl_quic_channel_is_terminated(ch); + res->net_read_desired = !ossl_quic_channel_is_terminated(ch); /* We want to write to the network if we have any in our queue. */ - res->want_net_write + res->net_write_desired = (!ossl_quic_channel_is_terminated(ch) && ossl_qtx_get_queue_len_datagrams(ch->qtx) > 0); } diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 991605c36a..c5490cd075 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -445,22 +445,22 @@ int ossl_quic_get_wpoll_descriptor(QUIC_CONNECTION *qc, BIO_POLL_DESCRIPTOR *des return BIO_get_wpoll_descriptor(qc->net_wbio, desc); } -/* SSL_want_net_read */ -int ossl_quic_get_want_net_read(QUIC_CONNECTION *qc) +/* SSL_net_read_desired */ +int ossl_quic_get_net_read_desired(QUIC_CONNECTION *qc) { if (qc->ch == NULL) return 0; - return ossl_quic_reactor_want_net_read(ossl_quic_channel_get_reactor(qc->ch)); + return ossl_quic_reactor_net_read_desired(ossl_quic_channel_get_reactor(qc->ch)); } -/* SSL_want_net_write */ -int ossl_quic_get_want_net_write(QUIC_CONNECTION *qc) +/* SSL_net_write_desired */ +int ossl_quic_get_net_write_desired(QUIC_CONNECTION *qc) { if (qc->ch == NULL) return 0; - return ossl_quic_reactor_want_net_write(ossl_quic_channel_get_reactor(qc->ch)); + return ossl_quic_reactor_net_write_desired(ossl_quic_channel_get_reactor(qc->ch)); } /* diff --git a/ssl/quic/quic_reactor.c b/ssl/quic/quic_reactor.c index aa4cff9a1d..95a54ad6b7 100644 --- a/ssl/quic/quic_reactor.c +++ b/ssl/quic/quic_reactor.c @@ -20,8 +20,8 @@ void ossl_quic_reactor_init(QUIC_REACTOR *rtor, { rtor->poll_r.type = BIO_POLL_DESCRIPTOR_TYPE_NONE; rtor->poll_w.type = BIO_POLL_DESCRIPTOR_TYPE_NONE; - rtor->want_net_read = 0; - rtor->want_net_write = 0; + rtor->net_read_desired = 0; + rtor->net_write_desired = 0; rtor->tick_deadline = initial_tick_deadline; rtor->tick_cb = tick_cb; @@ -48,14 +48,14 @@ const BIO_POLL_DESCRIPTOR *ossl_quic_reactor_get_poll_w(QUIC_REACTOR *rtor) return &rtor->poll_w; } -int ossl_quic_reactor_want_net_read(QUIC_REACTOR *rtor) +int ossl_quic_reactor_net_read_desired(QUIC_REACTOR *rtor) { - return rtor->want_net_read; + return rtor->net_read_desired; } -int ossl_quic_reactor_want_net_write(QUIC_REACTOR *rtor) +int ossl_quic_reactor_net_write_desired(QUIC_REACTOR *rtor) { - return rtor->want_net_write; + return rtor->net_write_desired; } OSSL_TIME ossl_quic_reactor_get_tick_deadline(QUIC_REACTOR *rtor) @@ -76,8 +76,8 @@ int ossl_quic_reactor_tick(QUIC_REACTOR *rtor) */ rtor->tick_cb(&res, rtor->tick_cb_arg); - rtor->want_net_read = res.want_net_read; - rtor->want_net_write = res.want_net_write; + rtor->net_read_desired = res.net_read_desired; + rtor->net_write_desired = res.net_write_desired; rtor->tick_deadline = res.tick_deadline; return 1; } @@ -280,9 +280,9 @@ int ossl_quic_reactor_block_until_pred(QUIC_REACTOR *rtor, return res; if (!poll_two_descriptors(ossl_quic_reactor_get_poll_r(rtor), - ossl_quic_reactor_want_net_read(rtor), + ossl_quic_reactor_net_read_desired(rtor), ossl_quic_reactor_get_poll_w(rtor), - ossl_quic_reactor_want_net_write(rtor), + ossl_quic_reactor_net_write_desired(rtor), ossl_quic_reactor_get_tick_deadline(rtor))) /* * We don't actually care why the call succeeded (timeout, FD diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 9db3c28073..39a334c989 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -7105,7 +7105,7 @@ int SSL_get_wpoll_descriptor(SSL *s, BIO_POLL_DESCRIPTOR *desc) #endif } -int SSL_want_net_read(SSL *s) +int SSL_net_read_desired(SSL *s) { #ifndef OPENSSL_NO_QUIC QUIC_CONNECTION *qc = QUIC_CONNECTION_FROM_SSL(s); @@ -7113,13 +7113,13 @@ int SSL_want_net_read(SSL *s) if (qc == NULL) return 0; - return ossl_quic_get_want_net_read(qc); + return ossl_quic_get_net_read_desired(qc); #else return 0; #endif } -int SSL_want_net_write(SSL *s) +int SSL_net_write_desired(SSL *s) { #ifndef OPENSSL_NO_QUIC QUIC_CONNECTION *qc = QUIC_CONNECTION_FROM_SSL(s); @@ -7127,7 +7127,7 @@ int SSL_want_net_write(SSL *s) if (qc == NULL) return 0; - return ossl_quic_get_want_net_write(qc); + return ossl_quic_get_net_write_desired(qc); #else return 0; #endif |