In case of SOCKS5 failures, do not explicitly log the server's response
[privoxy.git] / w32log.c
index 6094338..d0aa90e 100644 (file)
--- a/w32log.c
+++ b/w32log.c
@@ -1,4 +1,4 @@
-const char w32log_rcs[] = "$Id: w32log.c,v 1.37 2010/06/13 12:31:04 fabiankeil Exp $";
+const char w32log_rcs[] = "$Id: w32log.c,v 1.40 2011/09/04 11:10:56 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/w32log.c,v $
@@ -12,7 +12,7 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.37 2010/06/13 12:31:04 fabiankeil E
  *                Written by and Copyright (C) 1999 Adam Lock
  *                <locka@iol.ie>
  *
- *                This program is free software; you can redistribute it 
+ *                This program is free software; you can redistribute it
  *                and/or modify it under the terms of the GNU General
  *                Public License as published by the Free Software
  *                Foundation; either version 2 of the License, or (at
@@ -370,12 +370,12 @@ int LogPutString(const char *pszText)
    int i;
    int result = 0;
 
-   if (pszText == NULL || strlen(pszText) == 0)
+   if (!g_bLogMessages)
    {
       return 1;
    }
 
-   if (!g_bLogMessages)
+   if (pszText == NULL || strlen(pszText) == 0)
    {
       return 1;
    }
@@ -598,13 +598,13 @@ void LogClipBuffer(void)
       range.cpMin = SendMessage (g_hwndLogBox, WM_GETTEXTLENGTH, 0, 0);
       range.cpMax = -1;
       SendMessage(g_hwndLogBox, EM_EXSETSEL, 0, (LPARAM) &range);
+
       /* restore vertical ScrollBar stuff (messed up by AUTOVSCROLL) */
       SendMessage (g_hwndLogBox, EM_SCROLL, SB_LINEDOWN, 0);
+
    }
 
-}                                        
+}
 
 
 /*********************************************************************
@@ -641,7 +641,7 @@ HWND CreateHiddenLogOwnerWindow(HINSTANCE hInstance)
 
    hwnd = CreateWindow(szWndName, szWndName,
       WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
-      CW_USEDEFAULT, NULL, NULL, hInstance, NULL );
+      CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
 
    return hwnd;
 
@@ -806,7 +806,7 @@ void ShowLogWindow(BOOL bShow)
    {
       SetForegroundWindow(g_hwndLogFrame);
       SetWindowPos(g_hwndLogFrame, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE);
-      
+
    }
    else if (g_bShowOnTaskBar)
    {