From 7302de3f444c8b6e61f1365c42e4c681c1eb6965 Mon Sep 17 00:00:00 2001 From: David Schmidt Date: Sun, 26 Jan 2003 20:24:26 +0000 Subject: [PATCH] Updated activity console instrumentation locations --- src/jcc.c | 9 ++++++++- src/parsers.c | 24 +++++++++++++++++------- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/jcc.c b/src/jcc.c index 24e8f74c..e53b65a4 100644 --- a/src/jcc.c +++ b/src/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 2.3 2002/07/18 22:06:12 jongfoster Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 2.4 2002/12/28 03:58:19 david__schmidt Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/src/jcc.c,v $ @@ -33,6 +33,10 @@ const char jcc_rcs[] = "$Id: jcc.c,v 2.3 2002/07/18 22:06:12 jongfoster Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 2.4 2002/12/28 03:58:19 david__schmidt + * Initial drop of dashboard instrumentation - enabled with + * --enable-activity-console + * * Revision 2.3 2002/07/18 22:06:12 jongfoster * Trivial formatting changes * @@ -1477,6 +1481,9 @@ static void listen_loop(void) #ifdef FEATURE_ACL if (block_acl(NULL,csp)) { +#ifdef FEATURE_ACTIVITY_CONSOLE + accumulate_stats(STATS_ACL_RESTRICT,1); +#endif /* def FEATURE_ACTIVITY_CONSOLE */ log_error(LOG_LEVEL_CONNECT, "Connection dropped due to ACL"); close_socket(csp->cfd); freez(csp); diff --git a/src/parsers.c b/src/parsers.c index c0302b12..9ad0341a 100644 --- a/src/parsers.c +++ b/src/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 2.2 2002/11/10 04:20:38 hal9 Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 2.3 2002/12/28 03:58:19 david__schmidt Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/src/parsers.c,v $ @@ -40,6 +40,10 @@ const char parsers_rcs[] = "$Id: parsers.c,v 2.2 2002/11/10 04:20:38 hal9 Exp $" * * Revisions : * $Log: parsers.c,v $ + * Revision 2.3 2002/12/28 03:58:19 david__schmidt + * Initial drop of dashboard instrumentation - enabled with + * --enable-activity-console + * * Revision 2.2 2002/11/10 04:20:38 hal9 * Fix typo: supressed -> suppressed * @@ -1097,14 +1101,16 @@ jb_err client_referrer(struct client_state *csp, char **header) newval = csp->action->string[ACTION_STRING_REFERER]; +#ifdef FEATURE_ACTIVITY_CONSOLE + /* Otherwise, we're doing something with the referer. */ + accumulate_stats(STATS_REFERER, 1); +#endif /* def FEATURE_ACTIVITY_CONSOLE */ + if ((newval == NULL) || (0 == strcmpic(newval, "block")) ) { /* * 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; } @@ -1247,6 +1253,10 @@ jb_err client_from(struct client_state *csp, char **header) return JB_ERR_OK; } +#ifdef FEATURE_ACTIVITY_CONSOLE + /* Otherwise, we're doing something with it. */ + accumulate_stats(STATS_CLIENT_FROM, 1); +#endif /* def FEATURE_ACTIVITY_CONSOLE */ freez(*header); newval = csp->action->string[ACTION_STRING_FROM]; @@ -1256,9 +1266,6 @@ 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; } @@ -1700,6 +1707,9 @@ jb_err server_set_cookie(struct client_state *csp, char **header) if ((csp->action->flags & ACTION_NO_COOKIE_SET) != 0) { log_error(LOG_LEVEL_HEADER, "Crunched incoming cookie -- yum!"); +#ifdef FEATURE_ACTIVITY_CONSOLE + accumulate_stats(STATS_COOKIE, 1); +#endif /* def FEATURE_ACTIVITY_CONSOLE */ return crumble(csp, header); } else if ((csp->action->flags & ACTION_NO_COOKIE_KEEP) != 0) -- 2.39.2