RFC2348 - TFTP Blocksize Option\r
RFC2349 - TFTP Timeout Interval and Transfer Size Options\r
\r
- Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
// Don't configure the udpio here because each operation might override\r
// the configuration, so delay udpio configuration in each operation.\r
//\r
- Instance->UdpIo = UdpIoCreateIo (\r
- Service->Controller,\r
+ if (Instance->UdpIo == NULL) {\r
+ Instance->UdpIo = UdpIoCreateIo (\r
+ Service->Controller,\r
+ Service->Image,\r
+ Mtftp6ConfigDummyUdpIo,\r
+ UDP_IO_UDP6_VERSION,\r
+ NULL\r
+ );\r
+ if (Instance->UdpIo != NULL) {\r
+ Status = gBS->OpenProtocol (\r
+ Instance->UdpIo->UdpHandle,\r
+ &gEfiUdp6ProtocolGuid,\r
+ (VOID **) &Udp6,\r
Service->Image,\r
- Mtftp6ConfigDummyUdpIo,\r
- UDP_IO_UDP6_VERSION,\r
- NULL\r
+ Instance->Handle,\r
+ EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
);\r
+ if (EFI_ERROR (Status)) {\r
+ goto ON_EXIT;\r
+ }\r
+ }\r
+ }\r
\r
if (Instance->UdpIo == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
Instance = MTFTP6_INSTANCE_FROM_THIS (This);\r
\r
//\r
- // Check the instance whether configured or in destory.\r
+ // Check the instance whether configured or in destroy.\r
//\r
if (Instance->Config == NULL) {\r
return EFI_NOT_STARTED;\r
- } else if (Instance->InDestory) {\r
- return EFI_DEVICE_ERROR;\r
}\r
\r
Udp6 = Instance->UdpIo->Protocol.Udp6;\r