[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTComplex
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/networks/bittorrent/bTComplexOptions.ml |
Date: |
Wed, 10 Aug 2005 19:15:57 -0400 |
Index: mldonkey/src/networks/bittorrent/bTComplexOptions.ml
diff -u mldonkey/src/networks/bittorrent/bTComplexOptions.ml:1.24
mldonkey/src/networks/bittorrent/bTComplexOptions.ml:1.25
--- mldonkey/src/networks/bittorrent/bTComplexOptions.ml:1.24 Thu Aug 4
22:00:23 2005
+++ mldonkey/src/networks/bittorrent/bTComplexOptions.ml Wed Aug 10
23:15:57 2005
@@ -131,7 +131,7 @@
let file_name = get_value "file_name" value_to_string in
let file_name_utf8 = Charset.to_utf8 file_name in
- let file_comment = get_value "file_comment" value_to_string in
+ let file_comment = try get_value "file_comment" value_to_string with
Not_found -> "" in
let file_id =
try
Sha1.of_string (get_value "file_id" value_to_string)
@@ -146,11 +146,11 @@
(from_value Sha1.option))
in
let file_size = get_value "file_size" value_to_int64 in
- let file_created_by = get_value "file_created_by" value_to_string in
- let file_creation_date = get_value "file_creation_date" value_to_int64
in
- let file_modified_by = get_value "file_modified_by" value_to_string in
- let file_encoding = get_value "file_encoding" value_to_string in
- let file_is_private = get_value "file_is_private" value_to_int64 in
+ let file_created_by = try get_value "file_created_by" value_to_string
with Not_found -> "" in
+ let file_creation_date = try get_value "file_creation_date"
value_to_int64 with Not_found -> Int64.zero in
+ let file_modified_by = try get_value "file_modified_by"
value_to_string with Not_found -> "" in
+ let file_encoding = try get_value "file_encoding" value_to_string with
Not_found -> "" in
+ let file_is_private = try get_value "file_is_private" value_to_int64
with Not_found -> Int64.zero in
let file_files =
try
let file_files = (get_value "file_files"
@@ -215,6 +215,7 @@
Int64Swarmer.value_to_swarmer swarmer assocs;
);
+(*
(try
ignore
(get_value "file_sources" (
@@ -223,7 +224,7 @@
lprintf_nl () "Exception %s while loading sources"
(Printexc2.to_string e);
);
-
+*)
as_file file
let file_to_value file =