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: Mon, 04 Sep 2006 21:30:27 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/09/04 21:30:27

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonOptions.ml 
        src/networks/donkey: donkeyGlobals.ml donkeyOptions.ml 
                             donkeyTypes.ml 

Log message:
        patch #5370

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.991&r2=1.992
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.173&r2=1.174
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyGlobals.ml?cvsroot=mldonkey&r1=1.90&r2=1.91
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyOptions.ml?cvsroot=mldonkey&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyTypes.ml?cvsroot=mldonkey&r1=1.45&r2=1.46

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.991
retrieving revision 1.992
diff -u -b -r1.991 -r1.992
--- distrib/ChangeLog   3 Sep 2006 12:04:21 -0000       1.991
+++ distrib/ChangeLog   4 Sep 2006 21:30:26 -0000       1.992
@@ -14,6 +14,9 @@
 ChangeLog
 =========
 
+2006/09/04
+5370: Correct option_versions defaults, remove commented EDK code
+
 2006/09/03
 5367: EDK: Use random default for ED2K_port instead of fixed 4662
 - existing ini files are never changed

Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -b -r1.173 -r1.174
--- src/daemon/common/commonOptions.ml  3 Sep 2006 11:47:33 -0000       1.173
+++ src/daemon/common/commonOptions.ml  4 Sep 2006 21:30:26 -0000       1.174
@@ -1526,7 +1526,7 @@
 
 let options_version = define_expert_option current_section ["options_version"]
   "(internal option)"
-    int_option 13
+    int_option 14
 
 
 

Index: src/networks/donkey/donkeyGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -b -r1.90 -r1.91
--- src/networks/donkey/donkeyGlobals.ml        1 Sep 2006 16:25:15 -0000       
1.90
+++ src/networks/donkey/donkeyGlobals.ml        4 Sep 2006 21:30:27 -0000       
1.91
@@ -557,20 +557,13 @@
       client_upload = None;
       client_kind = Direct_address (Ip.null, 0);
       client_source = DonkeySources.dummy_source;
-(*      client_sock = NoConnection; *)
       client_ip = Ip.null;
       client_md4 = Md4.null;
-(*      client_last_filereqs = 0; *)
-(*      client_chunks = [||]; *)
       client_download = None;
-(*      client_block = None; *)
-(*      client_zones = []; *)
-(*      client_connection_control =  new_connection_control_recent_ok ( ()); *)
       client_file_queue = [];
       client_tags = [];
       client_name = "";
       client_all_files = None;
-(*      client_all_chunks = ""; *)
       client_rating = 0;
       client_brand = Brand_unknown;
       client_brand_mod = Brand_mod_unknown;
@@ -609,52 +602,10 @@
 let create_client key =
   let module D = DonkeyProtoClient in
   let s = DonkeySources.find_source_by_uid key in
-  let rec c = {
-(*      dummy_client with *)
-
-      client_client = client_impl;
-(*      client_connection_control =  new_connection_control_recent_ok ( ()); *)
+  let rec c = { dummy_client with
       client_kind = key;
-      client_upload = None;
       client_source = s;
-(*      client_sock = NoConnection; *)
-      client_ip = Ip.null;
-      client_md4 = Md4.null;
-(*      client_last_filereqs = 0; *)
-(*      client_chunks = [||]; *)
-      client_download = None;
-(*      client_block = None; *)
-(*      client_zones = []; *)
-      client_file_queue = [];
-      client_tags = [];
-      client_name = "";
-      client_all_files = None;
-(*      client_all_chunks = ""; *)
-      client_rating = 0;
-      client_brand = Brand_unknown;
-      client_brand_mod = Brand_mod_unknown;
-      client_checked = false;
-      client_connected = false;
-      client_downloaded = Int64.zero;
-      client_uploaded = Int64.zero;
-      client_banned = false;
-      client_score = 0;
-      client_next_queue = 0;
-      client_rank = 0;
-      client_connect_time = 0;
-      client_requests_received = 0;
-      client_requests_sent = 0;
-      client_indirect_address = None;
-      client_slot = SlotNotAsked;
       client_debug = Intset.mem s.DonkeySources.source_num !debug_clients;
-      client_pending_messages = [];
-      client_emule_proto = emule_proto ();
-      client_comp = None;
-      client_connection_time = 0;
-      client_req_challenge = Int64.zero;
-      client_sent_challenge = Int64.zero;
-      client_public_key = None;
-      client_sui_verified = None;
       } and
     client_impl = {
       dummy_client_impl with

Index: src/networks/donkey/donkeyOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyOptions.ml,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- src/networks/donkey/donkeyOptions.ml        3 Sep 2006 12:04:21 -0000       
1.51
+++ src/networks/donkey/donkeyOptions.ml        4 Sep 2006 21:30:27 -0000       
1.52
@@ -266,7 +266,7 @@
 
 let options_version = define_expert_option donkey_section ["options_version"]
   "(internal option)"
-    int_option 0
+    int_option 3
 
 let gui_donkey_options_panel =
   [

Index: src/networks/donkey/donkeyTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyTypes.ml,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- src/networks/donkey/donkeyTypes.ml  1 Sep 2006 16:25:15 -0000       1.45
+++ src/networks/donkey/donkeyTypes.ml  4 Sep 2006 21:30:27 -0000       1.46
@@ -32,112 +32,6 @@
 let lprintf_n fmt =
   lprintf2 log_prefix fmt
 
-  (*
-
-module MyList = struct
-    type 'a mylist =
-      Nil
-    | Cons of int * 'a * 'a mylist
-
-    type ('a,'b) assoc =
-      {
-        v1 : 'a;
-        mutable v2 : 'b;
-      }
-
-    let nil = Nil
-    let length list =
-      match list with Nil -> 0 | Cons (len,_,_) -> len
-
-    let add v list = Cons (1+ length list, v, list)
-    let head list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,v,_) -> v
-
-    let tail list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,_,tail) -> tail
-
-    let rec mem v list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,vv,tail) ->
-          vv = v || mem v tail
-
-    let rec memq v list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,vv,tail) ->
-          vv == v || memq v tail
-
-    let assoc x y = { v1 = x; v2 = y; }
-    let assoc_get x = x.v2
-    let assoc_set x y = x.v2 <- y
-
-    let rec find_assoc v list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,vv,tail) ->
-          if vv.v1 = v then vv else find_assoc v tail
-
-    let rec find_assq v list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,vv,tail) ->
-          if vv.v1 == v then vv else find_assq v tail
-
-    let rec mem_assoc v list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,vv,tail) ->
-          vv.v1 = v || mem_assoc v tail
-
-    let rec mem_assq v list =
-      match list with
-        Nil -> raise Not_found
-      | Cons (_,vv,tail) ->
-          vv.v1 == v || mem_assq v tail
-
-  end
-
-open MyList
-    *)
-
-  (*
-type client_tag_name =
-  CT_CLIENT_NAME
-| CT_CLIENT_PORT
-| CT_CLIENT_VERSION
-| CT_CLIENT_EXTENDED
-| CT_CLIENT_UDPPORT
-
-type server_tag_name =
-| ST_SERVER_NAME
-| ST_SERVER_DESCRIPTION
-| ST_SERVER_PORT
-| ST_SERVER_IP
-| ST_SERVER_PING
-| ST_SERVER_PROF
-| ST_SERVER_HISTORY
-
-type file_tag_name =
-| FT_FILE_FILENAME
-| FT_FILE_SIZE
-| FT_FILE_TYPE
-| FT_FILE_FORMAT
-| FT_FILE_AVAILABILITY
-| FT_FILE_TITLE
-| FT_FILE_ARTIST
-| FT_FILE_ALBUM
-| FT_FILE_LOC
-| FT_FILE_DOWNLOADED
-| FT_FILE_DISKNAME
-| FT_FILE_PRIORITY
-| FT_FILE_STATUS
-    *)
-
 type emule_proto = {
     mutable emule_comments : int;
     mutable emule_version : int;
@@ -168,13 +62,7 @@
 | ET_MOD_TAROD
 | ET_TAROD_VERSION
 | ET_MOD_PLUS
-(*
-type pref_tag_name =
-| PT_PREF_NAME
-| PT_PREF_PORT
-| PT_PREF_VERSION
-| PT_PREF_TEMP
-    *)
+
 type request_record = {
   mutable last_request : int;
   mutable nwarnings : int;
@@ -595,29 +483,6 @@
     user_server : server;
   }
 
-(*
-and server_search = {
-    search_search : CommonTypes.search;
-    mutable nhits : int;
-  }
-*)
-
-(*
-and local_search = {
-    search_search : CommonTypes.search;
-    mutable search_handler : (search_event -> unit);
-    mutable search_xs_servers : server list;
-    mutable search_overnet : bool;
-  }
-*)
-
-  (*
-and result = {
-    result_result : result CommonResult.result_impl;
-    mutable result_index : Store.index;
-  }
-*)
-
 and search_event =
 (*  Result of result *)
 | Waiting of int
@@ -641,37 +506,13 @@
 | ServerInfoChange
 | ServerBusyChange
 
-  (*
-and source = {
-(*    source_num : int; *)
-    source_addr : Ip.t * int;
-(*    mutable source_client: client_kind;      *)
-(* This field is not kept up-to-date when source_client = SourceClient c,
-  change c.client_source_for *)
-    mutable source_files : file_request list;
-    mutable source_overnet : bool;
-    mutable source_score : int;
-    mutable source_last_score : int;
-    mutable source_last_age : int;
-    mutable source_client_num : int;
-    mutable source_age : int;
-    mutable source_in_queues : file list;
-    mutable source_sock : tcp_connection;
-  }
-*)
-
 and client = {
     client_client : client CommonClient.client_impl;
     mutable client_kind : source_uid;
     client_source : DonkeySources.source;
     mutable client_md4 : Md4.t;
-(*    mutable client_chunks : availability; *)
-(*     mutable client_sock : tcp_connection; *)
     mutable client_ip : Ip.t;
     mutable client_download : (file * CommonSwarming.uploader) option;
-(*    mutable client_block : CommonSwarming.block option; *)
-(*    mutable client_zones : (int64 * int64 * CommonSwarming.range) list; *)
-(*    mutable client_connection_control : connection_control; *)
     mutable client_file_queue : (
       file * (* has displayed when connected *)
       Bitv.t *
@@ -680,13 +521,11 @@
     mutable client_all_files : result list option;
     mutable client_tags: CommonTypes.tag list;
     mutable client_name : string;
-(*    mutable client_all_chunks : string; *)
     mutable client_rating : int ;
     mutable client_upload : upload_info option;
     mutable client_checked : bool;
     mutable client_connected : bool;
 (* statistics *)
-(*    mutable client_last_filereqs : int;     *)
     mutable client_downloaded : Int64.t;
     mutable client_uploaded : Int64.t;
     mutable client_brand : brand;
@@ -732,53 +571,6 @@
     mutable up_waiting : bool;
   }
 
-(*
-
-and chunk =
-  PresentTemp
-| AbsentTemp
-| PartialTemp of block
-| PresentVerified
-| AbsentVerified
-| PartialVerified of block
-
-and block = {
-    mutable block_present: bool;
-    block_begin : int64;
-    block_end : int64;
-    mutable block_zones : zone list;
-    mutable block_nclients : int;
-    mutable block_contributors : Ip.t list;
-    mutable block_legacy : bool;
-    mutable block_pos : int;
-    block_file : file;
-  }
-
-and zone = {
-    mutable zone_begin : int64;
-    mutable zone_end : int64;
-    mutable zone_nclients : int;
-  }
-*)
-
-
-  (*
-and file_request = {
-    request_file : file;
-    mutable request_time : int;
-    mutable  request_result : request_result;
-  }
-
-and request_result =
-| File_possible   (* we asked, but didn't know *)
-| File_not_found  (* we asked, the file is not there *)
-| File_expected   (* we asked, because it was announced *)
-| File_new_source (* we never asked *)
-| File_found      (* the file was found *)
-| File_chunk      (* the file has chunks we want *)
-| File_upload     (* we uploaded from this client *)
-*)
-
 and client_kind =
   SourceClient of client
 | SourceLastConnection of
@@ -789,29 +581,13 @@
 and file = {
     file_file : file CommonFile.file_impl;
     file_md4 : Md4.t;
-(*    file_exists : bool; *)
-
     mutable file_swarmer : CommonSwarming.t option;
-
     mutable file_nchunks : int;
     mutable file_nchunk_hashes : int;
     mutable file_diskname : string;
-(*    mutable file_chunks : chunk array; *)
-(*    mutable file_chunks_order : int array; *)
-(*    mutable file_chunks_age : int array; *)
-(*    mutable file_all_chunks : string; *)
-(*    mutable file_absent_chunks : (int64 * int64) list; *)
-(*    mutable file_nsources : int; *)
     mutable file_computed_md4s : Md4.t array;
     mutable file_format : format;
-(*    mutable file_available_chunks : int array; *)
     mutable file_shared : file CommonShared.shared_impl option;
-(*    mutable file_locations : client Intmap.t;  *)
-(*    mutable file_mtime : float; *)
-(*    mutable file_initialized : bool; *)
-(* Source management number 3 !! *)
-(*    mutable file_clients : (client * int) Fifo.t;  *)
-(*    mutable file_sources : source Queue.t array; *)
     mutable file_sources : DonkeySources.file_sources_manager;
   }
 
@@ -890,183 +666,6 @@
 let server_state server =
   CommonServer.server_state (as_server server.server_server)
 
-(*
-module SourcesQueueCreate = Queues.Make (struct
-
-      type t = source
-      let compare s1 s2 = compare s1.source_addr s2.source_addr
-    end)
-
-  (*
-    let lifo = lifo
-    let fifo = fifo
-
-    module SourcesSet = Set.Make (
-        struct
-          type t = int * source
-          let compare (t1,s1) (t2,s2) =
-            if s1.source_addr = s2.source_addr then begin
-                0 end else
-            let x = compare t1 t2 in
-            if x = 0 then compare s1.source_addr s2.source_addr else x
-        end
-      )
-
-    let oldest_first () =
-      let t = ref SourcesSet.empty in
-      of_impl {
-        head = (fun _ -> try SourcesSet.min_elt !t with _ -> raise Fifo.Empty);
-        put = (fun x ->  t := SourcesSet.add x !t);
-        length = (fun _ -> SourcesSet.cardinal !t);
-        take = (fun _ ->
-            try
-              let x = SourcesSet.min_elt !t in
-              t := SourcesSet.remove x !t;
-              x
-            with _ -> raise Fifo.Empty);
-        iter = (fun f ->
-            SourcesSet.iter (fun (_,x) -> f x) !t);
-        put_back = (fun e -> t := SourcesSet.add e !t);
-      }
-
-    let oldest_last () =
-      let t = ref SourcesSet.empty in
-      of_impl {
-        head = (fun _ ->
-            try SourcesSet.max_elt !t with _ -> raise Fifo.Empty);
-        put = (fun x ->  t := SourcesSet.add x !t);
-        length = (fun _ -> SourcesSet.cardinal !t);
-        take = (fun _ ->
-            try
-              let x = SourcesSet.max_elt !t in
-              t := SourcesSet.remove x !t;
-              x
-            with _ -> raise Fifo.Empty);
-        iter = (fun f ->
-            SourcesSet.iter (fun (_,x) -> f x) !t);
-        put_back = (fun e -> t := SourcesSet.add e !t);
-      }
-
-      (*
-    let max_first compare =
-      let module SourceSet = Set.Make(struct
-            type t = source
-            let compare = compare
-          end) in
-      let t = ref SourcesSet.empty in
-      {
-        head = (fun _ -> SourcesSet.max_elt !t);
-        put = (fun x ->  t := SourcesSet.add x !t);
-        length = (fun _ -> SourcesSet.cardinal !t);
-        take = (fun _ ->
-            let x = SourcesSet.max_elt !t in
-            t := SourcesSet.remove x !t;
-            x);
-        iter = (fun f ->
-            SourcesSet.iter f !t);
-        put_back = (fun e -> t := SourcesSet.add e !t);
-        }
-
-    let min_first compare =
-      let module SourceSet = Set.Make(struct
-            type t = source
-            let compare = compare
-          end) in
-      let t = ref SourcesSet.empty in
-      of_impl {
-        head = (fun _ -> SourcesSet.min_elt !t);
-        put = (fun x ->  t := SourcesSet.add x !t);
-        length = (fun _ -> SourcesSet.cardinal !t);
-        take = (fun _ ->
-            let x = SourcesSet.min_elt !t in
-            t := SourcesSet.remove x !t;
-            x);
-        iter = (fun f ->
-            SourcesSet.iter f !t);
-        put_back = (fun e -> t := SourcesSet.add e !t);
-        }
-*)
-  end
-*)
-  *)
-
-  (*
-let string_of_file_tag_name name =
-  match name with
-  | FT_FILE_SIZE -> "size"
-  | FT_FILE_FILENAME -> "filename"
-  | FT_FILE_TYPE -> "type"
-  | FT_FILE_FORMAT -> "format"
-  | FT_FILE_AVAILABILITY -> "availability"
-  | FT_FILE_DOWNLOADED -> "downloaded"
-  | FT_FILE_DISKNAME -> "diskname"
-  | FT_FILE_PRIORITY -> "priority"
-  | FT_FILE_STATUS -> "status"
-  | FT_FILE_ARTIST -> "Artist"
-  | FT_FILE_TITLE -> "Title"
-  | FT_FILE_ALBUM -> "Album"
-  | FT_FILE_LOC -> "loc"
-
-let string_of_server_tag_name name =
-  match name with
-  | ST_SERVER_NAME -> "name"
-  | ST_SERVER_DESCRIPTION -> "description"
-  | ST_SERVER_PORT -> "port"
-  | ST_SERVER_IP -> "ip"
-  | ST_SERVER_PING -> "ping"
-  | ST_SERVER_PROF -> "prof"
-  | ST_SERVER_HISTORY -> "history"
-
-let string_of_client_tag_name name =
-  match name with
-  | CT_CLIENT_NAME -> "name"
-  | CT_CLIENT_PORT -> "port"
-  | CT_CLIENT_VERSION -> "version"
-  | CT_CLIENT_EXTENDED -> "extended"
-  | CT_CLIENT_UDPPORT -> "udpport"
-
-let string_of_emule_tag_name name =
-  match name with
-  | ET_COMPRESSION -> "compression"
-  | ET_UDPPORT -> "udpport"
-  | ET_UDPVER -> "udpver"
-  | ET_SOURCEEXCHANGE -> "sourceexchange"
-  | ET_COMMENTS -> "comments"
-  | ET_EXTENDEDREQUEST -> "extendedrequest"
-  | ET_COMPATIBLECLIENT -> "compatibleclient"
-  | ET_MOD_FEATURESET -> "mod_featureset"
-  | ET_MOD_PROTOCOL -> "mod_protocol"
-  | ET_MOD_VERSION -> "mod_version"
-  | ET_MOD_TAROD -> "mod_tarod"
-  | ET_TAROD_VERSION -> "tarod_version"
-  | ET_MOD_PLUS -> "mod_plus"
-
-let string_of_pref_tag_name name =
-  match name with
-  | PT_PREF_NAME -> ""
-  | PT_PREF_PORT -> ""
-  | PT_PREF_VERSION -> ""
-  | PT_PREF_TEMP -> ""
- *)
-  (*
-let dummy_source = {
-(*    source_num = 0; *)
-    source_addr = (Ip.null, 0);
-    source_files = [];
-
-    source_last_score = 0;
-    source_last_age = 0;
-    source_client_num = 0;
-
-    source_overnet = false;
-    source_score = 0;
-    source_age = 0;
-    source_in_queues = [];
-    source_sock = NoConnection;
-  }
-    *)
-
-
 let dummy_emule_proto = {
     emule_comments = 0;
     emule_version = 0;




reply via email to

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