From 1b11b8d6ce2b26298b3bc64cb44fb476ccae68d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 16 Aug 2008 14:30:20 +0000 Subject: [PATCH] Increase lost packet count when transmit failed or receive failed for whatever reason svn path=/trunk/; revision=35392 --- reactos/base/applications/network/ping/ping.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/base/applications/network/ping/ping.c b/reactos/base/applications/network/ping/ping.c index 4cb3636d6f1..94cd421d460 100644 --- a/reactos/base/applications/network/ping/ping.c +++ b/reactos/base/applications/network/ping/ping.c @@ -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; }