diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 06:06:18 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 06:06:18 +0000 |
commit | 61066b8d7475929f9f453e1ebea4f72d0c020096 (patch) | |
tree | 064ff40c876afb5efc2ad868b7a5e9bc070fdbf6 /MdeModulePkg | |
parent | 36ee91ca3661d3d020a7841aacbf858d885c4728 (diff) | |
download | edk2-platforms-61066b8d7475929f9f453e1ebea4f72d0c020096.tar.xz |
remove member context from _EFI_MTFTP4_TOKEN structure.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4308 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 18 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h | 14 |
2 files changed, 19 insertions, 13 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 214ac44745..3ce8792537 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -260,11 +260,13 @@ Mtftp4GetInfoCheckPacket ( IN EFI_MTFTP4_PACKET *Packet
)
{
+ MTFTP4_PROTOCOL *Instance;
MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
UINT16 OpCode;
- State = (MTFTP4_GETINFO_STATE *) Token->Context;
+ Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
+ State = &Instance->GetInfoState;
OpCode = NTOHS (Packet->OpCode);
//
@@ -335,7 +337,8 @@ EfiMtftp4GetInfo ( )
{
EFI_MTFTP4_TOKEN Token;
- MTFTP4_GETINFO_STATE State;
+ MTFTP4_PROTOCOL *Instance;
+ MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
if ((This == NULL) || (Filename == NULL) || (PacketLength == NULL) ||
@@ -348,9 +351,11 @@ EfiMtftp4GetInfo ( }
*PacketLength = 0;
- State.Packet = Packet;
- State.PacketLen = PacketLength;
- State.Status = EFI_SUCCESS;
+ Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
+ State = &Instance->GetInfoState;
+ State->Packet = Packet;
+ State->PacketLen = PacketLength;
+ State->Status = EFI_SUCCESS;
//
// Fill in the Token to issue an synchronous ReadFile operation
@@ -364,7 +369,6 @@ EfiMtftp4GetInfo ( Token.OptionList = OptionList;
Token.BufferSize = 0;
Token.Buffer = NULL;
- Token.Context = &State;
Token.CheckPacket = Mtftp4GetInfoCheckPacket;
Token.TimeoutCallback = NULL;
Token.PacketNeeded = NULL;
@@ -372,7 +376,7 @@ EfiMtftp4GetInfo ( Status = EfiMtftp4ReadFile (This, &Token);
if (EFI_ABORTED == Status) {
- return State.Status;
+ return State->Status;
}
return Status;
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h index 9491506601..c12b1dd007 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h @@ -86,6 +86,12 @@ struct _MTFTP4_SERVICE { UDP_IO_PORT *ConnectUdp;
};
+typedef struct {
+ EFI_MTFTP4_PACKET **Packet;
+ UINT32 *PacketLen;
+ EFI_STATUS Status;
+} MTFTP4_GETINFO_STATE;
+
struct _MTFTP4_PROTOCOL {
UINT32 Signature;
NET_LIST_ENTRY Link;
@@ -140,13 +146,9 @@ struct _MTFTP4_PROTOCOL { UINT16 McastPort;
BOOLEAN Master;
UDP_IO_PORT *McastUdpPort;
-};
-typedef struct {
- EFI_MTFTP4_PACKET **Packet;
- UINT32 *PacketLen;
- EFI_STATUS Status;
-} MTFTP4_GETINFO_STATE;
+ MTFTP4_GETINFO_STATE GetInfoState;
+};
VOID
Mtftp4CleanOperation (
|