Re: [PATCH] [phil@fifi.org: Bug#86964: One more method (& patch) for libapache-mod-perl]
On Thu, May 03, 2001 at 11:10:59AM +0800, Stas Bekman wrote: > On Wed, 2 May 2001, Daniel Jacobowitz wrote: > > > On Tue, May 01, 2001 at 11:15:30AM -0700, Doug MacEachern wrote: > > > On Sun, 4 Mar 2001, Daniel Jacobowitz wrote: > > > > > > > Here's another reasonable-looking patch from Philippe Troin; it exposes > > > > child_num() in Apache::Connection. > > > > > > i hesitate adding this to Connection.xs at this point since it is 1.3 > > > specific. but i would be happy to include it as an new method > > > Apache::Scoreboard. > > > > Eh? mod_perl 1.25 doesn't have a Scoreboard.xs... Are you talking > > about 2.0? > > it's on CPAN: Apache::Scoreboard Oh, duh. Thanks. -- Daniel Jacobowitz Debian GNU/Linux Developer Monta Vista Software Debian Security Team
Re: [PATCH] [phil@fifi.org: Bug#86964: One more method (& patch)for libapache-mod-perl]
On Wed, 2 May 2001, Daniel Jacobowitz wrote: > On Tue, May 01, 2001 at 11:15:30AM -0700, Doug MacEachern wrote: > > On Sun, 4 Mar 2001, Daniel Jacobowitz wrote: > > > > > Here's another reasonable-looking patch from Philippe Troin; it exposes > > > child_num() in Apache::Connection. > > > > i hesitate adding this to Connection.xs at this point since it is 1.3 > > specific. but i would be happy to include it as an new method > > Apache::Scoreboard. > > Eh? mod_perl 1.25 doesn't have a Scoreboard.xs... Are you talking > about 2.0? it's on CPAN: Apache::Scoreboard _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: [PATCH] [phil@fifi.org: Bug#86964: One more method (& patch) for libapache-mod-perl]
On Tue, May 01, 2001 at 11:15:30AM -0700, Doug MacEachern wrote: > On Sun, 4 Mar 2001, Daniel Jacobowitz wrote: > > > Here's another reasonable-looking patch from Philippe Troin; it exposes > > child_num() in Apache::Connection. > > i hesitate adding this to Connection.xs at this point since it is 1.3 > specific. but i would be happy to include it as an new method > Apache::Scoreboard. Eh? mod_perl 1.25 doesn't have a Scoreboard.xs... Are you talking about 2.0? -- Daniel Jacobowitz Debian GNU/Linux Developer Monta Vista Software Debian Security Team
Re: [PATCH] [phil@fifi.org: Bug#86964: One more method (& patch)for libapache-mod-perl]
On Sun, 4 Mar 2001, Daniel Jacobowitz wrote: > Here's another reasonable-looking patch from Philippe Troin; it exposes > child_num() in Apache::Connection. i hesitate adding this to Connection.xs at this point since it is 1.3 specific. but i would be happy to include it as an new method Apache::Scoreboard. --- Scoreboard.xs~ Mon Jun 5 11:58:01 2000 +++ Scoreboard.xs Tue May 1 11:10:24 2001 @@ -392,3 +392,15 @@ OUTPUT: RETVAL + +MODULE = Apache::Scoreboard PACKAGE = Apache::Connection + +int +child_num(conn) +Apache::Connection conn + +CODE: +RETVAL = conn->child_num; + +OUTPUT: +RETVAL
Re: [PATCH] [phil@fifi.org: Bug#86964: One more method (& patch)for libapache-mod-perl]
> Here's another reasonable-looking patch from Philippe Troin; it exposes > child_num() in Apache::Connection. Apache::Scoreboard has all the scoreboard related methods. I use it in Apache::VMonitor and Apache::Watchdog::RunAway. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
[PATCH] [phil@fifi.org: Bug#86964: One more method (& patch) for libapache-mod-perl]
Here's another reasonable-looking patch from Philippe Troin; it exposes child_num() in Apache::Connection. -- Daniel Jacobowitz Debian GNU/Linux Developer Monta Vista Software Debian Security Team "I am croutons!" Package: libapache-mod-perl Version: 1.25-2 Severity: wishlist Included is more more patchlet to libapache-mod-perl. It adds the child_num() method to the Apache::Connection class. Why ? - The Apache C API has it, why not the perl API ? - You can do some cool stuff with it... I've used it as an index to a pseudo-scoreboard which forbids the same IP address to download the same file with two or more connection (that is bounce the download managers which were saturating my Apache server with multiple non-overlapping requests to the same file "to speed-up downloads"). It's a trivial patch. Please forward upstream. Phil. diff -ruN libapache-mod-perl-1.25.maint/Apache/Apache.pm libapache-mod-perl-1.25/Apache/Apache.pm --- libapache-mod-perl-1.25.maint/Apache/Apache.pm Thu Feb 22 01:01:58 2001 +++ libapache-mod-perl-1.25/Apache/Apache.pm Thu Feb 22 01:02:13 2001 @@ -567,6 +567,10 @@ This can be used to detect client disconnect without doing any I/O, e.g. using IO::Select. +=item $c->child_num + +Returns which child number (or "slot") handles the connection. + =back =back diff -ruN libapache-mod-perl-1.25.maint/src/modules/perl/Connection.xs libapache-mod-perl-1.25/src/modules/perl/Connection.xs --- libapache-mod-perl-1.25.maint/src/modules/perl/Connection.xs Fri Sep 29 07:41:30 2000 +++ libapache-mod-perl-1.25/src/modules/perl/Connection.xs Thu Feb 22 01:02:13 2001 @@ -157,6 +157,16 @@ OUTPUT: RETVAL +int +child_num(conn) +Apache::Connection conn + +CODE: +RETVAL = conn->child_num; + +OUTPUT: +RETVAL + char * auth_type(conn, ...) Apache::Connection conn