Project

General

Profile

Bug #1715 » lighttpd-1.4.19.mod_proxy-rr-fix2.patch

-- eziman - Anonymous, 2008-07-11 12:14

View differences:

lighttpd-1.4.19.mod_proxy-rr-patch/src/mod_proxy.c 2008-07-10 15:50:05.000000000 -0700
1206 1206

  
1207 1207
		/* didn't found a higher id, wrap to the start */
1208 1208
		if (ndx == -1 && max_usage != INT_MAX) {
1209
			ndx = max_usage;
1209
                        /* reset last_used_ndxs. */
1210
                        for (k = 0, ndx = -1, max_usage = INT_MAX; k < extension->value->used; k++) {
1211
                                data_proxy *host = (data_proxy *)extension->value->data[k];
1212
                                host->last_used_ndx = 0;
1213

  
1214
                                if (host->is_disabled) continue;
1215

  
1216
                                /* first usable ndx */
1217
                                if (max_usage == INT_MAX) {
1218
                                        max_usage = k;
1219
                                        ndx = k;
1220
                                }
1221
                        }
1210 1222
		}
1211 1223

  
1212 1224
		break;
(2-2/2)