[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey config/Makefile.in distrib/ChangeLog s...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey config/Makefile.in distrib/ChangeLog s... |
Date: |
Thu, 26 Oct 2006 13:18:43 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 06/10/26 13:18:43
Modified files:
config : Makefile.in
distrib : ChangeLog
src/networks/bittorrent: bTGlobals.ml bTInteractive.ml
Removed files:
src/networks/bittorrent: bTShare.ml
Log message:
patch #5477
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/config/Makefile.in?cvsroot=mldonkey&r1=1.171&r2=1.172
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1068&r2=1.1069
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTGlobals.ml?cvsroot=mldonkey&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTInteractive.ml?cvsroot=mldonkey&r1=1.119&r2=1.120
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTShare.ml?cvsroot=mldonkey&r1=1.4&r2=0
Patches:
Index: config/Makefile.in
===================================================================
RCS file: /sources/mldonkey/mldonkey/config/Makefile.in,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -b -r1.171 -r1.172
--- config/Makefile.in 23 Oct 2006 12:18:27 -0000 1.171
+++ config/Makefile.in 26 Oct 2006 13:18:42 -0000 1.172
@@ -435,7 +435,6 @@
$(SRC_BITTORRENT)/bTStats.ml \
$(SRC_BITTORRENT)/bTTracker.ml \
$(SRC_BITTORRENT)/bTChooser.ml \
- $(SRC_BITTORRENT)/bTShare.ml \
$(SRC_BITTORRENT)/bTClients.ml \
$(SRC_BITTORRENT)/bTInteractive.ml \
$(SRC_BITTORRENT)/bTMain.ml
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1068
retrieving revision 1.1069
diff -u -b -r1.1068 -r1.1069
--- distrib/ChangeLog 25 Oct 2006 19:21:27 -0000 1.1068
+++ distrib/ChangeLog 26 Oct 2006 13:18:42 -0000 1.1069
@@ -14,6 +14,9 @@
ChangeLog
=========
+2006/10/26
+5477: BT: Add downloads to share list after core restart
+
2006/10/25
5474: updated bw_toggle
- fix cosmetic bug, wrong values were displayed
Index: src/networks/bittorrent/bTGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTGlobals.ml,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- src/networks/bittorrent/bTGlobals.ml 8 Oct 2006 14:02:05 -0000
1.69
+++ src/networks/bittorrent/bTGlobals.ml 26 Oct 2006 13:18:42 -0000
1.70
@@ -31,6 +31,7 @@
open CommonServer
open CommonResult
open CommonFile
+open CommonShared
open BasicSocket
open CommonGlobals
open Options
@@ -107,6 +108,45 @@
let (client_ops : client CommonClient.client_ops) =
CommonClient.new_client_ops network
+let must_share_file file codedname has_old_impl =
+ match file.file_shared with
+ | Some _ -> ()
+ | None ->
+ begin
+ let impl = {
+ impl_shared_update = 1;
+ impl_shared_fullname = file_disk_name file;
+ impl_shared_codedname = codedname;
+ impl_shared_size = file_size file;
+ impl_shared_id = Md4.null;
+ impl_shared_num = 0;
+ impl_shared_uploaded = Int64.zero;
+ impl_shared_ops = shared_ops;
+ impl_shared_val = file;
+ impl_shared_requests = 0;
+ impl_shared_magic = None;
+ impl_shared_servers = [];
+ } in
+ file.file_shared <- Some impl;
+ incr CommonGlobals.nshared_files;
+ CommonShared.shared_calculate_total_bytes ();
+ match has_old_impl with
+ None -> update_shared_num impl
+ | Some old_impl -> replace_shared old_impl impl
+ end
+
+let must_share_file file = must_share_file file (file_best_name (as_file
file)) None
+
+let unshare_file file =
+ match file.file_shared with
+ None -> ()
+ | Some s ->
+ begin
+ file.file_shared <- None;
+ decr CommonGlobals.nshared_files;
+ CommonShared.shared_calculate_total_bytes ()
+ end
+
module DO = CommonOptions
let current_files = ref ([] : BTTypes.file list)
@@ -295,7 +335,7 @@
current_files := file :: !current_files;
Hashtbl.add files_by_uid file_id file;
file_add file_impl file_state;
-(* lprintf "ADD FILE TO DOWNLOAD LIST\n"; *)
+ must_share_file file;
file
let new_download file_id t torrent_diskname user =
Index: src/networks/bittorrent/bTInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- src/networks/bittorrent/bTInteractive.ml 25 Oct 2006 11:14:02 -0000
1.119
+++ src/networks/bittorrent/bTInteractive.ml 26 Oct 2006 13:18:42 -0000
1.120
@@ -595,7 +595,6 @@
torrent_diskname;
let file = new_download file_id torrent torrent_diskname user in
BTClients.get_sources_from_tracker file;
- BTShare.must_share_file file;
CommonInteractive.start_download (file_find (file_num file));
file
@@ -675,7 +674,6 @@
let file = new_file file_id torrent torrent_diskname
filename FileShared CommonUserDb.admin_user in
- BTShare.must_share_file file;
if !verbose_share then lprintf_file_nl (as_file file) "Sharing file %s"
filename;
BTClients.connect_trackers file "started"
(parse_tracker_reply file)
@@ -1235,7 +1233,7 @@
shared_ops.op_shared_unshare <- (fun file ->
(if !verbose_share then lprintf_file_nl (as_file file) "unshare file");
- BTShare.unshare_file file);
+ BTGlobals.unshare_file file);
shared_ops.op_shared_info <- (fun file ->
let module T = GuiTypes in
match file.file_shared with
Index: src/networks/bittorrent/bTShare.ml
===================================================================
RCS file: src/networks/bittorrent/bTShare.ml
diff -N src/networks/bittorrent/bTShare.ml
--- src/networks/bittorrent/bTShare.ml 8 Oct 2006 14:20:22 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,68 +0,0 @@
-(* Copyright 2001, 2002, 2005 b8_bavard, b8_fee_carabine, INRIA *)
-(*
- This file is part of mldonkey.
-
- mldonkey is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- mldonkey is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with mldonkey; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*)
-
-open CommonGlobals
-open Printf2
-open Md4
-open CommonDownloads
-open CommonFile
-open CommonShared
-open CommonTypes
-open Options
-open BTTypes
-open BTGlobals
-
-let must_share_file file codedname has_old_impl =
- match file.file_shared with
- | Some _ -> ()
- | None ->
- begin
- let impl = {
- impl_shared_update = 1;
- impl_shared_fullname = file_disk_name file;
- impl_shared_codedname = codedname;
- impl_shared_size = file_size file;
- impl_shared_id = Md4.null;
- impl_shared_num = 0;
- impl_shared_uploaded = Int64.zero;
- impl_shared_ops = shared_ops;
- impl_shared_val = file;
- impl_shared_requests = 0;
- impl_shared_magic = None;
- impl_shared_servers = [];
- } in
- file.file_shared <- Some impl;
- incr CommonGlobals.nshared_files;
- CommonShared.shared_calculate_total_bytes ();
- match has_old_impl with
- None -> update_shared_num impl
- | Some old_impl -> replace_shared old_impl impl
- end
-
-let must_share_file file = must_share_file file (file_best_name (as_file
file)) None
-
-let unshare_file file =
- match file.file_shared with
- None -> ()
- | Some s ->
- begin
- file.file_shared <- None;
- decr CommonGlobals.nshared_files;
- CommonShared.shared_calculate_total_bytes ()
- end
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mldonkey-commits] mldonkey config/Makefile.in distrib/ChangeLog s...,
mldonkey-commits <=