Initial drop of dashboard instrumentation - enabled with
[privoxy.git] / src / jcc.c
index 7a0d98a..24e8f74 100644 (file)
--- a/src/jcc.c
+++ b/src/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 2.2 2002/07/12 04:26:17 agotneja Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 2.3 2002/07/18 22:06:12 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/src/jcc.c,v $
@@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 2.2 2002/07/12 04:26:17 agotneja Exp $";
  *
  * Revisions   :
  *    $Log: jcc.c,v $
+ *    Revision 2.3  2002/07/18 22:06:12  jongfoster
+ *    Trivial formatting changes
+ *
  *    Revision 2.2  2002/07/12 04:26:17  agotneja
  *    Re-factored 'chat()' to become understandable and maintainable as
  *    a first step in adding Transparent Proxy functionality.
@@ -615,6 +618,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 2.2 2002/07/12 04:26:17 agotneja Exp $";
 #include "cgi.h"
 #include "loadcfg.h"
 #include "urlmatch.h"
+#ifdef FEATURE_ACTIVITY_CONSOLE
+#include "stats.h"
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
 
 const char jcc_h_rcs[] = JCC_H_VERSION;
 const char project_h_rcs[] = PROJECT_H_VERSION;
@@ -1347,6 +1353,10 @@ static void listen_loop(void)
 
    bfd = bind_port_helper(config);
 
+#ifdef FEATURE_ACTIVITY_CONSOLE
+   init_stats_config(config);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
+
 #ifdef FEATURE_GRACEFUL_TERMINATION
    while (!g_terminate)
 #else
@@ -1454,6 +1464,10 @@ static void listen_loop(void)
       }
 #endif /* def FEATURE_TOGGLE */
 
+#ifdef FEATURE_ACTIVITY_CONSOLE
+      update_stats_config(config);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
+
       if (run_loader(csp))
       {
          log_error(LOG_LEVEL_FATAL, "a loader failed - must exit");
@@ -2402,6 +2416,9 @@ static jb_err open_forwarding_connection(struct client_state *csp )
 {
    struct http_response *rsp;
    
+#ifdef FEATURE_ACTIVITY_CONSOLE
+   accumulate_stats(STATS_REQUEST, 1);
+#endif /* def FEATURE_ACTIVITY_CONSOLE */
    log_error(LOG_LEVEL_GPC, "%s%s", csp->http->hostport, csp->http->path);
 
    if (csp->http->fwd->forward_host)