mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/fileTP/...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/fileTP/...
Date: Thu, 23 Feb 2006 10:50:36 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    06/02/23 10:50:36

Modified files:
        distrib        : ChangeLog 
        src/networks/fileTP: fileTPClients.ml fileTPComplexOptions.ml 
                             fileTPFTP.ml fileTPGlobals.ml fileTPHTTP.ml 
                             fileTPInteractive.ml fileTPSSH.ml 
                             fileTPTypes.ml 

Log message:
        patch #4934

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.747&tr2=1.748&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPClients.ml.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPComplexOptions.ml.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPFTP.ml.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPGlobals.ml.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPHTTP.ml.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPInteractive.ml.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPSSH.ml.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/fileTP/fileTPTypes.ml.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.747 mldonkey/distrib/ChangeLog:1.748
--- mldonkey/distrib/ChangeLog:1.747    Thu Feb 23 10:49:24 2006
+++ mldonkey/distrib/ChangeLog  Thu Feb 23 10:50:36 2006
@@ -15,6 +15,13 @@
 =========
 
 2006/02/23
+4934: FileTP: Small improvements
+- fix download restart bug when core is restarted, sources where not loaded
+- save referer values to files.ini
+- display amount of transfered data in downloaders list
+- display source IP and Countrycode in HTML downloaders list
+- display filesize in GUI
+- display number of sources in GUI
 4933: BT: Display number of sources in GUI
 
 2006/02/21
Index: mldonkey/src/networks/fileTP/fileTPClients.ml
diff -u mldonkey/src/networks/fileTP/fileTPClients.ml:1.16 
mldonkey/src/networks/fileTP/fileTPClients.ml:1.17
--- mldonkey/src/networks/fileTP/fileTPClients.ml:1.16  Wed Jan 11 19:12:35 2006
+++ mldonkey/src/networks/fileTP/fileTPClients.ml       Thu Feb 23 10:50:36 2006
@@ -340,7 +340,6 @@
            file.file_nconnected_clients; *)
           while file.file_nconnected_clients < max_nconnected_clients do
             let (_,c) = Queue.take file.file_clients_queue in
-              if !verbose then lprintf "One client\n";
             c.client_in_queues <- List2.removeq file c.client_in_queues;
 
             if file_size file = zero then
Index: mldonkey/src/networks/fileTP/fileTPComplexOptions.ml
diff -u mldonkey/src/networks/fileTP/fileTPComplexOptions.ml:1.13 
mldonkey/src/networks/fileTP/fileTPComplexOptions.ml:1.14
--- mldonkey/src/networks/fileTP/fileTPComplexOptions.ml:1.13   Wed Dec 14 
21:17:47 2005
+++ mldonkey/src/networks/fileTP/fileTPComplexOptions.ml        Thu Feb 23 
10:50:36 2006
@@ -40,21 +40,12 @@
           let get_value name conv = conv (List.assoc name assocs) in
           let client_hostname = get_value "client_hostname" value_to_string in
           let client_port = get_value "client_port" value_to_int in
+          let client_referer = try
+             get_value "client_referer" value_to_string with _ -> "" in
           let client_proto = try
               get_value "client_proto" value_to_string with _ -> "http" in
           let proto = find_proto client_proto in
-          let c = new_client proto client_hostname client_port in
-
-(*
-          (try
-              c.client_user.user_speed <- get_value "client_speed" value_to_int
-            with _ -> ());
-
-          (try
-              if get_value "client_push" value_to_bool then
-                c.client_user.user_kind <- Indirect_location ("", client_uid)
-with _ -> ());
-  *)
+          let c = new_client proto client_hostname client_port client_referer 
in
           c
       | _ -> failwith "Options: Not a client"
 
@@ -63,10 +54,7 @@
         "client_hostname", string_to_value c.client_hostname;
         "client_port", int_to_value c.client_port;
         "client_proto", string_to_value c.client_proto.proto_string;
-(*
-            "client_speed", int_to_value u.user_speed;
-"client_push", bool_to_value false;
-  *)
+        "client_referer", string_to_value c.client_referer;
       ]
 
     let t =
@@ -102,7 +90,7 @@
   (try
       ignore (get_value "file_sources" (value_to_list (fun v ->
               match v with
-              | SmallList [c; index] | List [c;index] ->
+              | SmallList [c; index] | List [c; index] ->
                   let s = ClientOption.value_to_client c in
                   add_download file s (Url.of_string (value_to_string index))
               | _ -> failwith "Bad source"
@@ -121,9 +109,7 @@
       "file_id", string_to_value (Md4.to_string file.file_id);
       "file_sources",
       list_to_value (fun c ->
-          lprintf "SAVING: find_client...\n";
           let n = (find_download file c.client_downloads).download_url in
-          lprintf "SAVING: find_client...done...saving\n";
           SmallList [ClientOption.client_to_value c;
             string_to_value (Url.to_string n)]
       ) file.file_clients;
Index: mldonkey/src/networks/fileTP/fileTPFTP.ml
diff -u mldonkey/src/networks/fileTP/fileTPFTP.ml:1.10 
mldonkey/src/networks/fileTP/fileTPFTP.ml:1.11
--- mldonkey/src/networks/fileTP/fileTPFTP.ml:1.10      Wed Dec 14 21:17:47 2005
+++ mldonkey/src/networks/fileTP/fileTPFTP.ml   Thu Feb 23 10:50:36 2006
@@ -81,11 +81,16 @@
 
             let swarmer = Int64Swarmer.uploader_swarmer up in
 
+            let old_downloaded =
+              Int64Swarmer.downloaded swarmer in
+
             Int64Swarmer.received up
               !counter_pos b.buf b.pos to_read_int;
             let new_downloaded =
               Int64Swarmer.downloaded swarmer in
 
+           c.client_downloaded <- c.client_downloaded ++ (new_downloaded -- 
old_downloaded);
+
             if new_downloaded = file_size file then
               download_finished file;
 
@@ -359,7 +364,6 @@
             disconnect_client c s
 
         | CONNECTED ->
-          lprintf "CONNECTED !!! Asking for range...\n";
           f sock
         | _ -> ()
     )
Index: mldonkey/src/networks/fileTP/fileTPGlobals.ml
diff -u mldonkey/src/networks/fileTP/fileTPGlobals.ml:1.19 
mldonkey/src/networks/fileTP/fileTPGlobals.ml:1.20
--- mldonkey/src/networks/fileTP/fileTPGlobals.ml:1.19  Wed Jan 11 19:12:35 2006
+++ mldonkey/src/networks/fileTP/fileTPGlobals.ml       Thu Feb 23 10:50:36 2006
@@ -127,6 +127,7 @@
       Int64Swarmer.set_verified swarmer (fun _ _ ->
           file_must_update (as_file file);
       );
+      file_must_update (as_file file)
       (*
       Int64Swarmer.set_writer swarmer (fun offset s pos len ->
 
@@ -182,7 +183,7 @@
       Hashtbl.add files_by_uid file_id file;
       file
 
-let new_client proto hostname port =
+let new_client proto hostname port referer =
   let key = (hostname,port) in
   try
     Hashtbl.find clients_by_uid key
@@ -190,18 +191,13 @@
       let rec c = {
           client_client = impl;
           client_sock = NoConnection;
-(*          client_name = name;
-          client_kind = None; *)
           client_requests = [];
-(*
-client_pos = Int32.zero;
-client_error = false;
-  *)
-
           client_connection_control = new_connection_control (());
           client_downloads = [];
           client_hostname = hostname;
+          client_referer = referer;
           client_port = port;
+         client_downloaded = zero;
           client_reconnect = false;
           client_in_queues = [];
           client_connected_for = None;
@@ -216,10 +212,9 @@
       Hashtbl.add clients_by_uid key c;
       c
     
-let add_download file c url referer =
+let add_download file c url =
 (*  let r = new_result file.file_name (file_size file) in *)
 (*  add_source r c.client_user index; *)
-  if !verbose then lprintf "Adding file to client\n";
   if not (List.memq c file.file_clients) then begin
       let chunks = [ Int64.zero, file_size file ] in
       (*
@@ -228,7 +223,6 @@
       c.client_downloads <- c.client_downloads @ [{
           download_file = file;
           download_url = url;
-          download_referer = referer;
           download_chunks = chunks;
           download_uploader = None;
           download_ranges = [];
Index: mldonkey/src/networks/fileTP/fileTPHTTP.ml
diff -u mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.19 
mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.20
--- mldonkey/src/networks/fileTP/fileTPHTTP.ml:1.19     Sun Dec 18 14:50:38 2005
+++ mldonkey/src/networks/fileTP/fileTPHTTP.ml  Thu Feb 23 10:50:36 2006
@@ -48,12 +48,12 @@
 
 (* prints a new logline with date, module and starts newline *)
 let lprintf_nl () =
-  lprintf "%s[HTTP] "
+  lprintf "%s[FileTP] "
     (log_time ()); lprintf_nl2
 
 (* prints a new logline with date, module and does not start newline *)
 let lprintf_n () =
-  lprintf "%s[HTTP] "
+  lprintf "%s[FileTP] "
     (log_time ()); lprintf
 
 (*************************************************************************)
@@ -68,8 +68,6 @@
   let real_url =
     (Str.global_replace (Str.regexp " ") "%20" url.Url.full_file) in
 
-  let referer = d.download_referer in
-  
   let (x,y) = range in
   let range = Printf.sprintf "%Ld-%Ld" x (Int64.pred y) in
 
@@ -85,7 +83,7 @@
                     name); *)
   Printf.bprintf buf "Host: %s\r\n" c.client_hostname;
   Printf.bprintf buf "User-Agent: %s\r\n" user_agent;
-  Printf.bprintf buf "Referer: %s\r\n" (Url.to_string referer);
+  Printf.bprintf buf "Referer: %s\r\n" c.client_referer;
   Printf.bprintf buf "Range: bytes=%s\r\n" range;
   Printf.bprintf buf "Connection: Keep-Alive\r\n";
   Printf.bprintf buf "\r\n";
@@ -165,31 +163,6 @@
           end;
       end;
 
-    (* I think this is already handeled with the new headder check before
-       download start code
-    (* If the header contains a redirection *)
-    if (code = 302) then begin
-      let (newurl, _) = List.assoc "location" headers in
-
-      remove_file file;
-      file_cancel (as_file file);
-      let u = Url.of_string newurl in
-
-      c.client_hostname <- u.Url.server;
-      c.client_port <- u.Url.port;
-
-      let file = new_file (Md4.random ()) u.Url.full_file zero in
-
-      lprintf_nl () "DOWNLOAD FILE %s" (file_best_name  file);
-      if not (List.memq file !current_files) then begin
-    current_files := file :: !current_files;
-      end;
-      add_download file c u r;
-      FileTPClients.get_file_from_source c file;
-
-     end;
-    *)
-
     if  code < 200 || code > 299 then
       failwith "Bad HTTP code";
 
@@ -254,7 +227,6 @@
     (try
         let (len,_) = List.assoc "content-length" headers in
         let len = Int64.of_string len in
-        if !verbose then lprintf_nl () "Specified length: %Ld" len;
         if len <> end_pos -- start_pos then
           begin
             failwith (Printf.sprintf "ERROR: bad computed range: %Ld-%Ld/%Ld 
\n%s\n"
@@ -265,10 +237,6 @@
             (String.escaped header)
     );
 
-    if !verbose then lprintf_nl () "Receiving range: %Ld-%Ld (len = %Ld)\n%s"
-      start_pos end_pos (end_pos -- start_pos)
-    (String.escaped header)
-    ;
     set_client_state c (Connected_downloading (file_num file));
     let counter_pos = ref start_pos in
 (* Send the next request *)
@@ -286,9 +254,6 @@
         let to_read = min (end_pos -- !counter_pos)
           (Int64.of_int b.len) in
 
-        if !verbose then lprintf_nl () "Reading: end_pos %Ld counter_pos %Ld 
len %d = to_read %Ld"
-end_pos !counter_pos b.len to_read;
-
         let to_read_int = Int64.to_int to_read in
 (*
         if !verbose then lprintf "CHUNK: %s\n"
@@ -299,6 +264,9 @@
 (*        List.iter (fun (_,_,r) -> Int64Swarmer.free_range r)
         d.download_ranges; *)
 
+        let old_downloaded =
+          Int64Swarmer.downloaded swarmer in
+
         begin
           try
             match d.download_uploader with
@@ -316,6 +284,8 @@
         let new_downloaded =
           Int64Swarmer.downloaded swarmer in
 
+        c.client_downloaded <- c.client_downloaded ++ (new_downloaded -- 
old_downloaded);
+
         (match d.download_ranges with
             [] -> lprintf_nl () "EMPTY Ranges!"
           | r :: _ ->
@@ -423,7 +393,6 @@
   even in this case... *)
 
         | CONNECTED ->
-          if !verbose then lprintf_nl () "CONNECTED !!! Asking for range...";
           f sock
         | _ -> ()
     )
Index: mldonkey/src/networks/fileTP/fileTPInteractive.ml
diff -u mldonkey/src/networks/fileTP/fileTPInteractive.ml:1.31 
mldonkey/src/networks/fileTP/fileTPInteractive.ml:1.32
--- mldonkey/src/networks/fileTP/fileTPInteractive.ml:1.31      Sun Feb  5 
13:19:14 2006
+++ mldonkey/src/networks/fileTP/fileTPInteractive.ml   Thu Feb 23 10:50:36 2006
@@ -83,8 +83,8 @@
         P.file_md4 = Md4.null;
         P.file_size = file_size file;
         P.file_downloaded = file_downloaded file;
-        P.file_all_sources = 0;
-        P.file_active_sources = 0;
+        P.file_all_sources = (List.length file.file_clients);
+        P.file_active_sources = (List.length file.file_clients);
         P.file_state = file_state file;
         P.file_sources = None;
         P.file_download_rate = file_download_rate file.file_file;
@@ -125,10 +125,10 @@
         P.client_rating = 0;
         P.client_chat_port = 0 ;
         P.client_connect_time = BasicSocket.last_time ();
-        P.client_software = "";
+        P.client_software = "TP";
         P.client_release = "";
         P.client_emulemod = "";
-        P.client_downloaded = zero;
+        P.client_downloaded = c.client_downloaded;
         P.client_uploaded = zero;
         P.client_upload = None;
         P.client_sui_verified = None;
@@ -149,7 +149,7 @@
         let cinfo = client_info cc in
         client_print cc o;
         Printf.bprintf buf "client: %s downloaded: %s uploaded: %s"
-          "fT" (* cinfo.GuiTypes.client_software *)
+          cinfo.GuiTypes.client_software
           (Int64.to_string cinfo.GuiTypes.client_downloaded)
         (Int64.to_string cinfo.GuiTypes.client_uploaded);
         Printf.bprintf buf "\nfilename: %s\n\n" info.GuiTypes.file_name;
@@ -159,6 +159,13 @@
         let buf = o.conn_buf in
         let cc = as_client c in
         let cinfo = client_info cc in
+       let client_ip, client_port =
+         match cinfo.GuiTypes.client_kind with
+           Indirect_location (_, _, ip, port)
+         | Known_location (ip, port) -> ip, port
+       in
+        let ccode,cname = Geoip.get_country (fst (client_ip,client_port)) in
+
         Printf.bprintf buf " \\<tr onMouseOver=\\\"mOvr(this);\\\"
     onMouseOut=\\\"mOut(this);\\\" class=\\\"%s\\\"\\>" str;
 
@@ -173,8 +180,8 @@
           ((string_of_connection_state (client_state cc)), "sr",
             (short_string_of_connection_state (client_state cc)));
           ("", "sr", cinfo.GuiTypes.client_name);
-          ("", "sr", "TP"); (* cinfo.GuiTypes.client_software *)
-          ("", "sr", ""); (* cinfo.GuiTypes.client_release *)
+          ("", "sr", cinfo.GuiTypes.client_software);
+          ("", "sr", cinfo.GuiTypes.client_release);
           ] @
           (if !show_emulemods_column then [("", "sr", "")] else [])
           @ [
@@ -183,81 +190,15 @@
               (((last_time ()) - cinfo.GuiTypes.client_connect_time) / 60));
           ("", "sr", "D");
           ("", "sr", "N");
-          ("", "sr", (string_of_client_addr c));
-          ] @ (if !Geoip.active then [("?", "sr", "?")] else []) @ [
+          ("", "sr", Printf.sprintf "%s:%d" (Ip.to_string client_ip) 
client_port);
+          ] @ (if !Geoip.active then [(cname, "sr", ccode)] else []) @ [
           ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_uploaded));
           ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_downloaded));
           ("", "sr", info.GuiTypes.file_name); ]);
         true
     )
 
-(* As in bittorrent: make an initial connection just to know the complete
-  size of the file and disconnect immediatly after. *)
-
-  (*
-let rec start_download_file_from_mirror proto file url u result_size =
-  (*
-  lprintf "RECEIVED HEADERS\n";
-  let content_length = ref None in
-  List.iter (fun (name, content) ->
-      if String.lowercase name = "content-length" then
-        try
-          content_length := Some (Int64.of_string content)
-        with _ ->
-            lprintf "bad content length [%s]\n" content;
-  ) headers;
-  match !content_length with
-    None -> failwith "Unable to mirror download (HEAD failed)"
-  | Some result_size -> *)
-      if !verbose then
-        lprintf_nl "[FILETP]: STARTING DOWNLOAD WITH SIZE %Ld" result_size;
-      if file_size file <> result_size then
-        if !verbose then
-          lprintf_nl "[FILETP]: Error, unable to mirror download (files have 
different sizes)"
-      else
-      let client_hostname = url.Url.server in
-      let client_port = url.Url.port in
-      let c = new_client proto client_hostname client_port in
-      add_download file c url.Url.full_file referer.Url.full_file;
-      FileTPClients.get_file_from_source c file; 
-      ()  
-
-let test_mirrors file urls =
-  List.iter (fun url ->
-      try
-        let u = Url.of_string url in
-        let proto = match u.Url.proto with
-          | "http" -> FileTPHTTP.proto
-          | "ftp" -> FileTPFTP.proto
-          | "ssh" -> FileTPSSH.proto
-          | s -> failwith
-              (Printf.sprintf "Unknown URL protocol [%s]" s)
-        in
-        proto.proto_check_size u url
-          (start_download_file_from_mirror proto file)
-        (*
-        let module H = Http_client in
-        let r = {
-            H.basic_request with
-            H.req_url = u;
-            H.req_proxy = !CommonOptions.http_proxy;
-            H.req_request = H.HEAD;
-            H.req_user_agent = user_agent;
-          } in
-
-H.whead r (start_download_file_from_mirror file u)
-  *)
-      with _ -> ()) urls
-
-let
-let download_file_from_mirror file url =
-  test_mirrors file [url];
-  find_mirrors file url
-    *)
-
-
-
-let rec download_file_from_mirror file u r =
+let rec download_file_from_mirror file u referer =
 
   let proto = match u.Url.proto with
     | "http" -> FileTPHTTP.proto
@@ -269,8 +210,8 @@
 
   let client_hostname = u.Url.server in
   let client_port = u.Url.port in
-  let c = new_client proto client_hostname client_port in
-  add_download file c u r;
+  let c = new_client proto client_hostname client_port referer in
+  add_download file c u;
   FileTPClients.get_file_from_source c file; 
   ()
 
@@ -294,7 +235,7 @@
           let suffix = String.sub url namelen (urllen - namelen) in
           List.iter (fun name ->
               download_file_from_mirror file (Url.of_string
-                (name ^ suffix)) (Url.of_string name)) mirrors
+                (name ^ suffix)) name) mirrors
         else
           iter2 mirrors tail
   in
@@ -304,7 +245,6 @@
   
 let download_file url referer = 
   let u = Url.of_string url in
-  let r = Url.of_string referer in
 
   if List.mem u !!old_files && !previous_url <> url then begin
       previous_url := url;
@@ -314,12 +254,12 @@
   let file = new_file (Md4.random ()) u.Url.full_file zero in
   
   if !verbose then
-    lprintf_nl () "DOWNLOAD FILE %s" (file_best_name  file); 
+    lprintf_nl () "Started new download: %s from %s" (file_best_name file) 
url; 
   if not (List.memq file !current_files) then begin
       current_files := file :: !current_files;
     end;
   
-  download_file_from_mirror file u r;
+  download_file_from_mirror file u referer;
   find_mirrors file u
 
 (* I think this is a real bad idea, we should check this by ensuring that the
@@ -423,7 +363,6 @@
           if !verbose then
             lprintf_nl () "MIRROR [%s] [%s]" !num !url;
           let u = Url.of_string !url in
-          let r = Url.of_string !referer in
 
           if List.mem u !!old_files && !previous_url <> !url then begin
               previous_url := !url;
@@ -438,7 +377,7 @@
                     lprintf_nl () "Try HEAD from mirror";
 
 
-                  download_file_from_mirror file u r;
+                  download_file_from_mirror file u !referer;
                   find_mirrors file u;
 
                   raise Exit
@@ -479,6 +418,8 @@
   network.op_network_search <- (fun ss buf -> ());
   network.op_network_download <- (fun r -> dummy_file);
   file_ops.op_file_commit <- (fun file new_name -> ());
+  file_ops.op_file_pause <- (fun file -> ());
+  file_ops.op_file_resume <- (fun file -> ());
   file_ops.op_file_print_html <- (fun file buf -> ());
   file_ops.op_file_print_sources_html <- (fun file buf -> ());
   network.op_network_forget_search <- (fun s -> ());
Index: mldonkey/src/networks/fileTP/fileTPSSH.ml
diff -u mldonkey/src/networks/fileTP/fileTPSSH.ml:1.7 
mldonkey/src/networks/fileTP/fileTPSSH.ml:1.8
--- mldonkey/src/networks/fileTP/fileTPSSH.ml:1.7       Wed Dec 14 21:17:47 2005
+++ mldonkey/src/networks/fileTP/fileTPSSH.ml   Thu Feb 23 10:50:36 2006
@@ -91,14 +91,20 @@
         match d.download_uploader with
           None -> assert false
         | Some up ->
-
+                         
             let swarmer = Int64Swarmer.uploader_swarmer up in
+
+            let old_downloaded =
+              Int64Swarmer.downloaded swarmer in
+
             Int64Swarmer.received up
               pos s 0 (String.length s);
 
             let new_downloaded =
               Int64Swarmer.downloaded swarmer in
 
+           c.client_downloaded <- c.client_downloaded ++ (new_downloaded -- 
old_downloaded);
+
             if new_downloaded = file_size file then
               download_finished file;
 
Index: mldonkey/src/networks/fileTP/fileTPTypes.ml
diff -u mldonkey/src/networks/fileTP/fileTPTypes.ml:1.8 
mldonkey/src/networks/fileTP/fileTPTypes.ml:1.9
--- mldonkey/src/networks/fileTP/fileTPTypes.ml:1.8     Wed Jul 27 22:16:02 2005
+++ mldonkey/src/networks/fileTP/fileTPTypes.ml Thu Feb 23 10:50:36 2006
@@ -29,8 +29,10 @@
     client_client : client CommonClient.client_impl;
     mutable client_port : int;
     mutable client_hostname : string;
+    mutable client_referer : string;
     mutable client_downloads : download list;
     mutable client_in_queues : file list;
+    mutable client_downloaded : int64;
     mutable client_connection_control : connection_control;
     mutable client_sock : tcp_connection;
     mutable client_requests : download list;
@@ -53,7 +55,6 @@
 and download = {
     download_file : file;
     download_url : Url.url;
-    download_referer : Url.url;
     mutable download_chunks : (int64 * int64) list;
     mutable download_uploader : Int64Swarmer.uploader option;
     mutable download_ranges : (int64 * int64 * Int64Swarmer.range) list;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]