httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Suggested mod_status.c patch
Date Tue, 21 May 1996 19:41:23 GMT
Jim Jagielski wrote:
> 
> I found this patchfile for the stat-module on hyperreal. It looked
> pretty good and added some nice features. I've updated/modified/improved
> it to be the beastie below. It patches cleanly against the current
> CVS tree. I think it would be a good addition for 1.1b4.

Looks interesting but...

> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_main.c,v
> retrieving revision 1.27
> diff -c -r1.27 http_main.c
> *** http_main.c	1996/05/15 12:57:44	1.27
> --- http_main.c	1996/05/21 19:30:03
> ***************
> *** 657,667 ****
>   #endif
>   }
>   
> ! void update_child_status (int child_num, int status, request_rec *r)
>   {
>       short_score new_score_rec;
>       memcpy(&new_score_rec,&scoreboard_image[child_num],sizeof new_score_rec);
>       new_score_rec.pid = getpid();
>       new_score_rec.status = status;
>   
>   #if defined(STATUS)
> --- 657,673 ----
>   #endif
>   }
>   
> ! int update_child_status (int child_num, int status, request_rec *r)
>   {
>       short_score new_score_rec;
> +     int old_status;
> + 
> +     if (child_num < 0)
> + 	return scoreboard_image[child_num].status;

Can this be right? I think not.

> +     
>       memcpy(&new_score_rec,&scoreboard_image[child_num],sizeof new_score_rec);
>       new_score_rec.pid = getpid();
> +     old_status = new_score_rec.status;
>       new_score_rec.status = status;
>   
>   #if defined(STATUS)

Cheers,

Ben.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.

Mime
View raw message