896 |
Bitv.create file.file_nchunks true |
Bitv.create file.file_nchunks true |
897 |
else |
else |
898 |
if Bitv.length chunks <> file.file_nchunks then begin |
if Bitv.length chunks <> file.file_nchunks then begin |
899 |
lprintf_nl () "BAD: number of chunks is different %d/%d for %s:%Ld on peer" |
if !verbose then lprintf_nl () "BAD: number of chunks is different %d/%d for %s:%Ld on peer" |
900 |
(Bitv.length chunks) |
(Bitv.length chunks) |
901 |
file.file_nchunks |
file.file_nchunks |
902 |
(Md4.to_string file.file_md4) |
(Md4.to_string file.file_md4) |
903 |
(file_size file); |
(file_size file); |
904 |
lprintf_nl () "Peer info: name=[%s] md4=[%s] overnet=[%s] brand=[%s]" |
if !verbose then lprintf_nl () "Peer info: name=[%s] md4=[%s] overnet=[%s] brand=[%s]" |
905 |
c.client_name |
c.client_name |
906 |
(Md4.to_string c.client_md4) |
(Md4.to_string c.client_md4) |
907 |
(string_of_bool (DonkeySources.source_brand c.client_source)) |
(string_of_bool (DonkeySources.source_brand c.client_source)) |
1502 |
end |
end |
1503 |
else |
else |
1504 |
if Array.length t.Q.chunks <> file.file_nchunks then begin |
if Array.length t.Q.chunks <> file.file_nchunks then begin |
1505 |
lprintf_nl () "BAD BAD BAD (2): number of chunks is different %d/%d for %s:%Ld on peer" (Array.length t.Q.chunks) file.file_nchunks (Md4.to_string file.file_md4) (file_size file); |
if !verbose then lprintf_nl () "BAD BAD BAD (2): number of chunks is different %d/%d for %s:%Ld on peer" (Array.length t.Q.chunks) file.file_nchunks (Md4.to_string file.file_md4) (file_size file); |
1506 |
(* What should we do ? |
(* What should we do ? |
1507 |
|
|
1508 |
1) Try to recover the correct size of the file: we can use |
1) Try to recover the correct size of the file: we can use |
2375 |
|
|
2376 |
with |
with |
2377 |
Unix.Unix_error (Unix.ENETUNREACH,_,_) -> |
Unix.Unix_error (Unix.ENETUNREACH,_,_) -> |
2378 |
lprintf_nl () "Network unreachable for IP %s:%d" |
if !verbose then lprintf_nl () "Network unreachable for IP %s:%d" |
2379 |
(Ip.to_string ip) port; |
(Ip.to_string ip) port; |
2380 |
set_client_disconnected c (Closed_connect_failed); |
set_client_disconnected c (Closed_connect_failed); |
2381 |
DonkeySources.source_disconnected c.client_source |
DonkeySources.source_disconnected c.client_source |