Initial drop of dashboard instrumentation - enabled with
[privoxy.git] / src / parsers.c
index 2939425..c0302b1 100644 (file)
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 2.1 2002/09/11 11:23:59 oes Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 2.2 2002/11/10 04:20:38 hal9 Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/src/parsers.c,v $
@@ -40,6 +40,9 @@ const char parsers_rcs[] = "$Id: parsers.c,v 2.1 2002/09/11 11:23:59 oes Exp $";
  *
  * Revisions   :
  *    $Log: parsers.c,v $
+ *    Revision 2.2  2002/11/10 04:20:38  hal9
+ *    Fix typo: supressed -> suppressed
+ *
  *    Revision 2.1  2002/09/11 11:23:59  oes
  *    Fixed logging of cookies: Killed incoming cookies now logged; incoming/outgoing cookies now distinguished in log
  *
@@ -417,6 +420,9 @@ const char parsers_rcs[] = "$Id: parsers.c,v 2.1 2002/09/11 11:23:59 oes Exp $";
 #include "jbsockets.h"
 #include "miscutil.h"
 #include "list.h"
+#ifdef FEATURE_ACTIVITY_CONSOLE
+#include "stats.h"
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
 
 const char parsers_h_rcs[] = PARSERS_H_VERSION;
 
@@ -1096,6 +1102,9 @@ jb_err client_referrer(struct client_state *csp, char **header)
       /*
        * Blocking referer
        */
+#ifdef FEATURE_ACTIVITY_CONSOLE
+      accumulate_stats(STATS_REFERER, 1);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
       log_error(LOG_LEVEL_HEADER, "crunch!");
       return JB_ERR_OK;
    }
@@ -1200,6 +1209,9 @@ jb_err client_ua(struct client_state *csp, char **header)
 {
    if ((csp->action->flags & ACTION_HIDE_USER_AGENT) != 0)
    {
+#ifdef FEATURE_ACTIVITY_CONSOLE
+      accumulate_stats(STATS_CLIENT_UA, 1);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
       log_error(LOG_LEVEL_HEADER, "crunch!");
       freez(*header);
    }
@@ -1244,6 +1256,9 @@ jb_err client_from(struct client_state *csp, char **header)
     */
    if ((newval == NULL) || (0 == strcmpic(newval, "block")) )
    {
+#ifdef FEATURE_ACTIVITY_CONSOLE
+      accumulate_stats(STATS_CLIENT_FROM, 1);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
       log_error(LOG_LEVEL_HEADER, "crunch!");
       return JB_ERR_OK;
    }
@@ -1335,6 +1350,9 @@ jb_err client_x_forwarded(struct client_state *csp, char **header)
    else
    {
       freez(*header);
+#ifdef FEATURE_ACTIVITY_CONSOLE
+      accumulate_stats(STATS_CLIENT_X_FORWARDED, 1);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
       log_error(LOG_LEVEL_HEADER, " crunch!");
    }