mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey/src daemon/common/commonTypes.ml daemo...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey/src daemon/common/commonTypes.ml daemo...
Date: Sun, 12 Nov 2006 14:17:45 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/11/12 14:17:45

Modified files:
        src/daemon/common: commonTypes.ml 
        src/daemon/driver: driverInterface.ml 
        src/networks/bittorrent: bTInteractive.ml 

Log message:
        patch #5543 - bt_exceptions.patch

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonTypes.ml?cvsroot=mldonkey&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverInterface.ml?cvsroot=mldonkey&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/bittorrent/bTInteractive.ml?cvsroot=mldonkey&r1=1.122&r2=1.123

Patches:
Index: daemon/common/commonTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonTypes.ml,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- daemon/common/commonTypes.ml        9 Nov 2006 21:32:26 -0000       1.60
+++ daemon/common/commonTypes.ml        12 Nov 2006 14:17:45 -0000      1.61
@@ -88,6 +88,9 @@
   string_of_uid_sep uid "_"
 
 exception Illegal_urn of string
+exception Torrent_already_exists
+exception Torrent_can_not_be_used
+
 let uid_of_string s =
   let s = String.lowercase s in
   let urn = String2.before s 4 in

Index: daemon/driver/driverInterface.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverInterface.ml,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- daemon/driver/driverInterface.ml    12 Nov 2006 13:57:05 -0000      1.58
+++ daemon/driver/driverInterface.ml    12 Nov 2006 14:17:45 -0000      1.59
@@ -1099,15 +1099,13 @@
   with 
     Failure s ->
       gui_send gui (Console (Printf.sprintf "Failure: %s\n" s))
-  | e ->
-      match Printexc2.to_string e with
-       "BTInteractive.Torrent_can_not_be_used" ->
+  | Torrent_can_not_be_used ->
          gui_send gui (Console (Printf.sprintf "\nError: This torrent does not 
have valid tracker URLs\n"))
-      | "BTInteractive.Already_exists" ->
+  | Torrent_already_exists ->
          gui_send gui (Console (Printf.sprintf "\nError: This torrent is 
already in download queue\n"))
       | e -> 
        gui_send gui (Console (Printf.sprintf "from_gui: exception %s for 
message %s\n"
-          e (GuiProto.string_of_from_gui t)))
+       (Printexc2.to_string e) (GuiProto.string_of_from_gui t)))
 
 let gui_events () = 
   {

Index: networks/bittorrent/bTInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/bittorrent/bTInteractive.ml,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- networks/bittorrent/bTInteractive.ml        12 Nov 2006 12:44:24 -0000      
1.122
+++ networks/bittorrent/bTInteractive.ml        12 Nov 2006 14:17:45 -0000      
1.123
@@ -81,9 +81,6 @@
   with _ ->
     failure_message "%s" "broken bencoded value"
 
-exception Already_exists
-exception Torrent_can_not_be_used
-
 let op_file_all_sources file =
   let list = ref [] in
   Hashtbl.iter (fun _ c ->
@@ -619,7 +616,7 @@
   if Sys.file_exists torrent_diskname then
     begin
       if !verbose then lprintf_nl "load_torrent_string: %s already exists, 
ignoring" torrent_diskname;
-      raise Already_exists
+      raise Torrent_already_exists
     end;
   File.from_string torrent_diskname s;
 
@@ -853,7 +850,7 @@
             load_torrent_file url user;
             "", true
           with
-           Already_exists -> "A torrent with this name is already in the 
download queue", false
+           Torrent_already_exists -> "A torrent with this name is already in 
the download queue", false
          | Torrent_can_not_be_used -> "This torrent does not have valid 
tracker URLs", false
         with e ->
           lprintf_nl "Exception %s while 2nd loading" (Printexc2.to_string e);
@@ -1177,7 +1174,7 @@
         ignore (load_torrent_string text user)
       with e -> (match e with
          Torrent_can_not_be_used -> lprintf_nl "Loading torrent from GUI: this 
torrent can not be used"
-       | Already_exists -> lprintf_nl "Loading torrent from GUI: this torrent 
is already in download queue"
+       | Torrent_already_exists -> lprintf_nl "Loading torrent from GUI: this 
torrent is already in download queue"
        | _ -> ());
        raise e)
   | 1 -> (* 34+ *)




reply via email to

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