mldonkey-commits
[Top][All Lists]
Advanced

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

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Sat, 02 Dec 2006 12:35:46 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/12/02 12:35:46

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonClient.ml commonFile.ml guiDecoding.ml 
                           guiEncoding.ml guiTypes.ml 
        src/daemon/driver: driverCommands.ml 
        src/gtk/newgui : gui_downloads.ml gui_friends.ml 
        src/gtk2/gui   : guiMisc.ml 
        src/networks/bittorrent: bTClients.ml bTGlobals.ml 
                                 bTInteractive.ml bTStats.ml bTTypes.ml 
        src/networks/donkey: donkeyClient.ml donkeyGlobals.ml 
                             donkeyInteractive.ml donkeyProtoCom.ml 
                             donkeyStats.ml donkeyTypes.ml 
        src/networks/fileTP: fileTPClients.ml fileTPFTP.ml 
                             fileTPGlobals.ml fileTPHTTP.ml 
                             fileTPInteractive.ml fileTPSSH.ml 
                             fileTPTypes.ml 
        src/networks/gnutella: gnutellaInteractive.ml 

Log message:
        patch #5606

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1123&r2=1.1124
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonClient.ml?cvsroot=mldonkey&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonFile.ml?cvsroot=mldonkey&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiDecoding.ml?cvsroot=mldonkey&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiEncoding.ml?cvsroot=mldonkey&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiTypes.ml?cvsroot=mldonkey&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.204&r2=1.205
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/newgui/gui_downloads.ml?cvsroot=mldonkey&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/newgui/gui_friends.ml?cvsroot=mldonkey&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk2/gui/guiMisc.ml?cvsroot=mldonkey&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTClients.ml?cvsroot=mldonkey&r1=1.84&r2=1.85
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTGlobals.ml?cvsroot=mldonkey&r1=1.72&r2=1.73
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTInteractive.ml?cvsroot=mldonkey&r1=1.123&r2=1.124
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTStats.ml?cvsroot=mldonkey&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTTypes.ml?cvsroot=mldonkey&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyClient.ml?cvsroot=mldonkey&r1=1.112&r2=1.113
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyGlobals.ml?cvsroot=mldonkey&r1=1.110&r2=1.111
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyInteractive.ml?cvsroot=mldonkey&r1=1.141&r2=1.142
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyProtoCom.ml?cvsroot=mldonkey&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyStats.ml?cvsroot=mldonkey&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyTypes.ml?cvsroot=mldonkey&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPClients.ml?cvsroot=mldonkey&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPFTP.ml?cvsroot=mldonkey&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPGlobals.ml?cvsroot=mldonkey&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPHTTP.ml?cvsroot=mldonkey&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPInteractive.ml?cvsroot=mldonkey&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPSSH.ml?cvsroot=mldonkey&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/fileTP/fileTPTypes.ml?cvsroot=mldonkey&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/gnutella/gnutellaInteractive.ml?cvsroot=mldonkey&r1=1.67&r2=1.68

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1123
retrieving revision 1.1124
diff -u -b -r1.1123 -r1.1124
--- distrib/ChangeLog   1 Dec 2006 13:52:24 -0000       1.1123
+++ distrib/ChangeLog   2 Dec 2006 12:35:45 -0000       1.1124
@@ -14,6 +14,11 @@
 ChangeLog
 =========
 
+2006/12/02
+5606: Introduce display of session transfer values
+- new columns for session up-/download
+- send session values to GUIs
+
 2006/12/01
 5605: HTML: Fix search list display when html_checkbox_search_file_list = true
 

Index: src/daemon/common/commonClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonClient.ml,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- src/daemon/common/commonClient.ml   5 Nov 2006 14:09:38 -0000       1.33
+++ src/daemon/common/commonClient.ml   2 Dec 2006 12:35:45 -0000       1.34
@@ -467,16 +467,15 @@
     try
       let i = client_info c in
       let ctime = ((BasicSocket.last_time ()) - 
i.GuiTypes.client_connect_time) / 60 in
-      if i.GuiTypes.client_uploaded = Int64.zero && ctime > 1 then
+      if i.GuiTypes.client_session_uploaded = Int64.zero && ctime > 1 then
         begin
          client_disconnect c;
-          if !verbose then lprintf_nl "disconnected client %d: [%s %s] %s 
after %d %s of silence."
+          if !verbose then lprintf_nl "disconnected client %d: [%s %s] %s 
after %d minute%s of silence."
            (client_num c)
            (GuiTypes.client_software i.GuiTypes.client_software 
i.GuiTypes.client_os)
            i.GuiTypes.client_release
            i.GuiTypes.client_name
-           ctime
-           (if ctime = 1 then "minute" else "minutes")
+           ctime (Printf2.print_plural_s ctime)
        end
     with _ -> ()
   ) !uploaders
@@ -500,8 +499,10 @@
      T.client_os = None;
      T.client_release = "";
      T.client_emulemod = "";
-     T.client_downloaded = 0L;
-     T.client_uploaded = 0L;
+     T.client_total_downloaded = 0L;
+     T.client_total_uploaded = 0L;
+     T.client_session_downloaded = 0L;
+     T.client_session_uploaded = 0L;
      T.client_upload = None;
      T.client_sui_verified = None;
   }

Index: src/daemon/common/commonFile.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonFile.ml,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- src/daemon/common/commonFile.ml     15 Nov 2006 12:37:13 -0000      1.70
+++ src/daemon/common/commonFile.ml     2 Dec 2006 12:35:45 -0000       1.71
@@ -399,8 +399,8 @@
           ("", "sr br", addr);
           (GuiTypes.client_software cinfo.GuiTypes.client_software 
cinfo.GuiTypes.client_os,
           "sr br", GuiTypes.client_software_short 
cinfo.GuiTypes.client_software cinfo.GuiTypes.client_os);
-          ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_uploaded));
-          ("", "sr ar br", (size_of_int64 cinfo.GuiTypes.client_downloaded)); 
];
+          ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_total_uploaded));
+          ("", "sr ar br", (size_of_int64 
cinfo.GuiTypes.client_total_downloaded)); ];
 
         Printf.bprintf buf "\\</tr\\>";
 

Index: src/daemon/common/guiDecoding.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiDecoding.ml,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- src/daemon/common/guiDecoding.ml    26 Nov 2006 13:54:09 -0000      1.66
+++ src/daemon/common/guiDecoding.ml    2 Dec 2006 12:35:45 -0000       1.67
@@ -816,8 +816,10 @@
       client_os = None;
       client_release = "";
       client_emulemod = "";
-      client_downloaded = zero;
-      client_uploaded = zero;
+      client_total_downloaded = zero;
+      client_total_uploaded = zero;
+      client_session_downloaded = zero;
+      client_session_uploaded = zero;
       client_upload = None;
       client_sui_verified = None;
 (*      client_sock_addr = ""; *)
@@ -875,8 +877,10 @@
     client_os = None;
     client_release = release;
     client_emulemod = emulemod;
-    client_downloaded = downloaded;
-    client_uploaded = uploaded;
+    client_total_downloaded = downloaded;
+    client_total_uploaded = uploaded;
+    client_session_downloaded = 0L;
+    client_session_uploaded = 0L;
     client_upload = upload;
     client_sui_verified = verified;
 (*    client_sock_addr = sock_addr; *)

Index: src/daemon/common/guiEncoding.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiEncoding.ml,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- src/daemon/common/guiEncoding.ml    26 Nov 2006 16:36:29 -0000      1.61
+++ src/daemon/common/guiEncoding.ml    2 Dec 2006 12:35:45 -0000       1.62
@@ -669,8 +669,8 @@
     end else 
     begin
       buf_string buf (client_software_short c.client_software c.client_os);
-      buf_int64 buf c.client_downloaded;
-      buf_int64 buf c.client_uploaded;
+      buf_int64 buf c.client_session_downloaded;
+      buf_int64 buf c.client_session_uploaded;
       (match c.client_upload with
           Some s -> buf_string buf s
         | None -> buf_string buf "");

Index: src/daemon/common/guiTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiTypes.ml,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- src/daemon/common/guiTypes.ml       14 Nov 2006 18:42:59 -0000      1.34
+++ src/daemon/common/guiTypes.ml       2 Dec 2006 12:35:45 -0000       1.35
@@ -219,8 +219,10 @@
     mutable client_os : string option;
     mutable client_release : string;
     mutable client_emulemod : string;
-    mutable client_downloaded : int64;
-    mutable client_uploaded : int64;
+    mutable client_total_downloaded : int64;
+    mutable client_total_uploaded : int64;
+    mutable client_session_downloaded : int64;
+    mutable client_session_uploaded : int64;
     mutable client_upload : string option;
     mutable client_sui_verified : bool option;
 (*  mutable client_sock_addr : string;  *)

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -b -r1.204 -r1.205
--- src/daemon/driver/driverCommands.ml 28 Nov 2006 23:58:02 -0000      1.204
+++ src/daemon/driver/driverCommands.ml 2 Dec 2006 12:35:45 -0000       1.205
@@ -390,7 +390,12 @@
                 ( "0", "srh", "Client brand", "CB" ) ;
                 ( "0", "srh", "Client release", "CR" ) ;
                 ] @
-                (if !!emule_mods_count then [( "0", "srh", "eMule MOD", "EM" 
)] else []));
+                (if !!emule_mods_count then [( "0", "srh", "eMule MOD", "EM" 
)] else [])
+                @ [
+                ( "1", "srh ar", "Total UL bytes to this client for all 
files", "tUL" ) ;
+                ( "1", "srh ar br", "Total DL bytes from this client for all 
files", "tDL" ) ;
+                ( "1", "srh ar", "Session UL bytes to this client for all 
files", "sUL" ) ;
+                ( "1", "srh ar", "Session DL bytes from this client for all 
files", "sDL" )]);
 
             let counter = ref 0 in
             let all_clients_list = clients_get_all () in
@@ -409,7 +414,12 @@
                      (client_software i.client_software i.client_os, "sr", 
client_software_short i.client_software i.client_os);
                      ("", "sr", i.client_release);
                      ] @
-                     (if !!emule_mods_count then [("", "sr", 
i.client_emulemod)] else []));
+                     (if !!emule_mods_count then [("", "sr", 
i.client_emulemod)] else [])
+                     @ [
+                     ("", "sr ar", (size_of_int64 i.client_total_uploaded));
+                     ("", "sr ar br", (size_of_int64 
i.client_total_downloaded));
+                     ("", "sr ar", (size_of_int64 i.client_session_uploaded));
+                     ("", "sr ar", (size_of_int64 
i.client_session_downloaded))]);
                 if use_html_mods o then Printf.bprintf buf "\\</tr\\>"
                 else Printf.bprintf buf "\n";
                 incr counter;
@@ -2416,8 +2426,10 @@
                   ] @
                   (if !!emule_mods_count then [( "0", "srh", "eMule MOD", "EM" 
)] else [])
                   @ [
-                  ( "0", "srh ar", "Total DL bytes from this client for all 
files", "DL" ) ;
-                  ( "0", "srh ar", "Total UL bytes to this client for all 
files", "UL" ) ;
+                  ( "0", "srh ar", "Total DL bytes from this client for all 
files", "tDL" ) ;
+                  ( "0", "srh ar", "Total UL bytes to this client for all 
files", "tUL" ) ;
+                  ( "0", "srh ar", "Session DL bytes from this client for all 
files", "sDL" ) ;
+                  ( "0", "srh ar", "Session UL bytes to this client for all 
files", "sUL" ) ;
                   ( "0", "srh ar", "Slot kind", "Slot" ) ;
                   ( "0", "srh", "Filename", "Filename" ) ]);
 
@@ -2433,7 +2445,7 @@
                         onMouseOut=\\\"mOut(this);\\\"
                         
onClick=\\\"parent.fstatus.location.href='submit?q=friend_add+%d'\\\"\\>"
                             ( if (!counter mod 2 == 0) then "dl-1" else 
"dl-2";) (client_num c)
-                          ( float_of_int (Int64.to_int i.client_uploaded / 
1024) /.
+                          ( float_of_int (Int64.to_int 
i.client_session_uploaded / 1024) /.
                               float_of_int (max 1 ((last_time ()) - 
i.client_connect_time)) )
                           (client_num c);
 
@@ -2456,8 +2468,10 @@
                             ] @
                             (if !!emule_mods_count then [("", "sr", 
i.client_emulemod)] else [])
                             @ [
-                            ("", "sr ar", size_of_int64 i.client_downloaded);
-                            ("", "sr ar", size_of_int64 i.client_uploaded);
+                            ("", "sr ar", size_of_int64 
i.client_total_downloaded);
+                            ("", "sr ar", size_of_int64 
i.client_total_uploaded);
+                            ("", "sr ar", size_of_int64 
i.client_session_downloaded);
+                            ("", "sr ar", size_of_int64 
i.client_session_uploaded);
                            (let text1, text2 =
                                match client_slot c with
                                | FriendSlot -> "Friend", "F"
@@ -2495,8 +2509,10 @@
                   ] @
                   (if !!emule_mods_count then [( "0", "srh", "eMule MOD", "EM" 
)] else [])
                   @ [
-                  ( "0", "srh ar", "Total DL bytes from this client for all 
files", "DL" ) ;
-                  ( "0", "srh ar", "Total UL bytes to this client for all 
files", "UL" ) ;
+                  ( "0", "srh ar", "Total DL bytes from this client for all 
files", "tDL" ) ;
+                  ( "0", "srh ar", "Total UL bytes to this client for all 
files", "tUL" ) ;
+                  ( "0", "srh ar", "Session DL bytes from this client for all 
files", "sDL" ) ;
+                  ( "0", "srh ar", "Session UL bytes to this client for all 
files", "sUL" ) ;
                   ( "0", "srh", "Filename", "Filename" ) ]);
 
                 Intmap.iter (fun cnum c ->
@@ -2528,8 +2544,10 @@
                         ] @
                         (if !!emule_mods_count then [("", "sr", 
i.client_emulemod )] else [])
                         @ [
-                        ("", "sr ar", size_of_int64 i.client_downloaded);
-                        ("", "sr ar", size_of_int64 i.client_uploaded);
+                        ("", "sr ar", size_of_int64 i.client_total_downloaded);
+                        ("", "sr ar", size_of_int64 i.client_total_uploaded);
+                        ("", "sr ar", size_of_int64 
i.client_session_downloaded);
+                        ("", "sr ar", size_of_int64 i.client_session_uploaded);
                         ("", "sr", (match i.client_upload with
                              Some f -> shorten f !!max_name_len
                            | None -> "") ) ]);
@@ -2548,7 +2566,7 @@
                 try
                   let i = client_info c in
                   client_print c o;
-                  Printf.bprintf buf "client: %s downloaded: %s uploaded: 
%s\n" i.client_software (Int64.to_string i.client_downloaded) (Int64.to_string 
i.client_uploaded);
+                  Printf.bprintf buf "client: %s downloaded: %s uploaded: 
%s\n" i.client_software (Int64.to_string i.client_total_downloaded) 
(Int64.to_string i.client_total_uploaded);
                   match i.client_upload with
                     Some cu ->
                       Printf.bprintf buf "      filename: %s\n" cu
@@ -2680,8 +2698,10 @@
               ( "0", "srh", "Secure User Identification [N]one, [P]assed, 
[F]ailed", "S" ) ;
               ( "0", "srh", "IP address", "IP address" ) ;
               ] @ (if !Geoip.active then [( "0", "srh", "Country Code/Name", 
"CC" )] else []) @ [ 
-              ( "1", "srh ar", "Total UL bytes to this client for all files", 
"UL" ) ;
-              ( "1", "srh ar", "Total DL bytes from this client for all 
files", "DL" ) ;
+              ( "1", "srh ar", "Total UL bytes to this client for all files", 
"tUL");
+              ( "1", "srh ar", "Total DL bytes from this client for all 
files", "tDL");
+              ( "1", "srh ar", "Session UL bytes to this client for all 
files", "sUL");
+              ( "1", "srh ar", "Session DL bytes from this client for all 
files", "sDL");
               ( "0", "srh", "Filename", "Filename" ) ]);
 
         let counter = ref 0 in

Index: src/gtk/newgui/gui_downloads.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/newgui/gui_downloads.ml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/gtk/newgui/gui_downloads.ml     28 Nov 2006 12:58:11 -0000      1.18
+++ src/gtk/newgui/gui_downloads.ml     2 Dec 2006 12:35:46 -0000       1.19
@@ -1389,8 +1389,8 @@
                                                      else (c.client_software ^ 
                                                            " - " ^
                                                            
c.client_emulemod))];
-                        child.data.gfile_size <- c.client_uploaded;
-                        child.data.gfile_downloaded <- c.client_downloaded;
+                        child.data.gfile_size <- c.client_total_uploaded;
+                        child.data.gfile_downloaded <- 
c.client_total_downloaded;
                         child.data.gfile_state  <- client_to_general_state 
c.client_state (List.hd f.data.gfile_num);
                         child.data.gfile_chunks <- f.data.gfile_chunks;
                         child.data.gfile_name <- 
@@ -1412,8 +1412,8 @@
                                          " - " ^
                                          c.client_emulemod];
                   f.data.gfile_state <- client_to_general_state c.client_state 
file_num;
-                  f.data.gfile_size <- c.client_uploaded;
-                  f.data.gfile_downloaded <- c.client_downloaded;
+                  f.data.gfile_size <- c.client_total_uploaded;
+                  f.data.gfile_downloaded <- c.client_total_downloaded;
                   if f.data.gfile_type <> c.client_type then
                     begin
                       f.data.gfile_type <- c.client_type;                 

Index: src/gtk/newgui/gui_friends.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/newgui/gui_friends.ml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- src/gtk/newgui/gui_friends.ml       28 Nov 2006 12:58:11 -0000      1.20
+++ src/gtk/newgui/gui_friends.ml       2 Dec 2006 12:35:46 -0000       1.21
@@ -435,8 +435,10 @@
         client_os = None;
         client_release = c.gclient_release;
         client_emulemod = c.gclient_emulemod;
-        client_downloaded = c.gclient_downloaded;
-        client_uploaded = c.gclient_uploaded;
+        client_total_downloaded = c.gclient_downloaded;
+        client_total_uploaded = c.gclient_uploaded;
+        client_session_downloaded = 0L;
+        client_session_uploaded = 0L;
         client_upload = c.gclient_upload;
        client_sui_verified = None;
 (*        client_sock_addr = c.gclient_sock_addr;*)
@@ -457,8 +459,8 @@
         gclient_software = c.client_software;
         gclient_release = c.client_release;
         gclient_emulemod = c.client_emulemod;
-        gclient_downloaded = c.client_downloaded;
-        gclient_uploaded = c.client_uploaded;
+        gclient_downloaded = c.client_total_downloaded;
+        gclient_uploaded = c.client_total_uploaded;
         gclient_upload = c.client_upload;
         gclient_sock_addr = string_of_kind c.client_kind;
         gclient_net_pixmap =
@@ -494,8 +496,8 @@
           f.gclient_software <- f_new.client_software;
           f.gclient_release <- f_new.client_release;
           f.gclient_emulemod <- f_new.client_emulemod;
-          f.gclient_downloaded <- f_new.client_downloaded;
-          f.gclient_uploaded <- f_new.client_uploaded;
+          f.gclient_downloaded <- f_new.client_total_downloaded;
+          f.gclient_uploaded <- f_new.client_total_uploaded;
           f.gclient_upload <- f_new.client_upload;
           f.gclient_sock_addr <- string_of_kind f_new.client_kind;
           if box_friends_is_visible then self#update_row f row
@@ -643,8 +645,10 @@
         client_os = None;
         client_release = c.gclient_release;
         client_emulemod = c.gclient_emulemod;
-        client_downloaded = c.gclient_downloaded;
-        client_uploaded = c.gclient_uploaded;
+        client_total_downloaded = c.gclient_downloaded;
+        client_total_uploaded = c.gclient_uploaded;
+        client_session_downloaded = 0L;
+        client_session_uploaded = 0L;
         client_upload = c.gclient_upload;
        client_sui_verified = None;
 (*        client_sock_addr = string_of_kind c.gclient_kind; *)
@@ -665,8 +669,8 @@
         gclient_software = c.client_software;
         gclient_release = c.client_release;
         gclient_emulemod = c.client_emulemod;
-        gclient_downloaded = c.client_downloaded;
-        gclient_uploaded = c.client_uploaded;
+        gclient_downloaded = c.client_total_downloaded;
+        gclient_uploaded = c.client_total_uploaded;
         gclient_upload = c.client_upload;
         gclient_sock_addr = string_of_kind c.client_kind;
         gclient_net_pixmap = 
@@ -711,9 +715,9 @@
                     c.gclient_kind <- c_new.client_kind;
                     c.gclient_tags <- c_new.client_tags;
                     c.gclient_software <- c_new.client_software;
-                    c.gclient_downloaded <- c_new.client_downloaded;
+                    c.gclient_downloaded <- c_new.client_total_downloaded;
                     c.gclient_emulemod <- c_new.client_emulemod;
-                    c.gclient_uploaded <- c_new.client_uploaded;
+                    c.gclient_uploaded <- c_new.client_total_uploaded;
                     c.gclient_upload <- c_new.client_upload;
                     c.gclient_sock_addr <- string_of_kind c_new.client_kind;
             (if icons_are_used && (c.gclient_type <> c_new.client_type) 

Index: src/gtk2/gui/guiMisc.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk2/gui/guiMisc.ml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- src/gtk2/gui/guiMisc.ml     28 Nov 2006 12:58:11 -0000      1.20
+++ src/gtk2/gui/guiMisc.ml     2 Dec 2006 12:35:46 -0000       1.21
@@ -1276,8 +1276,8 @@
      source_connect_time    = BasicSocket.last_time () - c.client_connect_time;
      source_last_seen       = BasicSocket.current_time ();
      source_software        = concat_strings c.client_software (concat_strings 
c.client_emulemod c.client_release);
-     source_downloaded      = c.client_downloaded;
-     source_uploaded        = c.client_uploaded;
+     source_downloaded      = c.client_total_downloaded;
+     source_uploaded        = c.client_total_uploaded;
      source_upload_rate     = 0.;
      source_download_rate   = 0.;
      source_upload          = c.client_upload;

Index: src/networks/bittorrent/bTClients.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTClients.ml,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- src/networks/bittorrent/bTClients.ml        5 Nov 2006 14:09:38 -0000       
1.84
+++ src/networks/bittorrent/bTClients.ml        2 Dec 2006 12:35:46 -0000       
1.85
@@ -272,6 +272,8 @@
         try
 (*          List.iter (fun r -> CommonSwarming.free_range r) c.client_ranges; 
*)
           set_client_disconnected c reason;
+          c.client_session_downloaded <- 0L;
+          c.client_session_uploaded <- 0L;
           (try if c.client_good then count_seen c with _ -> ());
           (* this is not useful already done in the match
           (try close sock reason with _ -> ());   *)

Index: src/networks/bittorrent/bTGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTGlobals.ml,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- src/networks/bittorrent/bTGlobals.ml        26 Nov 2006 13:19:31 -0000      
1.72
+++ src/networks/bittorrent/bTGlobals.ml        2 Dec 2006 12:35:46 -0000       
1.73
@@ -786,8 +786,10 @@
           client_release = release;
           client_bitmap = None;
           client_allowed_to_write = zero;
-          client_uploaded = zero;
-          client_downloaded = zero;
+          client_total_uploaded = zero;
+          client_total_downloaded = zero;
+          client_session_uploaded = zero;
+          client_session_downloaded = zero;
           client_upload_rate = Rate.new_rate ();
           client_downloaded_rate = Rate.new_rate ();
           client_connect_time = last_time ();

Index: src/networks/bittorrent/bTInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -b -r1.123 -r1.124
--- src/networks/bittorrent/bTInteractive.ml    12 Nov 2006 14:17:45 -0000      
1.123
+++ src/networks/bittorrent/bTInteractive.ml    2 Dec 2006 12:35:46 -0000       
1.124
@@ -406,8 +406,10 @@
         ( "0", "srh", "IP address", "IP address" ) ;
         ( "0", "srh br ar", "Port", "Port" ) ;
         ] @ (if !Geoip.active then [( "0", "srh br ar", "Country Code/Name", 
"CC" )] else []) @ [
-        ( "1", "srh ar", "Total UL bytes to this client for all files", "UL" ) 
;
-        ( "1", "srh ar br", "Total DL bytes from this client for all files", 
"DL" ) ;
+        ( "1", "srh ar", "Total UL bytes to this client for all files", "tUL" 
) ;
+        ( "1", "srh ar br", "Total DL bytes from this client for all files", 
"tDL" ) ;
+        ( "1", "srh ar", "Session UL bytes to this client for all files", 
"sUL" ) ;
+        ( "1", "srh ar br", "Session DL bytes from this client for all files", 
"sDL" ) ;
         ( "0", "srh ar", "Interested [T]rue, [F]alse", "I" ) ;
         ( "0", "srh ar", "Choked [T]rue, [F]alse", "C" ) ;
         ( "1", "srh br ar", "Allowed to write", "A" ) ;
@@ -458,8 +460,10 @@
             ("", "sr", (Ip.to_string (fst c.client_host)));
             ("", "sr br ar", Printf.sprintf "%d" (snd c.client_host));
             ] @ (if !Geoip.active then [( cn, "sr br", cc)] else []) @ [
-            ("", "sr ar", (size_of_int64 c.client_uploaded));
-            ("", "sr ar br", (size_of_int64 c.client_downloaded));
+            ("", "sr ar", (size_of_int64 c.client_total_uploaded));
+            ("", "sr ar br", (size_of_int64 c.client_total_downloaded));
+            ("", "sr ar", (size_of_int64 c.client_session_uploaded));
+            ("", "sr ar br", (size_of_int64 c.client_session_downloaded));
             ("", "sr", (btos c.client_interested));
             ("", "sr", (btos c.client_choked));
             ("", "sr br ar", (Int64.to_string c.client_allowed_to_write));
@@ -880,8 +884,10 @@
     P.client_name = (Printf.sprintf "%s:%d" (Ip.to_string ip) port);
     P.client_software = (brand_to_string c.client_brand);
     P.client_release = c.client_release;
-    P.client_downloaded = c.client_downloaded;
-    P.client_uploaded = c.client_uploaded;
+    P.client_total_downloaded = c.client_total_downloaded;
+    P.client_total_uploaded = c.client_total_uploaded;
+    P.client_session_downloaded = c.client_session_downloaded;
+    P.client_session_uploaded = c.client_session_uploaded;
     P.client_upload = Some (c.client_file.file_name);
     P.client_connect_time = c.client_connect_time;
 
@@ -906,11 +912,11 @@
   let cc = as_client c in
   client_print cc o;
   Printf.bprintf buf (_b "\n%18sDown  : %-10s                  Uploaded: %-10s 
 Ratio: %s%1.1f (%s)\n") ""
-    (Int64.to_string c.client_downloaded)
-  (Int64.to_string c.client_uploaded)
-  (if c.client_downloaded > c.client_uploaded then "-" else "+")
-  (if c.client_uploaded > Int64.zero then 
-     Int64.to_float (c.client_downloaded // c.client_uploaded) 
+    (Int64.to_string c.client_total_downloaded)
+  (Int64.to_string c.client_total_uploaded)
+  (if c.client_total_downloaded > c.client_total_uploaded then "-" else "+")
+  (if c.client_total_uploaded > Int64.zero then 
+     Int64.to_float (c.client_total_downloaded // c.client_total_uploaded) 
    else 1.)
   ("BT");
   (Printf.bprintf buf (_b "%18sFile  : %s\n") "" info.GuiTypes.file_name)
@@ -948,8 +954,10 @@
         ("", "sr", "N");
         ("", "sr", (Ip.to_string (fst c.client_host)));
         ] @ (if !Geoip.active then [(cn, "sr", cc)] else []) @ [
-        ("", "sr ar", (size_of_int64 c.client_uploaded));
-        ("", "sr ar", (size_of_int64 c.client_downloaded));
+        ("", "sr ar", (size_of_int64 c.client_total_uploaded));
+        ("", "sr ar", (size_of_int64 c.client_total_downloaded));
+        ("", "sr ar", (size_of_int64 c.client_session_uploaded));
+        ("", "sr ar", (size_of_int64 c.client_session_downloaded));
         ("", "sr", info.GuiTypes.file_name); ]);
     true
 

Index: src/networks/bittorrent/bTStats.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTStats.ml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- src/networks/bittorrent/bTStats.ml  23 Sep 2006 20:29:47 -0000      1.8
+++ src/networks/bittorrent/bTStats.ml  2 Dec 2006 12:35:46 -0000       1.9
@@ -57,7 +57,8 @@
   stats_array.(i).brand_download <- stats_array.(i).brand_download ++ v;
   !!gstats_array.(i).brand_download <- !!gstats_array.(i).brand_download ++ v;
 
-  c.client_downloaded <- c.client_downloaded ++ v;
+  c.client_total_downloaded <- c.client_total_downloaded ++ v;
+  c.client_session_downloaded <- c.client_session_downloaded ++ v;
   bt_download_counter := !bt_download_counter ++ v;
   global_count_download network v
 
@@ -66,7 +67,8 @@
   stats_array.(i).brand_upload <- stats_array.(i).brand_upload ++ v;
   !!gstats_array.(i).brand_upload <- !!gstats_array.(i).brand_upload ++ v;
 
-  c.client_uploaded <- c.client_uploaded ++ v;
+  c.client_total_uploaded <- c.client_total_uploaded ++ v;
+  c.client_session_uploaded <- c.client_session_uploaded ++ v;
   bt_upload_counter := !bt_upload_counter ++ v;
   global_count_upload network v
 

Index: src/networks/bittorrent/bTTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTTypes.ml,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- src/networks/bittorrent/bTTypes.ml  26 Nov 2006 13:19:31 -0000      1.40
+++ src/networks/bittorrent/bTTypes.ml  2 Dec 2006 12:35:46 -0000       1.41
@@ -227,8 +227,10 @@
     mutable client_allowed_to_write : int64;
     mutable client_upload_rate : Rate.t;
     mutable client_downloaded_rate :  Rate.t;
-    mutable client_downloaded : int64;
-    mutable client_uploaded : int64;
+    mutable client_total_downloaded : int64;
+    mutable client_total_uploaded : int64;
+    mutable client_session_downloaded : int64;
+    mutable client_session_uploaded : int64;
     mutable client_connect_time : int;
 
     mutable client_blocks_sent : int list;

Index: src/networks/donkey/donkeyClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- src/networks/donkey/donkeyClient.ml 28 Nov 2006 23:50:33 -0000      1.112
+++ src/networks/donkey/donkeyClient.ml 2 Dec 2006 12:35:46 -0000       1.113
@@ -248,18 +248,22 @@
       c.client_source.DonkeySources.source_sock <- NoConnection
   | Connection sock ->
       (try
-    let log_print cc =
-            lprintf_nl "Client[%d] %s disconnected, connected %s%s%s"
-        (client_num cc)
-        (full_client_identifier cc)
-        (Date.time_to_string (last_time () - cc.client_connect_time) "verbose")
-        (if cc.client_uploaded > 0L then
-    Printf.sprintf ", send %s" (size_of_int64 cc.client_uploaded) else "")
-        (if cc.client_downloaded > 0L then
-    Printf.sprintf ", rec %s" (size_of_int64 cc.client_downloaded) else "")
+    let log_print cc = lprintf_nl "Client[%d] %s disconnected, connected 
%s%s%s"
+      (client_num c) (full_client_identifier c)
+      (Date.time_to_string (last_time () - c.client_connect_time) "verbose")
+      (if c.client_total_uploaded > 0L then
+        Printf.sprintf ", send %s (%s)%s"
+          (size_of_int64 c.client_session_uploaded)
+          (size_of_int64 c.client_total_uploaded)
+          (match client_upload (as_client c) with | None -> ""
+           | Some f -> " of " ^ (CommonFile.file_best_name f)) else "")
+      (if c.client_total_downloaded > 0L then
+        Printf.sprintf ", rec %s (%s)"
+          (size_of_int64 c.client_session_downloaded)
+          (size_of_int64 c.client_total_downloaded) else "")
     in
     if c.client_debug ||
-      (!verbose && (c.client_uploaded > 0L || c.client_downloaded > 0L)) then
+      (!verbose && (c.client_session_uploaded > 0L || 
c.client_session_downloaded > 0L)) then
       log_print c;
 
           c.client_comp <- None;
@@ -2035,13 +2039,13 @@
       begin
         
         if !!dynamic_upload_lifetime
-            && c.client_uploaded > c.client_downloaded
-            && c.client_uploaded > Int64.of_int !!dynamic_upload_threshold ** 
zone_size
+            && c.client_session_uploaded > c.client_session_downloaded
+            && c.client_session_uploaded > Int64.of_int 
!!dynamic_upload_threshold ** zone_size
         then
           client_upload_lifetime :=
           Int64.to_int 
             (Int64.of_int !client_upload_lifetime 
-              ** c.client_downloaded // c.client_uploaded);
+              ** c.client_session_downloaded // c.client_session_uploaded);
         if last_time() > c.client_connect_time + 
             !client_upload_lifetime + 5 * prio then
           begin

Index: src/networks/donkey/donkeyGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -b -r1.110 -r1.111
--- src/networks/donkey/donkeyGlobals.ml        26 Nov 2006 16:36:29 -0000      
1.110
+++ src/networks/donkey/donkeyGlobals.ml        2 Dec 2006 12:35:46 -0000       
1.111
@@ -595,8 +595,10 @@
       client_osinfo = None;
       client_checked = false;
       client_connected = false;
-      client_downloaded = Int64.zero;
-      client_uploaded = Int64.zero;
+      client_session_downloaded = Int64.zero;
+      client_session_uploaded = Int64.zero;
+      client_total_downloaded = Int64.zero;
+      client_total_uploaded = Int64.zero;
       client_banned = false;
       client_score = 0;
       client_next_queue = 0;
@@ -650,8 +652,10 @@
       client_osinfo = None;
       client_checked = false;
       client_connected = false;
-      client_downloaded = Int64.zero;
-      client_uploaded = Int64.zero;
+      client_total_downloaded = Int64.zero;
+      client_total_uploaded = Int64.zero;
+      client_session_downloaded = Int64.zero;
+      client_session_uploaded = Int64.zero;
       client_banned = false;
       client_score = 0;
       client_next_queue = 0;

Index: src/networks/donkey/donkeyInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -b -r1.141 -r1.142
--- src/networks/donkey/donkeyInteractive.ml    28 Nov 2006 23:58:02 -0000      
1.141
+++ src/networks/donkey/donkeyInteractive.ml    2 Dec 2006 12:35:46 -0000       
1.142
@@ -1196,9 +1196,10 @@
         P.client_os = c.client_osinfo;
         P.client_release = c.client_emule_proto.emule_release;
         P.client_emulemod = brand_mod_to_string_short c.client_brand_mod;
-        P.client_downloaded = c.client_downloaded;
-        P.client_uploaded = c.client_uploaded;
-(*        P.client_source.source_sock_addr =    (); *)
+        P.client_total_downloaded = c.client_total_downloaded;
+        P.client_total_uploaded = c.client_total_uploaded;
+        P.client_session_downloaded = c.client_session_downloaded;
+        P.client_session_uploaded = c.client_session_uploaded;
         P.client_upload =
         (match client_upload (as_client c) with
             Some f -> Some (CommonFile.file_best_name f)
@@ -1397,8 +1398,10 @@
           ( "0", "srh", "Secure User Identification [N]one, [P]assed, 
[F]ailed", "S" ) ;
           ( "0", "srh br", "IP address", "IP address" ) ;
           ] @ (if !Geoip.active then [( "0", "srh br", "Country Code/Name", 
"CC" )] else []) @ [
-          ( "1", "srh ar", "Total UL bytes to this client for all files", "UL" 
) ;
-          ( "1", "srh ar br", "Total DL bytes from this client for all files", 
"DL" ) ;
+          ( "1", "srh ar", "Total UL bytes to this client for all files", 
"tUL" ) ;
+          ( "1", "srh ar br", "Total DL bytes from this client for all files", 
"tDL" ) ;
+          ( "1", "srh ar", "Session UL bytes to this client for all files", 
"sUL" ) ;
+          ( "1", "srh ar br", "Session DL bytes from this client for all 
files", "sDL" ) ;
           ( "1", "srh ar", "Your queue rank on this client", "Rnk" ) ;
           ( "1", "srh ar br", "Source score", "Scr" ) ;
           ( "1", "srh ar br", "Last ok", "LO" ) ;
@@ -1477,8 +1480,10 @@
                 ));
             ("", "sr br", ip_string);
             ] @ (if !Geoip.active then [(cn, "sr br", cc)] else []) @ [
-            ("", "sr ar", (size_of_int64 c.client_uploaded));
-            ("", "sr ar br", (size_of_int64 c.client_downloaded));
+            ("", "sr ar", (size_of_int64 c.client_total_uploaded));
+            ("", "sr ar br", (size_of_int64 c.client_total_downloaded));
+            ("", "sr ar", (size_of_int64 c.client_session_uploaded));
+            ("", "sr ar br", (size_of_int64 c.client_session_downloaded));
             ("", "sr ar", Printf.sprintf "%d" c.client_rank);
             ("", "sr ar br", Printf.sprintf "%d" 
c.client_source.DonkeySources.source_score);
             ("", "sr ar br", (string_of_date 
(c.client_source.DonkeySources.source_age)));
@@ -1699,10 +1704,10 @@
                   Direct_address (ip,port) -> (Ip.to_string ip)
                   |  _ -> (string_of_client_addr c));
                     Printf.bprintf buf "\n%14sDown  : %-10s                  
Uploaded: %-10s  Ratio: %s%1.1f (%s)\n" ""
-                    (Int64.to_string c.client_downloaded)
-                    (Int64.to_string c.client_uploaded)
-                    (if c.client_downloaded > c.client_uploaded then "-" else 
"+")
-                    (if c.client_uploaded > Int64.zero then (Int64.to_float 
(Int64.div c.client_downloaded c.client_uploaded)) else (1.))
+                    (Int64.to_string c.client_total_downloaded)
+                    (Int64.to_string c.client_total_uploaded)
+                    (if c.client_total_downloaded > c.client_total_uploaded 
then "-" else "+")
+                    (if c.client_total_uploaded > Int64.zero then 
(Int64.to_float (Int64.div c.client_total_downloaded c.client_total_uploaded)) 
else (1.))
                     (brand_to_string c.client_brand);
                     (Printf.bprintf buf "%14sFile  : %s\n" "" 
info.GuiTypes.file_name);
                   end;
@@ -1755,8 +1760,10 @@
                       )); 
                       ("", "sr", ip_string);
                       ] @ (if !Geoip.active then [(cn, "sr", cc)] else []) @ [
-                      ("", "sr ar", (size_of_int64 c.client_uploaded));
-                      ("", "sr ar", (size_of_int64 c.client_downloaded));
+                      ("", "sr ar", (size_of_int64 c.client_total_uploaded));
+                      ("", "sr ar", (size_of_int64 c.client_total_downloaded));
+                      ("", "sr ar", (size_of_int64 c.client_session_uploaded));
+                      ("", "sr ar", (size_of_int64 
c.client_session_downloaded));
                       ("", "sr", info.GuiTypes.file_name) ]);
 
                     Printf.bprintf buf "\\</tr\\>";

Index: src/networks/donkey/donkeyProtoCom.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyProtoCom.ml,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- src/networks/donkey/donkeyProtoCom.ml       8 Oct 2006 14:20:22 -0000       
1.33
+++ src/networks/donkey/donkeyProtoCom.ml       2 Dec 2006 12:35:46 -0000       
1.34
@@ -339,8 +339,8 @@
       str_int s 0 nfiles;
       let s = String.sub s 0 prev_len in
       if !verbose_share || !verbose then
-         lprintf_nl "Sending %d share(s) to server %s:%d%s"
-          nfiles (Ip.to_string (peer_ip sock)) (peer_port sock)
+         lprintf_nl "Sending %d share%s to server %s:%d%s"
+          nfiles (Printf2.print_plural_s nfiles) (Ip.to_string (peer_ip sock)) 
(peer_port sock)
           (if compressed then " (zlib)" else "");
       Buffer.reset buf;
       let s_c =

Index: src/networks/donkey/donkeyStats.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyStats.ml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- src/networks/donkey/donkeyStats.ml  23 Sep 2006 20:29:47 -0000      1.25
+++ src/networks/donkey/donkeyStats.ml  2 Dec 2006 12:35:46 -0000       1.26
@@ -85,7 +85,8 @@
     !!gstats_mod_array.(i).brand_download <- 
!!gstats_mod_array.(i).brand_download ++ v;
   end;
 
-  c.client_downloaded <- c.client_downloaded ++ v;
+  c.client_total_downloaded <- c.client_total_downloaded ++ v;
+  c.client_session_downloaded <- c.client_session_downloaded ++ v;
   donkey_download_counter := !donkey_download_counter ++ v;
   global_count_download network v
 
@@ -100,7 +101,8 @@
     !!gstats_mod_array.(i).brand_upload <- !!gstats_mod_array.(i).brand_upload 
++ v;
   end;
 
-  c.client_uploaded <- c.client_uploaded ++ v;
+  c.client_total_uploaded <- c.client_total_uploaded ++ v;
+  c.client_session_uploaded <- c.client_session_uploaded ++ v;
   donkey_upload_counter := !donkey_upload_counter ++ v;
   global_count_upload network v
 

Index: src/networks/donkey/donkeyTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyTypes.ml,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- src/networks/donkey/donkeyTypes.ml  28 Nov 2006 23:50:33 -0000      1.53
+++ src/networks/donkey/donkeyTypes.ml  2 Dec 2006 12:35:46 -0000       1.54
@@ -569,8 +569,10 @@
     mutable client_checked : bool;
     mutable client_connected : bool;
 (* statistics *)
-    mutable client_downloaded : Int64.t;
-    mutable client_uploaded : Int64.t;
+    mutable client_session_downloaded : Int64.t;
+    mutable client_session_uploaded : Int64.t;
+    mutable client_total_downloaded : Int64.t;
+    mutable client_total_uploaded : Int64.t;
     mutable client_brand : brand;
     mutable client_brand_mod : brand_mod;
     mutable client_osinfo_sent : bool;

Index: src/networks/fileTP/fileTPClients.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPClients.ml,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- src/networks/fileTP/fileTPClients.ml        19 Sep 2006 17:07:43 -0000      
1.23
+++ src/networks/fileTP/fileTPClients.ml        2 Dec 2006 12:35:46 -0000       
1.24
@@ -74,6 +74,7 @@
           if !verbose_msg_clients then
               lprintf_nl "Disconnected from source";
           c.client_requests <- [];
+          c.client_session_downloaded <- 0L;
           connection_failed c.client_connection_control;
           set_client_disconnected c r;
           close sock r;

Index: src/networks/fileTP/fileTPFTP.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPFTP.ml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- src/networks/fileTP/fileTPFTP.ml    19 Sep 2006 17:07:43 -0000      1.14
+++ src/networks/fileTP/fileTPFTP.ml    2 Dec 2006 12:35:46 -0000       1.15
@@ -108,7 +108,8 @@
             CommonSwarming.received up !counter_pos b.buf b.pos to_read_int;
             let new_downloaded = CommonSwarming.downloaded swarmer in
 
-           c.client_downloaded <- c.client_downloaded ++ (new_downloaded -- 
old_downloaded);
+           c.client_total_downloaded <- c.client_total_downloaded ++ 
(new_downloaded -- old_downloaded);
+           c.client_session_downloaded <- c.client_session_downloaded ++ 
(new_downloaded -- old_downloaded);
             client_must_update (as_client c);
 
             if new_downloaded = file_size file then

Index: src/networks/fileTP/fileTPGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPGlobals.ml,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- src/networks/fileTP/fileTPGlobals.ml        9 Nov 2006 21:32:27 -0000       
1.30
+++ src/networks/fileTP/fileTPGlobals.ml        2 Dec 2006 12:35:46 -0000       
1.31
@@ -192,7 +192,8 @@
           client_hostname = hostname;
           client_referer = referer;
           client_port = port;
-         client_downloaded = zero;
+         client_total_downloaded = zero;
+         client_session_downloaded = zero;
           client_reconnect = false;
           client_in_queues = [];
           client_connected_for = None;

Index: src/networks/fileTP/fileTPHTTP.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPHTTP.ml,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- src/networks/fileTP/fileTPHTTP.ml   19 Sep 2006 17:07:43 -0000      1.26
+++ src/networks/fileTP/fileTPHTTP.ml   2 Dec 2006 12:35:46 -0000       1.27
@@ -288,7 +288,8 @@
             CommonSwarming.received up !counter_pos b.buf b.pos to_read_int;
             let new_downloaded = CommonSwarming.downloaded swarmer in
 
-            c.client_downloaded <- c.client_downloaded ++ (new_downloaded -- 
old_downloaded);
+            c.client_total_downloaded <- c.client_total_downloaded ++ 
(new_downloaded -- old_downloaded);
+            c.client_session_downloaded <- c.client_session_downloaded ++ 
(new_downloaded -- old_downloaded);
             client_must_update (as_client c);
 
             if new_downloaded = file_size file then

Index: src/networks/fileTP/fileTPInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPInteractive.ml,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- src/networks/fileTP/fileTPInteractive.ml    12 Nov 2006 12:44:24 -0000      
1.52
+++ src/networks/fileTP/fileTPInteractive.ml    2 Dec 2006 12:35:46 -0000       
1.53
@@ -123,7 +123,8 @@
         P.client_num = (client_num (as_client c));
         P.client_connect_time = BasicSocket.last_time ();
         P.client_software = c.client_software;
-        P.client_downloaded = c.client_downloaded;
+        P.client_total_downloaded = c.client_total_downloaded;
+        P.client_session_downloaded = c.client_session_downloaded;
       }
   );
     client_ops.op_client_bprint <- (fun c buf ->
@@ -141,8 +142,8 @@
         client_print cc o;
         Printf.bprintf buf "client: %s downloaded: %s uploaded: %s"
           cinfo.GuiTypes.client_software
-          (Int64.to_string cinfo.GuiTypes.client_downloaded)
-        (Int64.to_string cinfo.GuiTypes.client_uploaded);
+          (Int64.to_string cinfo.GuiTypes.client_total_downloaded)
+        (Int64.to_string cinfo.GuiTypes.client_total_uploaded);
         Printf.bprintf buf "\nfilename: %s\n\n" info.GuiTypes.file_name;
     );
     client_ops.op_client_dprint_html <- (fun c o file str ->
@@ -183,8 +184,10 @@
           ("", "sr", "N");
           ("", "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 ar", (size_of_int64 cinfo.GuiTypes.client_total_uploaded));
+          ("", "sr ar", (size_of_int64 
cinfo.GuiTypes.client_total_downloaded));
+          ("", "sr ar", (size_of_int64 
cinfo.GuiTypes.client_session_uploaded));
+          ("", "sr ar", (size_of_int64 
cinfo.GuiTypes.client_session_downloaded));
           ("", "sr", info.GuiTypes.file_name); ]);
         true
     )

Index: src/networks/fileTP/fileTPSSH.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPSSH.ml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/networks/fileTP/fileTPSSH.ml    30 May 2006 10:54:14 -0000      1.10
+++ src/networks/fileTP/fileTPSSH.ml    2 Dec 2006 12:35:46 -0000       1.11
@@ -103,7 +103,8 @@
             let new_downloaded =
               CommonSwarming.downloaded swarmer in
 
-           c.client_downloaded <- c.client_downloaded ++ (new_downloaded -- 
old_downloaded);
+           c.client_session_downloaded <- c.client_session_downloaded ++ 
(new_downloaded -- old_downloaded);
+           c.client_total_downloaded <- c.client_total_downloaded ++ 
(new_downloaded -- old_downloaded);
             client_must_update (as_client c);
 
             if new_downloaded = file_size file then

Index: src/networks/fileTP/fileTPTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/fileTP/fileTPTypes.ml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- src/networks/fileTP/fileTPTypes.ml  1 Sep 2006 16:22:15 -0000       1.13
+++ src/networks/fileTP/fileTPTypes.ml  2 Dec 2006 12:35:46 -0000       1.14
@@ -32,7 +32,8 @@
     mutable client_referer : string;
     mutable client_downloads : download list;
     mutable client_in_queues : file list;
-    mutable client_downloaded : int64;
+    mutable client_total_downloaded : int64;
+    mutable client_session_downloaded : int64;
     mutable client_connection_control : connection_control;
     mutable client_sock : tcp_connection;
     mutable client_requests : download list;

Index: src/networks/gnutella/gnutellaInteractive.ml
===================================================================
RCS file: 
/sources/mldonkey/mldonkey/src/networks/gnutella/gnutellaInteractive.ml,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- src/networks/gnutella/gnutellaInteractive.ml        12 Nov 2006 12:44:24 
-0000      1.67
+++ src/networks/gnutella/gnutellaInteractive.ml        2 Dec 2006 12:35:46 
-0000       1.68
@@ -442,8 +442,8 @@
         client_print cc o; 
         Printf.bprintf buf "client: %s downloaded: %s uploaded: %s"
           "gN" (* cinfo.GuiTypes.client_software *)
-          (Int64.to_string cinfo.GuiTypes.client_downloaded)
-        (Int64.to_string cinfo.GuiTypes.client_uploaded);
+          (Int64.to_string cinfo.GuiTypes.client_total_downloaded)
+        (Int64.to_string cinfo.GuiTypes.client_total_uploaded);
         Printf.bprintf buf "\nfilename: %s\n\n" info.GuiTypes.file_name;
     );    
     client_ops.op_client_dprint_html <- (fun c o file str ->
@@ -477,8 +477,10 @@
           ("", "sr", "N");
           ("", "sr", (string_of_kind cinfo.GuiTypes.client_kind));
           ] @ (if !Geoip.active then [("?", "sr", "?")] else []) @ [
-          ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_uploaded));
-          ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_downloaded));
+          ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_total_uploaded));
+          ("", "sr ar", (size_of_int64 
cinfo.GuiTypes.client_total_downloaded));
+          ("", "sr ar", (size_of_int64 
cinfo.GuiTypes.client_session_uploaded));
+          ("", "sr ar", (size_of_int64 
cinfo.GuiTypes.client_session_downloaded));
           ("", "sr", info.GuiTypes.file_name); ]);
         true
     )     




reply via email to

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