/[mldonkey]/mldonkey/src/networks/fileTP/fileTPGlobals.ml
ViewVC logotype

Diff of /mldonkey/src/networks/fileTP/fileTPGlobals.ml

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

revision 1.13 by spiralvoice, Tue Jul 26 23:16:48 2005 UTC revision 1.14 by spiralvoice, Wed Jul 27 22:16:02 2005 UTC
# Line 208  client_error = false; Line 208  client_error = false;
208        new_client impl;        new_client impl;
209        Hashtbl.add clients_by_uid key c;        Hashtbl.add clients_by_uid key c;
210        c        c
211        
212  let add_download file c url =  let add_download file c url referer =
213  (*  let r = new_result file.file_name (file_size file) in *)  (*  let r = new_result file.file_name (file_size file) in *)
214  (*  add_source r c.client_user index; *)  (*  add_source r c.client_user index; *)
215    if !verbose then lprintf "Adding file to client\n";    if !verbose then lprintf "Adding file to client\n";
# Line 221  let add_download file c url = Line 221  let add_download file c url =
221        c.client_downloads <- c.client_downloads @ [{        c.client_downloads <- c.client_downloads @ [{
222            download_file = file;            download_file = file;
223            download_url = url;            download_url = url;
224              download_referer = referer;
225            download_chunks = chunks;            download_chunks = chunks;
226            download_uploader = None;            download_uploader = None;
227            download_ranges = [];            download_ranges = [];
# Line 240  let rec find_download file list = Line 241  let rec find_download file list =
241    | d :: tail ->    | d :: tail ->
242        if d.download_file == file then d else find_download file tail        if d.download_file == file then d else find_download file tail
243    
244    
245  let rec find_download_by_index index list =  let rec find_download_by_index index list =
246    match list with    match list with
247      [] -> raise Not_found      [] -> raise Not_found
# Line 275  let set_client_state client state = Line 277  let set_client_state client state =
277  let set_client_disconnected client =  let set_client_disconnected client =
278    CommonClient.set_client_disconnected (as_client client)    CommonClient.set_client_disconnected (as_client client)
279    
280    
281  let remove_file file =  let remove_file file =
282    Hashtbl.remove files_by_uid file.file_id;    Hashtbl.remove files_by_uid file.file_id;
283    current_files := List2.removeq file !current_files    current_files := List2.removeq file !current_files
# Line 289  let old_client_name = ref "" Line 292  let old_client_name = ref ""
292  let ft_client_name = ref ""  let ft_client_name = ref ""
293    
294  let client_name () =  let client_name () =
   
295    let name = !!global_login in    let name = !!global_login in
296    if name != !old_client_name then  begin    if name != !old_client_name then  begin
297        let len = String.length name in        let len = String.length name in

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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