urlmon/tests: Silence some protocol traces that generate too many lines.

Francois Gouget fgouget at free.fr
Fri May 8 10:45:44 CDT 2015


To see them, set WINETEST_DEBUG=2 or higher.
---
 dlls/urlmon/tests/protocol.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c
index 9aadf1e..e08b5a6 100644
--- a/dlls/urlmon/tests/protocol.c
+++ b/dlls/urlmon/tests/protocol.c
@@ -580,7 +580,8 @@ static void call_continue(PROTOCOLDATA *protocol_data)
 {
     HRESULT hres;
 
-    trace("continue in state %d\n", state);
+    if (winetest_debug > 1)
+        trace("continue in state %d\n", state);
 
     if(state == STATE_CONNECTING) {
         if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST) {
@@ -761,10 +762,11 @@ static HRESULT WINAPI ProtocolSink_ReportProgress(IInternetProtocolSink *iface,
         '0','0','0','0','-','0','0','0','0','-','0','0','0','0','0','0','0','0','0','0','0','0','}',0};
     static const WCHAR text_plain[] = {'t','e','x','t','/','p','l','a','i','n',0};
 
-    if (ulStatusCode < sizeof(status_names)/sizeof(status_names[0]))
-        trace( "progress: %s %s\n", status_names[ulStatusCode], wine_dbgstr_w(szStatusText) );
-    else
-        trace( "progress: %u %s\n", ulStatusCode, wine_dbgstr_w(szStatusText) );
+    if (winetest_debug > 1)
+        if (ulStatusCode < sizeof(status_names)/sizeof(status_names[0]))
+            trace( "progress: %s %s\n", status_names[ulStatusCode], wine_dbgstr_w(szStatusText) );
+        else
+            trace( "progress: %u %s\n", ulStatusCode, wine_dbgstr_w(szStatusText) );
 
     switch(ulStatusCode) {
     case BINDSTATUS_MIMETYPEAVAILABLE:
-- 
2.1.4




More information about the wine-patches mailing list