From 70b356a9ffb974a1b9a02284091e25f02dfee385 Mon Sep 17 00:00:00 2001 From: tye1 Date: Thu, 16 Dec 2010 09:26:28 +0000 Subject: [PATCH] Minor code update to make TcpIo unchanged when return EFI_DEVICE_ERROR. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11175 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c index 48120b4353..110e4890c8 100644 --- a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c +++ b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c @@ -882,7 +882,6 @@ TcpIoReceive ( Tcp6 = NULL; if (TcpIo->TcpVersion == TCP_VERSION_4) { - TcpIo->RxToken.Tcp4Token.Packet.RxData = &RxData; Tcp4 = TcpIo->Tcp.Tcp4; if (TcpIo->IsListenDone) { @@ -893,8 +892,9 @@ TcpIoReceive ( return EFI_DEVICE_ERROR; } + TcpIo->RxToken.Tcp4Token.Packet.RxData = &RxData; + } else if (TcpIo->TcpVersion == TCP_VERSION_6) { - TcpIo->RxToken.Tcp6Token.Packet.RxData = (EFI_TCP6_RECEIVE_DATA *) &RxData; Tcp6 = TcpIo->Tcp.Tcp6; if (TcpIo->IsListenDone) { @@ -905,6 +905,8 @@ TcpIoReceive ( return EFI_DEVICE_ERROR; } + TcpIo->RxToken.Tcp6Token.Packet.RxData = (EFI_TCP6_RECEIVE_DATA *) &RxData; + } else { return EFI_UNSUPPORTED; }