75 |
DonkeySources.connect_sources connection_manager; |
DonkeySources.connect_sources connection_manager; |
76 |
with e -> |
with e -> |
77 |
if !verbose_sources > 2 then |
if !verbose_sources > 2 then |
78 |
lprintf "Exception %s while checking sources\n" |
lprintf_nl "Exception %s while checking sources" |
79 |
(Printexc2.to_string e) |
(Printexc2.to_string e) |
80 |
) |
) |
81 |
|
|
204 |
if Unix32.file_exists file_disk_name && |
if Unix32.file_exists file_disk_name && |
205 |
Unix32.getsize file_disk_name false <> Int64.zero then begin |
Unix32.getsize file_disk_name false <> Int64.zero then begin |
206 |
(* getsize writable=false is ok because file has state FileDownloaded *) |
(* getsize writable=false is ok because file has state FileDownloaded *) |
207 |
lprintf "FILE DOWNLOADED\n"; |
lprintf_nl "FILE DOWNLOADED"; |
208 |
|
|
209 |
DonkeyOneFile.declare_completed_file file; |
DonkeyOneFile.declare_completed_file file; |
210 |
end |
end |
213 |
file_commit (as_file file) |
file_commit (as_file file) |
214 |
end |
end |
215 |
with e -> |
with e -> |
216 |
lprintf "Exception %s while recovering download %s\n" |
lprintf_nl "Exception %s while recovering download %s" |
217 |
(Printexc2.to_string e) (file_disk_name file); |
(Printexc2.to_string e) (file_disk_name file); |
218 |
) files_by_md4; |
) files_by_md4; |
219 |
|
|
256 |
udp_sock := Some sock; |
udp_sock := Some sock; |
257 |
UdpSocket.set_write_controler sock udp_write_controler; |
UdpSocket.set_write_controler sock udp_write_controler; |
258 |
with e -> |
with e -> |
259 |
lprintf "Exception %s while binding UDP socket\n" |
lprintf_nl "Exception %s while binding UDP socket" |
260 |
(Printexc2.to_string e); |
(Printexc2.to_string e); |
261 |
end; |
end; |
262 |
sock |
sock |
328 |
*) |
*) |
329 |
|
|
330 |
with e -> |
with e -> |
331 |
lprintf "Error: Exception %s during startup\n" |
lprintf_nl "Error: Exception %s during startup" |
332 |
(Printexc2.to_string e) |
(Printexc2.to_string e) |
333 |
|
|
334 |
let _ = |
let _ = |
375 |
let s = File.to_string file in |
let s = File.to_string file in |
376 |
let t = K.read s in |
let t = K.read s in |
377 |
K.print t; |
K.print t; |
378 |
lprint_newline (); |
lprintf_nl ""; |
379 |
), " <filename> : print a known.met file"; |
), " <filename> : print a known.met file"; |
380 |
"-part", Arg.String (fun file -> |
"-part", Arg.String (fun file -> |
381 |
let module K = DonkeyImport.Part in |
let module K = DonkeyImport.Part in |
382 |
let s = File.to_string file in |
let s = File.to_string file in |
383 |
let t = K.read s in |
let t = K.read s in |
384 |
K.print t; |
K.print t; |
385 |
lprint_newline (); |
lprintf_nl ""; |
386 |
), " <filename> : print a .part.met file"; |
), " <filename> : print a .part.met file"; |
387 |
"-server", Arg.String (fun file -> |
"-server", Arg.String (fun file -> |
388 |
let module K = DonkeyImport.Server in |
let module K = DonkeyImport.Server in |
389 |
let s = File.to_string file in |
let s = File.to_string file in |
390 |
let t = K.read s in |
let t = K.read s in |
391 |
K.print t; |
K.print t; |
392 |
lprint_newline (); |
lprintf_nl ""; |
393 |
exit 0 |
exit 0 |
394 |
), " <filename> : print a server.met file"; |
), " <filename> : print a server.met file"; |
395 |
"-pref", Arg.String (fun file -> |
"-pref", Arg.String (fun file -> |
397 |
let s = File.to_string file in |
let s = File.to_string file in |
398 |
let t = K.read s in |
let t = K.read s in |
399 |
K.print t; |
K.print t; |
400 |
lprint_newline (); |
lprintf_nl ""; |
401 |
), " <filename> : print a server.met file"; |
), " <filename> : print a server.met file"; |
402 |
"-peers", Arg.String (fun file -> |
"-peers", Arg.String (fun file -> |
403 |
let module K = DonkeyOvernetImport.Peer in |
let module K = DonkeyOvernetImport.Peer in |
404 |
let s = File.to_string file in |
let s = File.to_string file in |
405 |
let t = K.read s in |
let t = K.read s in |
406 |
K.print t; |
K.print t; |
407 |
lprint_newline (); |
lprintf_nl ""; |
408 |
exit 0 |
exit 0 |
409 |
), " <filename> : print a contact.dat file"; |
), " <filename> : print a contact.dat file"; |
410 |
] |
] |