From d64a161fb935b8fbfd69781a5cf891d2cebed2df Mon Sep 17 00:00:00 2001 From: hkk Date: Fri, 25 Oct 2024 16:55:23 +0800 Subject: [PATCH] slove compile err when GAZELLE_TCP_REUSE_IPPORT is off --- src/lstack/api/lstack_rtw_api.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lstack/api/lstack_rtw_api.c b/src/lstack/api/lstack_rtw_api.c index 7ceff20..8765463 100644 --- a/src/lstack/api/lstack_rtw_api.c +++ b/src/lstack/api/lstack_rtw_api.c @@ -233,8 +233,9 @@ static int stack_broadcast_listen(int fd, int backlog) } struct protocol_stack_group *stack_group = get_protocol_stack_group(); +#if GAZELLE_TCP_REUSE_IPPORT int min_conn_stk_idx = get_min_conn_stack(stack_group); - +#endif for (int32_t i = 0; i < stack_group->stack_num; ++i) { stack = stack_group->stacks[i]; if (get_global_cfg_params()->seperate_send_recv && stack->is_send_thread) { @@ -249,13 +250,13 @@ static int stack_broadcast_listen(int fd, int backlog) } else { clone_fd = fd; } - +#if GAZELLE_TCP_REUSE_IPPORT if (min_conn_stk_idx == i) { lwip_get_socket(clone_fd)->conn->is_master_fd = 1; } else { lwip_get_socket(clone_fd)->conn->is_master_fd = 0; } - +#endif ret = rpc_call_listen(&stack->rpc_queue, clone_fd, backlog); if (ret < 0) { stack_broadcast_close(fd); @@ -546,4 +547,4 @@ void rtw_api_init(posix_api_t *api) api->poll_fn = rtw_poll; api->select_fn = rtw_select; -} \ No newline at end of file +} -- 2.33.0