iphlpapi/tests: Trace the ICMP reply only with debug level > 1.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-11-23 15:47:40 +02:00 committed by Alexandre Julliard
parent 7d451c3396
commit 9d481a1fff
1 changed files with 5 additions and 5 deletions

View File

@ -996,7 +996,11 @@ static void testIcmpSendEcho(void)
address = htonl(INADDR_LOOPBACK);
ret = IcmpSendEcho(icmp, address, senddata, sizeof(senddata), NULL, replydata, replysz, 1000);
error = GetLastError();
if (ret)
if (!ret)
{
skip ("Failed to ping with error %d, is lo interface down?.\n", error);
}
else if (winetest_debug > 1)
{
PICMP_ECHO_REPLY pong = (PICMP_ECHO_REPLY) replydata;
trace ("send addr : %s\n", ntoa(address));
@ -1008,10 +1012,6 @@ static void testIcmpSendEcho(void)
trace ("ttl : %u\n", pong->Options.Ttl);
trace ("flags : 0x%x\n", pong->Options.Flags);
}
else
{
skip ("Failed to ping with error %d, is lo interface down?.\n", error);
}
/* check reply data */
SetLastError(0xdeadbeef);