From 216f5575348f602bd843cd8d2df1b01e0040f821 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti <kgiusti@redhat.com> Date: Fri, 30 Jun 2023 09:28:08 -0400 Subject: [PATCH] fixup: clang-format, redundant flag clear --- src/adaptors/tcp/tcp_adaptor.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/adaptors/tcp/tcp_adaptor.c b/src/adaptors/tcp/tcp_adaptor.c index 01e545df6..117a47773 100644 --- a/src/adaptors/tcp/tcp_adaptor.c +++ b/src/adaptors/tcp/tcp_adaptor.c @@ -91,17 +91,17 @@ struct qdr_tcp_connection_t { bool flow_enabled; bool is_egress_dispatcher_conn; bool connector_closed;//only used if egress_dispatcher=true - bool in_list; // This connection is in the adaptor's connections list + bool in_list; // This connection is in the adaptor's connections list bool raw_read_shutdown; // stream closed bool read_eos_seen; bool window_disabled; // true: ignore unacked byte window - bool require_tls; // Is TLS required on this connection ? - sys_atomic_t check_idle_conn; // check if connection has been idle - sys_atomic_t raw_closed_read; // proton event seen - sys_atomic_t raw_closed_write; // proton event seen or write_close called + bool require_tls; // Is TLS required on this connection ? + sys_atomic_t check_idle_conn; // check if connection has been idle + sys_atomic_t raw_closed_read; // proton event seen + sys_atomic_t raw_closed_write; // proton event seen or write_close called qdr_delivery_t *initial_delivery; qd_timer_t *activate_timer; - qd_timer_t *idle_timer; + qd_timer_t *idle_timer; qd_tcp_adaptor_config_t *config; // config qd_server_t *server; qd_tls_t *tls; @@ -249,7 +249,7 @@ static void on_activate(void *context) // static void on_idle_timer(void *context) { - qdr_tcp_connection_t* conn = (qdr_tcp_connection_t*) context; + qdr_tcp_connection_t *conn = (qdr_tcp_connection_t *) context; SET_ATOMIC_FLAG(&conn->check_idle_conn); pn_raw_connection_wake(conn->pn_raw_conn); } @@ -1116,13 +1116,11 @@ static void handle_connection_event(pn_event_t *e, qd_server_t *qd_server, void qd_log(LOG_TCP_ADAPTOR, QD_LOG_DEBUG, "[C%" PRIu64 "] PN_RAW_CONNECTION_WAKE %s", conn->conn_id, qdr_tcp_connection_role_name(conn)); if (CLEAR_ATOMIC_FLAG(&conn->check_idle_conn)) { - conn->check_idle_conn = false; uint64_t new_snapshot = conn->bytes_in + conn->bytes_out; if (new_snapshot == conn->idle_snapshot) { // TODO(kgiusti): need vflow update! qd_log(LOG_TCP_ADAPTOR, QD_LOG_WARNING, - "[C%" PRIu64 "] idle TCP client detected, closing the connection", - conn->conn_id); + "[C%" PRIu64 "] idle TCP client detected, closing the connection", conn->conn_id); pn_raw_connection_close(conn->pn_raw_conn); // thread-safe call break; } else {