mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-09 08:23:35 -05:00
Prior to this change, given two records of weight 1 the algorithm would return them in the order (0,1) with 100% probability instead of the desired 50%. This was due to an off-by-one error in the range test. srv_rand() returns a float in the range [0.0, 1.0[, so r is an integer in the range [0, total[. The correct probability for record 0 to be chosen is a[0].weight/total, not (a[0].weight+1)/total. |
||
|---|---|---|
| .. | ||
| liblber | ||
| libldap | ||
| libldap_r | ||
| liblmdb | ||
| liblunicode | ||
| liblutil | ||
| librewrite | ||
| Makefile.in | ||