RFC2348 - TFTP Blocksize Option\r
RFC2349 - TFTP Timeout Interval and Transfer Size Options\r
\r
- Copyright (c) 2009 - 2010, 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
@param[in] OverrideData Data that is used to override the existing parameters. If NULL, the\r
default parameters that were set in the EFI_MTFTP6_PROTOCOL.Configure()\r
function are used.\r
- @param[in] Filename Pointer to ASCIIZ file name string.\r
- @param[in] ModeStr Pointer to ASCIIZ mode string. If NULL, octet will be used.\r
+ @param[in] Filename Pointer to null-terminated ASCII file name string.\r
+ @param[in] ModeStr Pointer to null-terminated ASCII mode string. If NULL, octet will be used.\r
@param[in] OptionCount Number of option/value string pairs in OptionList.\r
@param[in] OptionList Pointer to array of option/value string pairs. Ignored if\r
OptionCount is zero.\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