221 |
if f != file then iter tail |
if f != file then iter tail |
222 |
else begin |
else begin |
223 |
Int64Swarmer.update_uploader up |
Int64Swarmer.update_uploader up |
224 |
(AvailableBoolBitmap client_chunks); |
(AvailableBitv client_chunks); |
225 |
Array.blit client_chunks 0 chunks 0 (Array.length chunks) |
Bitv.blit client_chunks 0 chunks 0 (Bitv.length chunks) |
226 |
end |
end |
227 |
|
|
228 |
| [] -> |
| [] -> |
229 |
let up = Int64Swarmer.register_uploader swarmer (as_client c) |
let up = Int64Swarmer.register_uploader swarmer (as_client c) |
230 |
(AvailableBoolBitmap client_chunks) in |
(AvailableBitv client_chunks) in |
231 |
c.client_file_queue <- c.client_file_queue @ |
c.client_file_queue <- c.client_file_queue @ |
232 |
[file, client_chunks, up] |
[file, client_chunks, up] |
233 |
in |
in |
442 |
with |
with |
443 |
| e -> |
| e -> |
444 |
let m = |
let m = |
445 |
(* Printf.sprintf "File %s begin_pos=%s bloc_begin=%d bloc_len=%d:\nError %s while writing block%s\n" (file_best_name file) (Int64.to_string begin_pos) t.Q.bloc_begin t.Q.bloc_len (Printexc2.to_string e) *) |
(* Printf.sprintf "File %s begin_pos=%s bloc_begin=%d bloc_len=%d:\nError %s while writing block%s\n" (file_best_name file) (Int64.to_string begin_pos) t.Q.bloc_begin t.Q.bloc_len (Printexc2.to_string e) *) |
446 |
(match e with |
(match e with |
447 |
Unix.Unix_error (Unix.ENOSPC, _, _) -> " (Disk full?)" |
Unix.Unix_error (Unix.ENOSPC, _, _) -> " (Disk full?)" |
448 |
| _ -> "") in |
| _ -> "") in |
487 |
{ tag_name = Field_Filename; tag_value = String s } -> file_name := s |
{ tag_name = Field_Filename; tag_value = String s } -> file_name := s |
488 |
| { tag_name = Field_Size; tag_value = Uint64 v } -> file_size := v |
| { tag_name = Field_Size; tag_value = Uint64 v } -> file_size := v |
489 |
| { tag_name = Field_Availability; |
| { tag_name = Field_Availability; |
490 |
tag_value = (Uint64 v| Fint64 v) } -> |
tag_value = (Uint64 v| Fint64 v) } -> |
491 |
availability := Int64.to_int v; new_tags := tag :: !new_tags |
availability := Int64.to_int v; new_tags := tag :: !new_tags |
492 |
| _ -> new_tags := tag :: !new_tags |
| _ -> new_tags := tag :: !new_tags |
493 |
) tags; |
) tags; |