httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@ebuilt.com>
Subject Re: cvs commit: httpd-test/flood flood_easy_reports.c
Date Fri, 03 Aug 2001 01:15:08 GMT
For the sake of observers. Justin and I expect this to be a temporary
solution to the problem of tracking printed output from individual
"farmers".

My proposed solution to this is to pass a unique identifier to each
farmer that is then passed to that farmer's reporting mechanism for
printing. This way we don't tie ourselves into the idea of a "thread"
in case the platform (*cough* BSD *ahem*) doesn't have support.


On Fri, Aug 03, 2001 at 12:23:21AM -0000, jerenkrantz@apache.org wrote:
> jerenkrantz    01/08/02 17:23:21
> 
>   Modified:    flood    flood_easy_reports.c
>   Log:
>   Add the thread ID to the "easy" report generation - this allows you to
>   identify which thread made the request.
>   (If you don't have threads, you're not going to get very far with flood
>    right now.)
>   
>   Revision  Changes    Path
>   1.4       +8 -7      httpd-test/flood/flood_easy_reports.c
>   
>   Index: flood_easy_reports.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_easy_reports.c,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- flood_easy_reports.c	2001/07/25 00:33:31	1.3
>   +++ flood_easy_reports.c	2001/08/03 00:23:21	1.4
>   @@ -56,6 +56,7 @@
>    
>    #include "flood_easy_reports.h"
>    #include <apr.h>
>   +#include <apr_portable.h>
>    
>    extern apr_file_t *local_stdout;
>    extern apr_file_t *local_stderr;
>   @@ -73,14 +74,15 @@
>    apr_status_t easy_process_stats(report_t *report, int verified, request_t *req, response_t
*resp)
>    {
>        if (verified == FLOOD_VALID) {
>   -        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " OK %s\n", 
>   -                        apr_time_now(), req->uri);
>   +        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " OK %d %s\n", 
>   +                        apr_time_now(), apr_os_thread_current(), req->uri);
>        } else if (verified == FLOOD_INVALID) {
>   -        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " FAIL %s\n", 
>   -                        apr_time_now(), req->uri);
>   +        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " FAIL %d %s\n", 
>   +                        apr_time_now(), apr_os_thread_current(), req->uri);
>        } else {
>   -        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " %d %s\n", 
>   -                        apr_time_now(), verified, req->uri);
>   +        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " %d %d %s\n", 
>   +                        apr_time_now(), verified, apr_os_thread_current(), 
>   +                        req->uri);
>        }
>    
>        return APR_SUCCESS;
>   @@ -93,6 +95,5 @@
>    
>    apr_status_t easy_destroy_report(report_t *report)
>    {
>   -    /* FIXME: APR can't free memory, and is lame */
>        return APR_SUCCESS;
>    }

Hey, why did this get removed!? this is a placeholder for if/when we
do sms. This is the appropriate place to do a free().

-aaron


Mime
View raw message