/[mldonkey]/mldonkey/src/daemon/common/commonSwarming2.ml
ViewVC logotype

Diff of /mldonkey/src/daemon/common/commonSwarming2.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by spiralvoice, Fri Sep 2 22:39:59 2005 UTC revision 1.17 by spiralvoice, Wed Sep 14 20:28:26 2005 UTC
# Line 1805  let print_uploaders s = Line 1805  let print_uploaders s =
1805  (*                                                                       *)  (*                                                                       *)
1806  (*************************************************************************)  (*************************************************************************)
1807    
 let max_clients_per_block = 3  
   
1808  let permute_and_return up n =  let permute_and_return up n =
1809    let b = up.up_complete_blocks.(n) in    let b = up.up_complete_blocks.(n) in
1810    if debug_all then  lprintf "permute_and_return %d <> %d" n b;    if debug_all then  lprintf "permute_and_return %d <> %d" n b;
# Line 2117  better work at the beginning if the firs Line 2115  better work at the beginning if the firs
2115  (************* Fall back on linear download if nothing worked *)  (************* Fall back on linear download if nothing worked *)
2116    
2117                in                in
2118                iter_max_uploaders 1;                iter_max_uploaders !!sources_per_chunk;
               iter_max_uploaders max_clients_per_block;  
2119                iter_max_uploaders max_int;                iter_max_uploaders max_int;
2120                raise Not_found                raise Not_found
2121              with              with
# Line 2277  we thus might put a lot of clients on th Line 2274  we thus might put a lot of clients on th
2274          | Some rr -> iter limit rr          | Some rr -> iter limit rr
2275        in        in
2276        try        try
 (* first try to find ranges with 0 uploaders *)  
         iter 1 r  
       with Not_found ->  
           try  
2277  (* try normal ranges *)  (* try normal ranges *)
2278              iter max_clients_per_block r          iter !!sources_per_chunk r
2279            with Not_found ->        with Not_found ->
2280  (* force maximal uploading otherwise to finish it *)  (* force maximal uploading otherwise to finish it *)
2281                iter max_int r            iter max_int r
2282    
2283  (*************************************************************************)  (*************************************************************************)
2284  (*                                                                       *)  (*                                                                       *)

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26