[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonNetwork.m
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonNetwork.ml |
Date: |
Tue, 06 Sep 2005 07:29:13 -0400 |
Index: mldonkey/src/daemon/common/commonNetwork.ml
diff -u mldonkey/src/daemon/common/commonNetwork.ml:1.20
mldonkey/src/daemon/common/commonNetwork.ml:1.21
--- mldonkey/src/daemon/common/commonNetwork.ml:1.20 Fri Jul 22 10:58:55 2005
+++ mldonkey/src/daemon/common/commonNetwork.ml Tue Sep 6 11:29:10 2005
@@ -99,6 +99,8 @@
lprintf_nl "op_network_display_stats";
if c.op_network_info == cc.op_network_info then
lprintf_nl "op_network_info";
+ if c.op_network_clean_exit == cc.op_network_clean_exit then
+ lprintf_nl "op_network_clean_exit";
) !networks_ops;
lprint_newline ()
@@ -115,6 +117,7 @@
let network_server_of_option n s = n.op_network_server_of_option s
let network_file_of_option n f = n.op_network_file_of_option f
let network_client_of_option n f = n.op_network_client_of_option f
+let network_clean_exit n = try n.op_network_clean_exit () with _ -> true
let networks_iter f =
@@ -161,6 +164,17 @@
false
) !networks
+let networks_for_all f =
+ List.for_all (fun r ->
+ try
+ if network_is_enabled r then f r else true
+ with
+ | IgnoreNetwork -> true
+ | e ->
+ lprintf_nl "Exception %s in Network.for_all for %s"
+ (Printexc2.to_string e) r.network_name; true
+ ) !networks
+
let network_find_by_name name =
Hashtbl.find networks_by_name name
@@ -245,6 +259,7 @@
op_network_gui_message = (fun _ -> ni_ok name "gui_message");
op_network_download = (fun _ -> raise IgnoreNetwork);
op_network_display_stats = (fun _ _ -> ni_ok name "display_stats");
+ op_network_clean_exit = (fun _ -> true);
}
in
let rr = (Obj.magic r: network) in
- [Mldonkey-commits] Changes to mldonkey/src/daemon/common/commonNetwork.ml,
mldonkey-commits <=