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: Wed, 16 Aug 2006 19:12:17 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/08/16 19:12:15

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonClient.ml commonClient.mli 
                           commonTypes.ml 
        src/gtk2/gui   : guiFriends.ml guiGlobal.ml 
        src/networks/donkey: donkeyClient.ml donkeyGlobals.ml 
                             donkeyInteractive.ml donkeyTypes.ml 

Log message:
        patch #5310

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.963&r2=1.964
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonClient.ml?cvsroot=mldonkey&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonClient.mli?cvsroot=mldonkey&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonTypes.ml?cvsroot=mldonkey&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk2/gui/guiFriends.ml?cvsroot=mldonkey&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk2/gui/guiGlobal.ml?cvsroot=mldonkey&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyClient.ml?cvsroot=mldonkey&r1=1.96&r2=1.97
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyGlobals.ml?cvsroot=mldonkey&r1=1.85&r2=1.86
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyInteractive.ml?cvsroot=mldonkey&r1=1.116&r2=1.117
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyTypes.ml?cvsroot=mldonkey&r1=1.42&r2=1.43

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.963
retrieving revision 1.964
diff -u -b -r1.963 -r1.964
--- distrib/ChangeLog   16 Aug 2006 19:10:34 -0000      1.963
+++ distrib/ChangeLog   16 Aug 2006 19:12:08 -0000      1.964
@@ -15,6 +15,8 @@
 =========
 
 2006/08/16
+5310: EDK: Request filelist from friends only when requested,
+      disable automatic download (pango)
 5312: GTK2 GUI: Fix histograms (su_blanc)
 5313: CryptoPP: Check for g++ capabilities
 

Index: src/daemon/common/commonClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonClient.ml,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- src/daemon/common/commonClient.ml   6 Aug 2006 13:59:05 -0000       1.28
+++ src/daemon/common/commonClient.ml   16 Aug 2006 19:12:08 -0000      1.29
@@ -284,18 +284,27 @@
 let is_contact c =
   (client_type c) land client_contact_tag <> 0
 
+let is_must_browse c =
+  (client_type c) land client_must_browse_tag <> 0
+
 let set_friend c =
   set_client_type c (client_type c lor client_friend_tag)
 
 let set_contact c =
   set_client_type c (client_type c lor client_contact_tag)
 
+let set_must_browse c =
+  set_client_type c (client_type c lor client_must_browse_tag)
+
 let set_not_friend c =
   set_client_type c (client_type c land (lnot client_friend_tag))
 
 let set_not_contact c =
   set_client_type c (client_type c land (lnot client_contact_tag))
 
+let set_not_must_browse c =
+  set_client_type c (client_type c land (lnot client_must_browse_tag))
+
 let is_nolimit c =
   (client_type c) land client_nolimit_tag <> 0
 

Index: src/daemon/common/commonClient.mli
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonClient.mli,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- src/daemon/common/commonClient.mli  6 Aug 2006 13:59:05 -0000       1.11
+++ src/daemon/common/commonClient.mli  16 Aug 2006 19:12:08 -0000      1.12
@@ -80,16 +80,19 @@
   
 val is_friend : CommonTypes.client -> bool
 val is_contact : CommonTypes.client -> bool
+val is_must_browse : CommonTypes.client -> bool
 val is_nolimit : CommonTypes.client -> bool
 val is_initialized : CommonTypes.client -> bool
   
 val set_friend : CommonTypes.client -> unit
 val set_contact : CommonTypes.client -> unit
+val set_must_browse : CommonTypes.client -> unit
 val set_nolimit : CommonTypes.client -> unit
 val set_initialized : CommonTypes.client -> unit
   
 val set_not_friend : CommonTypes.client -> unit
 val set_not_contact : CommonTypes.client -> unit
+val set_not_must_browse : CommonTypes.client -> unit
 
 val client_has_bitmap : CommonTypes.client -> CommonTypes.file -> string -> 
unit
 

Index: src/daemon/common/commonTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonTypes.ml,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- src/daemon/common/commonTypes.ml    6 Aug 2006 13:59:05 -0000       1.52
+++ src/daemon/common/commonTypes.ml    16 Aug 2006 19:12:08 -0000      1.53
@@ -287,7 +287,7 @@
 let client_contact_tag = 2
 let client_nolimit_tag = 4
 let client_initialized_tag = 8
-let client_browsed_tag = client_contact_tag lor client_friend_tag
+let client_must_browse_tag = 16
 
 type query_entry = 
   Q_AND of query_entry list

Index: src/gtk2/gui/guiFriends.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk2/gui/guiFriends.ml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- src/gtk2/gui/guiFriends.ml  12 Nov 2005 11:16:36 -0000      1.3
+++ src/gtk2/gui/guiFriends.ml  16 Aug 2006 19:12:08 -0000      1.4
@@ -813,11 +813,11 @@
 let h_update_friend s s_new =
   try
     let row = friendstore#find_row (friend_key s_new.source_num) in
-    if client_browsed_tag land s_new.source_type = 0
+    if (client_friend_tag lor client_contact_tag) land s_new.source_type = 0
       then remove_friend s
       else Gaux.may ~f:(fun r -> friendstore#update_item r s s_new) row
  with _ ->
-    if client_browsed_tag land s_new.source_type <> 0
+   if (client_friend_tag lor client_contact_tag) land s_new.source_type <> 0
       then begin
         friendstore#add_item s_new ~f:update_friends_label ()
       end

Index: src/gtk2/gui/guiGlobal.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk2/gui/guiGlobal.ml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/gtk2/gui/guiGlobal.ml   10 Aug 2006 17:41:19 -0000      1.5
+++ src/gtk2/gui/guiGlobal.ml   16 Aug 2006 19:12:08 -0000      1.6
@@ -169,7 +169,7 @@
 
 let check_usefull_source s =
   let is_not_source = s.source_files_requested = [] in
-  let is_not_friend = not (client_browsed_tag land s.source_type = 0) in
+  let is_not_friend = (client_friend_tag lor client_contact_tag) land 
s.source_type = 0 in
   let is_not_uploader = source_only land s.source_has_upload = 1 in
   if is_not_source && is_not_friend && is_not_uploader
     then (Hashtbl.remove sources s.source_num; false)

Index: src/networks/donkey/donkeyClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -b -r1.96 -r1.97
--- src/networks/donkey/donkeyClient.ml 8 Aug 2006 23:45:53 -0000       1.96
+++ src/networks/donkey/donkeyClient.ml 16 Aug 2006 19:12:09 -0000      1.97
@@ -791,15 +791,13 @@
     | Some sh -> Some (as_shared sh)
 
 let query_view_files c =
-  if client_browsed_tag land client_type c <> 0 then begin
-      if last_time () > c.client_next_view_files then begin
-          c.client_next_view_files <- last_time () + 3600 * 6;
+  if CommonClient.is_must_browse (as_client c) then begin
+    CommonClient.set_not_must_browse (as_client c);
           client_send c (
             let module M = DonkeyProtoClient in
             let module C = M.ViewFiles in
             M.ViewFilesReq C.t);
         end
-    end
 
 (* client is valid if it's not us or if it's not yet connected *)
 let is_valid_client md4 =

Index: src/networks/donkey/donkeyGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- src/networks/donkey/donkeyGlobals.ml        15 Aug 2006 12:37:55 -0000      
1.85
+++ src/networks/donkey/donkeyGlobals.ml        16 Aug 2006 19:12:10 -0000      
1.86
@@ -582,7 +582,6 @@
       client_tags = [];
       client_name = "";
       client_all_files = None;
-      client_next_view_files = last_time () - 1;
 (*      client_all_chunks = ""; *)
       client_rating = 0;
       client_brand = Brand_unknown;
@@ -627,7 +626,6 @@
 
       client_client = client_impl;
 (*      client_connection_control =  new_connection_control_recent_ok ( ()); *)
-      client_next_view_files = last_time () - 1;
       client_kind = key;
       client_upload = None;
       client_source = s;

Index: src/networks/donkey/donkeyInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -b -r1.116 -r1.117
--- src/networks/donkey/donkeyInteractive.ml    8 Aug 2006 23:45:53 -0000       
1.116
+++ src/networks/donkey/donkeyInteractive.ml    16 Aug 2006 19:12:10 -0000      
1.117
@@ -1563,7 +1563,9 @@
             let module C = M.ViewFiles in
             M.ViewFilesReq C.t);
       | NoConnection ->
-         if !verbose then lprintf_nl "re-connecting friend %s" 
(full_client_identifier c);
+         if !verbose then lprintf_nl "re-connecting friend %s"
+           (full_client_identifier c);
+         set_must_browse (as_client c);
           reconnect_client c
       | _ -> ()
   );

Index: src/networks/donkey/donkeyTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyTypes.ml,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- src/networks/donkey/donkeyTypes.ml  20 Jul 2006 15:28:12 -0000      1.42
+++ src/networks/donkey/donkeyTypes.ml  16 Aug 2006 19:12:10 -0000      1.43
@@ -677,7 +677,6 @@
       Bitv.t *
       CommonSwarming.uploader
       ) list;
-    mutable client_next_view_files :  int;
     mutable client_all_files : result list option;
     mutable client_tags: CommonTypes.tag list;
     mutable client_name : string;




reply via email to

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