From 4a98b9360e2552340a0953a4bed6aed95c29e3df Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 31 Jan 2024 13:45:39 -0800 Subject: tls: convert ctx fields to connection flags Type: refactor Change-Id: I527bbc1cf2e7b6d06fd0c88b7563fb59ed28bc40 Signed-off-by: Florin Coras --- src/plugins/tlspicotls/tls_picotls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/tlspicotls') diff --git a/src/plugins/tlspicotls/tls_picotls.c b/src/plugins/tlspicotls/tls_picotls.c index 4c19084fea3..f6b267f0901 100644 --- a/src/plugins/tlspicotls/tls_picotls.c +++ b/src/plugins/tlspicotls/tls_picotls.c @@ -180,7 +180,7 @@ static void picotls_handle_handshake_failure (tls_ctx_t * ctx) { session_free (session_get (ctx->c_s_index, ctx->c_thread_index)); - ctx->no_app_session = 1; + ctx->flags |= TLS_CONN_F_NO_APP_SESSION; ctx->c_s_index = SESSION_INVALID_INDEX; tls_disconnect_transport (ctx); } @@ -213,7 +213,7 @@ picotls_app_close (tls_ctx_t * ctx) if (!svm_fifo_max_dequeue_cons (app_session->tx_fifo)) picotls_confirm_app_close (ctx); else - ctx->app_closed = 1; + ctx->flags |= TLS_CONN_F_APP_CLOSED; return 0; } @@ -625,7 +625,7 @@ picotls_ctx_write (tls_ctx_t *ctx, session_t *app_session, check_tls_fifo: - if (ctx->app_closed) + if (ctx->flags & TLS_CONN_F_APP_CLOSED) picotls_app_close (ctx); /* Deschedule and wait for deq notification if fifo is almost full */ -- cgit 1.2.3-korg