/** @file\r
The implementation for Ping6 application.\r
\r
- Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2016 - 2017, 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
Status = Private->Ip6->Receive (Private->Ip6, RxToken);\r
\r
if (EFI_ERROR (Status)) {\r
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_IP6_RECEIVE), gShellNetwork2HiiHandle, Status);\r
Private->Status = EFI_ABORTED;\r
}\r
} else {\r
\r
Private->RxToken.Status = EFI_NOT_READY;\r
\r
- return Private->Ip6->Receive (Private->Ip6, &Private->RxToken);\r
+ Status = Private->Ip6->Receive (Private->Ip6, &Private->RxToken);\r
+ if (EFI_ERROR (Status)) {\r
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_IP6_RECEIVE), gShellNetwork2HiiHandle, Status);\r
+ }\r
+ return Status;\r
}\r
\r
/**\r
UINTN HandleNum;\r
EFI_HANDLE *HandleBuffer;\r
BOOLEAN UnspecifiedSrc;\r
- BOOLEAN MediaPresent;\r
+ EFI_STATUS MediaStatus;\r
EFI_SERVICE_BINDING_PROTOCOL *Ip6Sb;\r
EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg;\r
EFI_IP6_CONFIG_DATA Ip6Config;\r
\r
HandleBuffer = NULL;\r
UnspecifiedSrc = FALSE;\r
- MediaPresent = TRUE;\r
+ MediaStatus = EFI_SUCCESS;\r
Ip6Sb = NULL;\r
IfInfo = NULL;\r
IfInfoSize = 0;\r
//\r
// Check media.\r
//\r
- NetLibDetectMedia (HandleBuffer[HandleIndex], &MediaPresent);\r
- if (!MediaPresent) {\r
+ NetLibDetectMediaWaitTimeout (HandleBuffer[HandleIndex], 0, &MediaStatus);\r
+ if (MediaStatus != EFI_SUCCESS) {\r
//\r
// Skip this one.\r
//\r