From 9d36a23443412aed53a72a4f75270011f2b88cdb Mon Sep 17 00:00:00 2001 From: h00793410 Date: Tue, 4 Jun 2024 16:23:59 +0800 Subject: [PATCH] fix connection_to_working Signed-off-by: h00793410 Change-Id: Ie24324e4c92c9a3e5ce0314d865d8a37f59eb9ce --- fs/hmdfs/comm/connection.c | 26 -------------------------- fs/hmdfs/comm/connection.h | 2 -- 2 files changed, 28 deletions(-) diff --git a/fs/hmdfs/comm/connection.c b/fs/hmdfs/comm/connection.c index 046688747d83..5804fbf010c2 100644 --- a/fs/hmdfs/comm/connection.c +++ b/fs/hmdfs/comm/connection.c @@ -590,26 +590,6 @@ void peer_online(struct hmdfs_peer *peer) hmdfs_queue_raw_node_evt(peer, RAW_NODE_EVT_ON); } -void connection_to_working(struct hmdfs_peer *node) -{ - struct connection *conn_impl = NULL; - struct tcp_handle *tcp = NULL; - - if (!node) - return; - mutex_lock(&node->conn_impl_list_lock); - list_for_each_entry(conn_impl, &node->conn_impl_list, list) { - if (conn_impl->type == CONNECT_TYPE_TCP && - conn_impl->status == CONNECT_STAT_WAIT_RESPONSE) { - tcp = conn_impl->connect_handle; - hmdfs_info("fd %d to working", tcp->fd); - conn_impl->status = CONNECT_STAT_WORKING; - } - } - mutex_unlock(&node->conn_impl_list_lock); - peer_online(node); -} - void connection_handshake_recv_handler(struct connection *conn_impl, void *buf, void *data, __u32 data_len) { @@ -640,12 +620,6 @@ void connection_handshake_recv_handler(struct connection *conn_impl, void *buf, hmdfs_info( "Recved handshake response: device_id = %llu, cmd->status = %hhu, tcp->fd = %d", conn_impl->node->device_id, status, fd); - if (status == CONNECT_STAT_WAIT_REQUEST) { - // must be 10.1 device, no need to set ktls - connection_to_working(conn_impl->node); - goto out; - } - ret = hs_proc_msg_data(conn_impl, ops, data, data_len); if (ret) goto nego_err; diff --git a/fs/hmdfs/comm/connection.h b/fs/hmdfs/comm/connection.h index 1988e99f7808..3c660aca69d6 100644 --- a/fs/hmdfs/comm/connection.h +++ b/fs/hmdfs/comm/connection.h @@ -328,8 +328,6 @@ void hmdfs_connections_stop(struct hmdfs_sb_info *sbi); void hmdfs_disconnect_node(struct hmdfs_peer *node); -void connection_to_working(struct hmdfs_peer *node); - int hmdfs_alloc_msg_idr(struct hmdfs_peer *peer, enum MSG_IDR_TYPE type, void *ptr, struct hmdfs_cmd operations); struct hmdfs_msg_idr_head *hmdfs_find_msg_head(struct hmdfs_peer *peer, int id, -- Gitee