SourceManagement
From MLDonkey
A common source is converted into an EDK client here: donkeyClient.ml
DonkeySources.functions.DonkeySources.function_connect <-
(fun s_uid ->
try
match s_uid with
Direct_address _ ->
let c = new_client s_uid in
reconnect_client c
| Invalid_address _ -> ()
| Indirect_address (server_ip, server_port, id, port, real_ip) ->
if Ip.reachable server_ip then
query_id server_ip server_port id;
with e ->
if !verbose then
lprintf_nl "connect_source: exception %s" (Printexc2.to_string e)
);
Why does printing sources in a user interface create clients from sources?
Could this be the reason why so many sources with MD4 = 000000000000 are printed?
file_ops.op_file_print_sources <- (fun file o ->
if not (use_html_mods o) then raise Not_found;
let buf = o.conn_buf in
let sources_list = ref [] in
DonkeySources.iter_relevant_sources (fun s ->
let s_uid = s.DonkeySources.source_uid in
let c = new_client s_uid in
sources_list := (s,c) :: !sources_list
) file.file_sources;