url probability bug fix and random number use update
Status: Alpha
Brought to you by:
coroberti
From: Val S. <va...@nv...> - 2010-03-08 05:43:11
|
Hi Robert, There is a major bug in the curl-loader regarding use of the FETCH_PROBABILITY tag. In loader_fsm.c, svn rev 574, line 1359 is cctx->url_curr_index = (size_t) url_next; The url index is updated but not the url pointer. The result of this bug is that all urls are selected regardless of the probability somewhat uniformly. While debugging this I also reworked the use of probability in the curl-loader to produce better pseudo-random numbers and also added a tag RANDOM_SEED that lets you control the seed. I am attaching the patch against svn rev 574. To use it cd curl-loader patch -p3 <curl-loader.patch.574+vs6 I also noticed that the tag FETCH_PROBAILITY_ONCE is not used, but will let you decide whether it's worth to keep. Regards, /Val |