From: Jiaxin Wu Date: Fri, 22 Dec 2017 03:32:33 +0000 (+0800) Subject: NetworkPkg/TcpDxe: Remove the redundant code. X-Git-Tag: edk2-stable201903~2736 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=1697754b7eccdee954e36634e5fddb6c6a3fede9;ds=sidebyside NetworkPkg/TcpDxe: Remove the redundant code. The function SockGroup() is not used by any other code. So, it can be deleted. Cc: Fu Siyuan Cc: Wang Fan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Fu Siyuan --- diff --git a/NetworkPkg/TcpDxe/SockInterface.c b/NetworkPkg/TcpDxe/SockInterface.c index 0248cdf6ff..0dfc0a71d3 100644 --- a/NetworkPkg/TcpDxe/SockInterface.c +++ b/NetworkPkg/TcpDxe/SockInterface.c @@ -1079,52 +1079,6 @@ SockGetMode ( return Sock->ProtoHandler (Sock, SOCK_MODE, Mode); } -/** - Configure the low level protocol to join a multicast group for - this socket's connection. - - @param[in] Sock Pointer to the socket of the connection to join the - specific multicast group. - @param[in] GroupInfo Pointer to the multicast group info. - - @retval EFI_SUCCESS The configuration completed successfully. - @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket. - @retval EFI_NOT_STARTED The socket is not configured. - -**/ -EFI_STATUS -SockGroup ( - IN SOCKET *Sock, - IN VOID *GroupInfo - ) -{ - EFI_STATUS Status; - - Status = EfiAcquireLockOrFail (&(Sock->Lock)); - - if (EFI_ERROR (Status)) { - - DEBUG ( - (EFI_D_ERROR, - "SockGroup: Get the access for socket failed with %r", - Status) - ); - - return EFI_ACCESS_DENIED; - } - - if (SOCK_IS_UNCONFIGURED (Sock)) { - Status = EFI_NOT_STARTED; - goto Exit; - } - - Status = Sock->ProtoHandler (Sock, SOCK_GROUP, GroupInfo); - -Exit: - EfiReleaseLock (&(Sock->Lock)); - return Status; -} - /** Add or remove route information in IP route table associated with this socket. diff --git a/NetworkPkg/TcpDxe/Socket.h b/NetworkPkg/TcpDxe/Socket.h index f7f4a7ad86..26c5f4e426 100644 --- a/NetworkPkg/TcpDxe/Socket.h +++ b/NetworkPkg/TcpDxe/Socket.h @@ -1,7 +1,7 @@ /** @file Common head file for TCP socket. - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -899,25 +899,6 @@ SockGetMode ( IN OUT VOID *Mode ); -/** - Configure the low level protocol to join a multicast group for - this socket's connection. - - @param[in] Sock Pointer to the socket of the connection to join the - specific multicast group. - @param[in] GroupInfo Pointer to the multicast group information. - - @retval EFI_SUCCESS The configuration completed successfully. - @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket. - @retval EFI_NOT_STARTED The socket is not configured. - -**/ -EFI_STATUS -SockGroup ( - IN SOCKET *Sock, - IN VOID *GroupInfo - ); - /** Add or remove route information in IP route table associated with this socket.