"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/checks.c" between
haproxy-2.0.13.tar.gz and haproxy-2.0.14.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. LTS (Long-Term Support) release.

checks.c  (haproxy-2.0.13):checks.c  (haproxy-2.0.14)
skipping to change at line 2200 skipping to change at line 2200
check_notify_success(check); check_notify_success(check);
} }
task_set_affinity(t, 1); task_set_affinity(t, 1);
check->state &= ~CHK_ST_INPROGRESS; check->state &= ~CHK_ST_INPROGRESS;
pid_list_del(check->curpid); pid_list_del(check->curpid);
rv = 0; rv = 0;
if (global.spread_checks > 0) { if (global.spread_checks > 0) {
rv = srv_getinter(check) * global.spread_checks / 100; rv = srv_getinter(check) * global.spread_checks / 100;
rv -= (int) (2 * rv * (rand() / (RAND_MAX + 1.0))); rv -= (int) (2 * rv * (ha_random32() / 4294967295.0));
} }
t->expire = tick_add(now_ms, MS_TO_TICKS(srv_getinter(check) + rv )); t->expire = tick_add(now_ms, MS_TO_TICKS(srv_getinter(check) + rv ));
} }
reschedule: reschedule:
while (tick_is_expired(t->expire, now_ms)) while (tick_is_expired(t->expire, now_ms))
t->expire = tick_add(t->expire, MS_TO_TICKS(check->inter)); t->expire = tick_add(t->expire, MS_TO_TICKS(check->inter));
out_unlock: out_unlock:
HA_SPIN_UNLOCK(SERVER_LOCK, &check->server->lock); HA_SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
skipping to change at line 2408 skipping to change at line 2408
check_notify_success(check); check_notify_success(check);
} }
} }
task_set_affinity(t, MAX_THREADS_MASK); task_set_affinity(t, MAX_THREADS_MASK);
check->state &= ~CHK_ST_INPROGRESS; check->state &= ~CHK_ST_INPROGRESS;
if (check->server) { if (check->server) {
rv = 0; rv = 0;
if (global.spread_checks > 0) { if (global.spread_checks > 0) {
rv = srv_getinter(check) * global.spread_checks / 100; rv = srv_getinter(check) * global.spread_checks / 100;
rv -= (int) (2 * rv * (rand() / (RAND_MAX + 1.0)) ); rv -= (int) (2 * rv * (ha_random32() / 4294967295 .0));
} }
t->expire = tick_add(now_ms, MS_TO_TICKS(srv_getinter(che ck) + rv)); t->expire = tick_add(now_ms, MS_TO_TICKS(srv_getinter(che ck) + rv));
} }
} }
reschedule: reschedule:
while (tick_is_expired(t->expire, now_ms)) while (tick_is_expired(t->expire, now_ms))
t->expire = tick_add(t->expire, MS_TO_TICKS(check->inter)); t->expire = tick_add(t->expire, MS_TO_TICKS(check->inter));
out_unlock: out_unlock:
if (check->server) if (check->server)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)