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

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

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

revision 1.5 by spiralvoice, Fri Sep 2 22:39:59 2005 UTC revision 1.6 by spiralvoice, Wed Sep 14 20:28:26 2005 UTC
# Line 1138  let print_uploaders t = Line 1138  let print_uploaders t =
1138  (*                                                                       *)  (*                                                                       *)
1139  (*************************************************************************)  (*************************************************************************)
1140    
 let max_clients_per_block = 3  
   
1141  let permute_and_return up n =  let permute_and_return up n =
1142    let b = up.up_complete_blocks.(n) in    let b = up.up_complete_blocks.(n) in
1143    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 1370  better work at the beginning if the firs Line 1368  better work at the beginning if the firs
1368  (************* Fall back on linear download if nothing worked *)  (************* Fall back on linear download if nothing worked *)
1369                            
1370              in              in
1371              iter_max_uploaders 1;              iter_max_uploaders !!sources_per_chunk;
             iter_max_uploaders max_clients_per_block;  
1372              iter_max_uploaders max_int;              iter_max_uploaders max_int;
1373              raise Not_found              raise Not_found
1374            with            with
# Line 1523  we thus might put a lot of clients on th Line 1520  we thus might put a lot of clients on th
1520          | Some rr -> iter limit rr                    | Some rr -> iter limit rr          
1521        in        in
1522        try        try
 (* first try to find ranges with 0 uploaders *)  
         iter 1 r  
       with Not_found ->  
           try  
1523  (* try normal ranges *)  (* try normal ranges *)
1524              iter max_clients_per_block r          iter !!sources_per_chunk r
1525            with Not_found ->        with Not_found ->
1526  (* force maximal uploading otherwise to finish it *)  (* force maximal uploading otherwise to finish it *)
1527                iter max_int r            iter max_int r
1528    
1529  (*************************************************************************)  (*************************************************************************)
1530  (*                                                                       *)  (*                                                                       *)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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