Increase lost packet count when transmit failed or receive failed for whatever reason

svn path=/trunk/; revision=35392
This commit is contained in:
Hervé Poussineau 2008-08-16 14:30:20 +00:00
parent e96d8d91ad
commit 1b11b8d6ce

View file

@ -541,6 +541,7 @@ static BOOL Ping(VOID)
}
if (Status == SOCKET_ERROR)
{
LostCount++;
if (WSAGetLastError() == WSAEHOSTUNREACH)
printf("Destination host unreachable.\n");
else
@ -567,6 +568,8 @@ static BOOL Ping(VOID)
printf("\n");
#endif /* !NDEBUG */
}
else
LostCount++;
if (Status == SOCKET_ERROR)
{
if (WSAGetLastError() != WSAETIMEDOUT)
@ -581,7 +584,6 @@ static BOOL Ping(VOID)
if (Status == 0)
{
printf("Request timed out.\n");
LostCount++;
GlobalFree(Buffer);
return TRUE;
}