/ Zope / Apsis / Pound Mailing List / Archive / 2006 / 2006-02 / three small patch chunks

[ << ] [ >> ]

[ Problems with option Client and IE / ... ] [ SSL vhost - TLS Upgrade / Will Tatam ... ]

three small patch chunks
Rob Radez <rob(at)osinvestor.com>
2006-02-02 16:57:21 [ FULL ]
Hi,
First chunk fixes a typo in the manpage, second chunk is more of a
question, third chunk is a request.  The second chunk occurs in
get_backend in the S_IP case; at the call to rand_backend, addr can only
be 0 because of the while loop above it, and it looks like it should be
pri instead.  The third chunk is in thr_resurect and should make it so
that Pound will check which hosts are alive at start instead of waiting
Alive seconds.

Regards,
Rob Radez

diff -ruN Pound-2.0.orig/pound.8 Pound-2.0/pound.8
--- Pound-2.0.orig/pound.8	2006-02-01 06:46:10.000000000 -0500
+++ Pound-2.0/pound.8	2006-02-02 04:41:47.000000000 -0500
(at)(at) -466,7 +466,7 (at)(at)
 cannot establish a connection to will be considered dead). However, every
 .I Alive
 seconds, an attempt is made to connect to the dead servers in case they have
become
-active again. If this attempt succeeds, connections will be innitiated to them
again.
+active again. If this attempt succeeds, connections will be initiated to them
again.
 .PP
 In general it is a good idea to set this time interval as low as is consistent
with
 your resources in order to benefit from resurected servers at the earliest
possible
diff -ruN Pound-2.0.orig/svc.c Pound-2.0/svc.c
--- Pound-2.0.orig/svc.c	2006-02-01 06:46:10.000000000 -0500
+++ Pound-2.0/svc.c	2006-02-02 05:18:13.000000000 -0500
(at)(at) -612,7 +612,7 (at)(at)
             pri = (pri << 3) ^ (addr & 0xff);
             addr = (addr >> 8);
         }
-        res = rand_backend(svc->backends, (addr & 0xffff) %
svc->tot_pri);
+        res = rand_backend(svc->backends, pri % svc->tot_pri);
         break;
     case S_PARM:
         if(get_REQUEST(key, svc, request)) {
(at)(at) -800,7 +800,7 (at)(at)
     time_t      last_time, cur_time;
     int         n, sock;
 
-    for(last_time = time(NULL);;) {
+    for(last_time = time(NULL) - alive_to;;) {
         cur_time = time(NULL);
         if((n = alive_to - (cur_time - last_time)) > 0)
             sleep(n);

Re: [Pound Mailing List] three small patch chunks
Robert Segall <roseg(at)apsis.ch>
2006-02-02 17:32:24 [ FULL ]
On Thu, 2006-02-02 at 10:57 -0500, Rob Radez wrote:[...]

Thanks for the patches - they are accepted and will be part of the next
release.[...]

MailBoxer