[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTTorrent
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTTorrent.ml |
Date: |
Wed, 06 Jul 2005 20:25:51 -0400 |
Index: mldonkey/src/networks/bittorrent/bTTorrent.ml
diff -u mldonkey/src/networks/bittorrent/bTTorrent.ml:1.3
mldonkey/src/networks/bittorrent/bTTorrent.ml:1.4
--- mldonkey/src/networks/bittorrent/bTTorrent.ml:1.3 Sat May 28 11:19:42 2005
+++ mldonkey/src/networks/bittorrent/bTTorrent.ml Thu Jul 7 00:25:46 2005
@@ -24,19 +24,19 @@
open Printf2
open BasicSocket
-
+
open CommonGlobals
-
+
open BTOptions
open BTTypes
open Bencode
-
-open Gettext
+
+open Gettext
let _s x = _s "BTTorrent" x
-let _b x = _b "BTTorrent" x
+let _b x = _b "BTTorrent" x
-(*
+(*
We could have a a-la-edonkey tracker: it would connect back to incoming
client, and check whether they are accessible from the outside world,
@@ -44,7 +44,7 @@
that we can filter out immediatly sources that are not interesting for
them.
*)
-
+
(*
torrents/: for BitTorrent
@@ -82,7 +82,7 @@
let current_file = ref "" in
let current_length = ref zero in
let length_set = ref false in
-
+
List.iter (fun (key, value) ->
match key, value with
String "path", List path ->
@@ -157,7 +157,7 @@
assert (!file_info = Bencode.decode (Bencode.encode !file_info));
let file_id = Sha1.string (Bencode.encode !file_info) in
- let npieces =
+ let npieces =
1+ Int64.to_int ((!length -- one) // !file_piece_size)
in
(* lprintf "npieces %d length %Ld piece %Ld %d\n"
- [Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTTorrent.ml,
mldonkey-commits <=