httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: id=51247 Enhance mod_proxy and _balancer with worker status flag to only accept sticky session routes
Date Wed, 25 May 2011 10:41:34 GMT
On 05/25/2011 02:27 AM, Daniel Ruggeri wrote:
> I attached the patch to a bug opened by Cameron Stokes
> https://issues.apache.org/bugzilla/show_bug.cgi?id=48841
>

Just a quick note on the first thing I saw:

+        //worker->lbfactor = atoi(val);
+        worker->lbfactor = strtol(val, NULL, 10);
+        if (errno == EINVAL || worker->lbfactor < 0 || worker->lbfactor > 100)

You should add
errno = 0;
before strtol call if you inspect the errno afterwards.
BTW, what's wrong with the atoi call? We ain't gonna have 64-bit lbfactors,
and the acceptable range is 0 ... 100
Also, don't use C++ comments.


Regards
-- 
^TM

Mime
View raw message