Log when privoxy is toggled on or off via cgi interface.
authorLee <ler762@users.sourceforge.net>
Sat, 23 Jul 2016 17:23:43 +0000 (17:23 +0000)
committerLee <ler762@users.sourceforge.net>
Sat, 23 Jul 2016 17:23:43 +0000 (17:23 +0000)
Highlight the "Info: Now toggled " on/off log message in the windows log viewer.

cgiedit.c
w32log.c

index 0ffa8bb..4579b35 100644 (file)
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -1,4 +1,4 @@
-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.87 2014/10/18 11:31:52 fabiankeil Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.88 2016/02/26 12:29:38 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
@@ -4407,6 +4407,8 @@ jb_err cgi_toggle(struct client_state *csp,
       global_toggle_state = !global_toggle_state;
    }
 
       global_toggle_state = !global_toggle_state;
    }
 
+   log_error(LOG_LEVEL_INFO, "Now toggled %s.", global_toggle_state ? "ON" : "OFF");
+
    if (NULL == (exports = default_exports(csp, "toggle")))
    {
       return JB_ERR_MEMORY;
    if (NULL == (exports = default_exports(csp, "toggle")))
    {
       return JB_ERR_MEMORY;
index c524ffa..b3aee2c 100644 (file)
--- a/w32log.c
+++ b/w32log.c
@@ -1,4 +1,4 @@
-const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil Exp $";
+const char w32log_rcs[] = "$Id: w32log.c,v 1.49 2015/12/27 12:53:54 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/w32log.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/w32log.c,v $
@@ -41,6 +41,7 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil E
 #ifndef STRICT
 #define STRICT
 #endif
 #ifndef STRICT
 #define STRICT
 #endif
+#include <winsock2.h>    /* i686-w64-mingw32-gcc compiler warning if winsock2.h is included after windows.h */
 #include <windows.h>
 #include <richedit.h>
 
 #include <windows.h>
 #include <richedit.h>
 
@@ -56,11 +57,6 @@ const char w32log_rcs[] = "$Id: w32log.c,v 1.48 2012/05/27 15:45:05 fabiankeil E
 
 const char w32res_h_rcs[] = W32RES_H_VERSION;
 
 
 const char w32res_h_rcs[] = W32RES_H_VERSION;
 
-#ifdef __MINGW32__
-#include "cygwin.h"
-const char cygwin_h_rcs[] = CYGWIN_H_VERSION;
-#endif
-
 const char w32log_h_rcs[] = W32LOG_H_VERSION;
 
 #ifndef _WIN_CONSOLE /* entire file */
 const char w32log_h_rcs[] = W32LOG_H_VERSION;
 
 #ifndef _WIN_CONSOLE /* entire file */
@@ -172,6 +168,7 @@ static struct _Pattern
    { "Connect: Reusing server socket",     STYLE_HIGHLIGHT },
    { "Connect: Created new connection to", STYLE_HIGHLIGHT },
    { "hung up on us",               STYLE_HIGHLIGHT },
    { "Connect: Reusing server socket",     STYLE_HIGHLIGHT },
    { "Connect: Created new connection to", STYLE_HIGHLIGHT },
    { "hung up on us",               STYLE_HIGHLIGHT },
+   { "Info: Now toggled ",          STYLE_HIGHLIGHT },
    { "Crunching Referer:",          STYLE_HIGHLIGHT },
    /* what are all the possible error strings?? */
    { "Error:",                      STYLE_HIGHLIGHT },
    { "Crunching Referer:",          STYLE_HIGHLIGHT },
    /* what are all the possible error strings?? */
    { "Error:",                      STYLE_HIGHLIGHT },