Gabriel Ivăncescu : iphlpapi/tests: Trace the ICMP reply only with debug level > 1.

Alexandre Julliard julliard at winehq.org
Thu Dec 3 15:35:58 CST 2020


Module: wine
Branch: master
Commit: 9d481a1fff9e928f68e51db6bdcb5d63353fc077
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9d481a1fff9e928f68e51db6bdcb5d63353fc077

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Mon Nov 23 15:47:40 2020 +0200

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

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/iphlpapi/tests/iphlpapi.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c
index 1465e26bea5..6cbe725bada 100644
--- a/dlls/iphlpapi/tests/iphlpapi.c
+++ b/dlls/iphlpapi/tests/iphlpapi.c
@@ -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);




More information about the wine-cvs mailing list