Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Re: svn commit: r791498 - in /httpd/httpd/trunk/modules/experimental: NWGNUmakefile mod_noloris.c

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


fuankg at apache

Jul 6, 2009, 7:51 AM

Post #1 of 2 (283 views)
Permalink
Re: svn commit: r791498 - in /httpd/httpd/trunk/modules/experimental: NWGNUmakefile mod_noloris.c

Hi Nick,
please correct me if I'm worng ....

Günter.

fuankg [at] apache schrieb:
> Author: fuankg
> Date: Mon Jul 6 14:48:23 2009
> New Revision: 791498
>
> URL: http://svn.apache.org/viewvc?rev=791498&view=rev
> Log:
> fixed var name, fixed memset parameter,
> changed to ap_get_scoreboard_worker_from_indexes()
>
> Modified:
> httpd/httpd/trunk/modules/experimental/NWGNUmakefile
> httpd/httpd/trunk/modules/experimental/mod_noloris.c
>
> Modified: httpd/httpd/trunk/modules/experimental/mod_noloris.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/experimental/mod_noloris.c?rev=791498&r1=791497&r2=791498&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/experimental/mod_noloris.c (original)
> +++ httpd/httpd/trunk/modules/experimental/mod_noloris.c Mon Jul 6 14:48:23 2009
> @@ -40,6 +40,7 @@
> #include "mpm_common.h"
> #include "ap_mpm.h"
> #include "apr_hash.h"
> +#include "scoreboard.h"
>
> module AP_MODULE_DECLARE_DATA noloris_module;
> module AP_MODULE_DECLARE_DATA core_module;
> @@ -83,7 +84,7 @@
>
> return DONE;
> }
> - shm_rec += MAX_ADDR_SIZE;
> + shm_rec += ADDR_MAX_SIZE;
> }
>
> /* store this client IP for the monitor to pick up */
> @@ -134,7 +135,7 @@
> /* Get a per-client count of connections in READ state */
> for (i = 0; i < server_limit; ++i) {
> for (j = 0; j < thread_limit; ++j) {
> - ws = ap_get_scoreboard_worker(i, j);
> + ws = ap_get_scoreboard_worker_from_indexes(i, j);
> if (ws->status == SERVER_BUSY_READ) {
> n = apr_hash_get(connections, ws->client, APR_HASH_KEY_STRING);
> if (n == NULL) {
> @@ -152,7 +153,7 @@
> * with our prospective readers
> */
> shm_rec = apr_shm_baseaddr_get(shm);
> - memset(shm_rec, NULL, shm_size);
> + memset(shm_rec, 0, shm_size);
>
> /* Now check the hash for clients with too many connections in READ state */
> for (hi = apr_hash_first(NULL, connections); hi; hi = apr_hash_next(hi)) {
>
>
>


nick at webthing

Jul 6, 2009, 9:26 AM

Post #2 of 2 (246 views)
Permalink
Re: svn commit: r791498 - in /httpd/httpd/trunk/modules/experimental: NWGNUmakefile mod_noloris.c [In reply to]

On 6 Jul 2009, at 15:51, Guenter Knauf wrote:

> Hi Nick,
> please correct me if I'm worng ....

Unlikely :)

>> +#include "scoreboard.h"

Erk! If that was missing, I may have committed an incorrect version
in the first place. Will have to check.

>> module AP_MODULE_DECLARE_DATA noloris_module;
>> module AP_MODULE_DECLARE_DATA core_module;
>> @@ -83,7 +84,7 @@
>>
>> return DONE;
>> }
>> - shm_rec += MAX_ADDR_SIZE;
>> + shm_rec += ADDR_MAX_SIZE;

OK, that was me making a hash of yesterday's update.

>> for (j = 0; j < thread_limit; ++j) {
>> - ws = ap_get_scoreboard_worker(i, j);
>> + ws = ap_get_scoreboard_worker_from_indexes(i, j);

Ooops. I was evidently working to a 2.2.x API without realising it had
been invalidated!

(minor rant: that kind of breakage is gratuitous and shouldn't happen)!

>> - memset(shm_rec, NULL, shm_size);
>> + memset(shm_rec, 0, shm_size);

You're right of course.

Thanks for the fixes.

--
Nick Kew

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.