/[mldonkey]/mldonkey/src/utils/net/ip_set.ml
ViewVC logotype

Diff of /mldonkey/src/utils/net/ip_set.ml

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

revision 1.7 by spiralvoice, Thu Jun 23 10:53:57 2005 UTC revision 1.8 by spiralvoice, Thu Jul 7 00:25:46 2005 UTC
# Line 151  let of_list l = Line 151  let of_list l =
151    of_list_aux l BL_Empty    of_list_aux l BL_Empty
152    
153  let print_list buf bl =  let print_list buf bl =
   
154    let rec print_list_aux bl =    let rec print_list_aux bl =
155      match bl with      match bl with
156          BL_Empty -> 0          BL_Empty -> 0
157        | BL_Range (red, left, br, right) ->        | BL_Range (red, left, br, right) ->
158            let nleft = print_list_aux left in            let nleft = print_list_aux left in
159            if br.blocking_hits > 0 then            if br.blocking_hits > 0 then
160              Printf.bprintf buf "%s (%d hits): %s - %s\n"              Printf.bprintf buf "%s (%d hits): %s - %s\n"
161                br.blocking_description                br.blocking_description
162                br.blocking_hits                br.blocking_hits
163                (Ip.to_string br.blocking_begin)                (Ip.to_string br.blocking_begin)
164                (Ip.to_string br.blocking_end);                (Ip.to_string br.blocking_end);
165            let nright = print_list_aux right in            let nright = print_list_aux right in
166              nleft + 1 + nright in            nleft + 1 + nright in
167    
168    let count = print_list_aux bl in    let count = print_list_aux bl in
169    Printf.bprintf buf "%d ranges\n" count    Printf.bprintf buf "%d ranges\n" count

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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