mldonkey-commits
[Top][All Lists]
Advanced

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

[Mldonkey-commits] mldonkey config/configure.in distrib/ChangeLog ...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey config/configure.in distrib/ChangeLog ...
Date: Tue, 31 Oct 2006 15:40:06 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/10/31 15:40:06

Modified files:
        config         : configure.in 
        distrib        : ChangeLog 
        src/daemon/common: commonClient.ml commonFile.ml guiDecoding.ml 
                           guiEncoding.ml guiTypes.ml 
        src/daemon/driver: driverCommands.ml 
        src/gtk/newgui : gui_friends.ml gui_main.ml 
        src/networks/donkey: donkeyClient.ml donkeyGlobals.ml 
                             donkeyInteractive.ml donkeyMain.ml 
                             donkeyProtoClient.ml donkeyTypes.ml 
        src/utils/cdk  : filename2.ml 

Log message:
        patch #5505

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/config/configure.in?cvsroot=mldonkey&r1=1.287&r2=1.288
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1072&r2=1.1073
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonClient.ml?cvsroot=mldonkey&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonFile.ml?cvsroot=mldonkey&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiDecoding.ml?cvsroot=mldonkey&r1=1.62&r2=1.63
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiEncoding.ml?cvsroot=mldonkey&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/guiTypes.ml?cvsroot=mldonkey&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.191&r2=1.192
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/newgui/gui_friends.ml?cvsroot=mldonkey&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/gtk/newgui/gui_main.ml?cvsroot=mldonkey&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyClient.ml?cvsroot=mldonkey&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyGlobals.ml?cvsroot=mldonkey&r1=1.101&r2=1.102
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyInteractive.ml?cvsroot=mldonkey&r1=1.132&r2=1.133
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyMain.ml?cvsroot=mldonkey&r1=1.59&r2=1.60
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyProtoClient.ml?cvsroot=mldonkey&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/donkey/donkeyTypes.ml?cvsroot=mldonkey&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/utils/cdk/filename2.ml?cvsroot=mldonkey&r1=1.5&r2=1.6

Patches:
Index: config/configure.in
===================================================================
RCS file: /sources/mldonkey/mldonkey/config/configure.in,v
retrieving revision 1.287
retrieving revision 1.288
diff -u -b -r1.287 -r1.288
--- config/configure.in 27 Oct 2006 08:33:40 -0000      1.287
+++ config/configure.in 31 Oct 2006 15:40:05 -0000      1.288
@@ -143,7 +143,7 @@
     SYSTEM=hpux
     ;;
   *darwin*|*rhapsody*|*macosx*)
-    SYSTEM=macosx
+    SYSTEM=macos
     AC_CHECK_PROG(SED, sed, sed)
     if test "$ac_cv_prog_SED" = "sed"; then
       FIX_BROKEN_CPP="| sed -n '/^\#pragma/!p'"
@@ -234,7 +234,7 @@
       AC_CHECK_PROG(CUT, cut, cut)
       if test "$ac_cv_prog_CUT" = "cut"; then
         SUB_VERSION3="CVS"
-        if [ test "$SYSTEM" = "freebsd"] || [ test "$SYSTEM" = "netbsd"] || ( 
[ test "$SYSTEM" = "macosx" ] && [ test "$ac_cv_prog_STAT" != "gstat" ] ); then
+        if [ test "$SYSTEM" = "freebsd"] || [ test "$SYSTEM" = "netbsd"] || ( 
[ test "$SYSTEM" = "macos" ] && [ test "$ac_cv_prog_STAT" != "gstat" ] ); then
           SCM_VERSION=`$STAT -f "%Sm" ./CVS/Entries | $SED -e 's/\(.*\) \(.*\) 
\(.*\) \(.*\)/\4-\1-\2 \3/'`
         else
         if [ test "$SYSTEM" = "openbsd"]; then

Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1072
retrieving revision 1.1073
diff -u -b -r1.1072 -r1.1073
--- distrib/ChangeLog   29 Oct 2006 23:59:36 -0000      1.1072
+++ distrib/ChangeLog   31 Oct 2006 15:40:05 -0000      1.1073
@@ -14,6 +14,9 @@
 ChangeLog
 =========
 
+2006/10/31
+5505: EDK: Support aMule/Hydranode style OS_INFO tag
+
 2006/10/30
 5488: Multiuser: New commands
 - groups -> displays groups of the logged-in user

Index: src/daemon/common/commonClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonClient.ml,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- src/daemon/common/commonClient.ml   25 Oct 2006 11:12:38 -0000      1.31
+++ src/daemon/common/commonClient.ml   31 Oct 2006 15:40:05 -0000      1.32
@@ -471,7 +471,7 @@
          client_disconnect c;
           if !verbose then lprintf_nl "disconnected client %d: [%s %s] %s 
after %d %s of silence."
            (client_num c)
-           i.GuiTypes.client_software
+           (GuiTypes.client_software i.GuiTypes.client_software 
i.GuiTypes.client_os)
            i.GuiTypes.client_release
            i.GuiTypes.client_name
            ctime
@@ -496,6 +496,7 @@
      T.client_connect_time = BasicSocket.last_time ();
      T.client_kind = Indirect_location ("", Md4.Md4.null, Ip.null, 0);
      T.client_software = "";
+     T.client_os = None;
      T.client_release = "";
      T.client_emulemod = "";
      T.client_downloaded = 0L;

Index: src/daemon/common/commonFile.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonFile.ml,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- src/daemon/common/commonFile.ml     25 Oct 2006 11:12:38 -0000      1.66
+++ src/daemon/common/commonFile.ml     31 Oct 2006 15:40:05 -0000      1.67
@@ -424,7 +424,8 @@
           ("", "sr br ar", Printf.sprintf "%d" (client_num c));
           ("", "sr br", cinfo.GuiTypes.client_name);
           ("", "sr br", addr);
-          ("", "sr br", cinfo.GuiTypes.client_software);
+          (GuiTypes.client_software cinfo.GuiTypes.client_software 
cinfo.GuiTypes.client_os,
+          "sr br", GuiTypes.client_software_short 
cinfo.GuiTypes.client_software cinfo.GuiTypes.client_os);
           ("", "sr ar", (size_of_int64 cinfo.GuiTypes.client_uploaded));
           ("", "sr ar br", (size_of_int64 cinfo.GuiTypes.client_downloaded)); 
];
 

Index: src/daemon/common/guiDecoding.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiDecoding.ml,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- src/daemon/common/guiDecoding.ml    25 Oct 2006 11:12:38 -0000      1.62
+++ src/daemon/common/guiDecoding.ml    31 Oct 2006 15:40:05 -0000      1.63
@@ -812,6 +812,7 @@
       client_files = None;
       client_connect_time = 0;
       client_software = "";
+      client_os = None;
       client_release = "";
       client_emulemod = "";
       client_downloaded = zero;
@@ -870,6 +871,7 @@
     client_files = None;
     client_connect_time = connect_time;
     client_software = software;
+    client_os = None;
     client_release = release;
     client_emulemod = emulemod;
     client_downloaded = downloaded;

Index: src/daemon/common/guiEncoding.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiEncoding.ml,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- src/daemon/common/guiEncoding.ml    23 Sep 2006 20:29:46 -0000      1.58
+++ src/daemon/common/guiEncoding.ml    31 Oct 2006 15:40:05 -0000      1.59
@@ -666,7 +666,7 @@
       buf_int buf c.client_chat_port
     end else 
     begin
-      buf_string buf c.client_software;
+      buf_string buf (client_software_short c.client_software c.client_os);
       buf_int64 buf c.client_downloaded;
       buf_int64 buf c.client_uploaded;
       (match c.client_upload with

Index: src/daemon/common/guiTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/guiTypes.ml,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- src/daemon/common/guiTypes.ml       25 Oct 2006 11:12:38 -0000      1.32
+++ src/daemon/common/guiTypes.ml       31 Oct 2006 15:40:05 -0000      1.33
@@ -215,6 +215,7 @@
     mutable client_chat_port : int;
     mutable client_connect_time : int;
     mutable client_software : string;
+    mutable client_os : string option;
     mutable client_release : string;
     mutable client_emulemod : string;
     mutable client_downloaded : int64;
@@ -251,6 +252,28 @@
   }
   
   
+let osinfo_short i =
+  match i with
+    Some s when
+      s = "linux" ||
+      s = "netbsd" ||
+      s = "macos" ||
+      s = "freebsd" ||
+      s = "windows" -> Some (String.sub s 0 1)
+  | _ -> i
+
+let client_software_short software os =
+  software ^
+  match osinfo_short os with
+    Some s -> "/" ^ s
+  | None -> ""
+
+let client_software software os =
+  software ^
+  match os with
+    Some s -> "/" ^ s
+  | None -> ""
+
 let add_file tree dirname r =
   let path = Filename2.path_of_filename dirname in
   

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -b -r1.191 -r1.192
--- src/daemon/driver/driverCommands.ml 29 Oct 2006 23:59:37 -0000      1.191
+++ src/daemon/driver/driverCommands.ml 31 Oct 2006 15:40:05 -0000      1.192
@@ -406,7 +406,7 @@
                     client_print c o;
                     if use_html_mods o then
                     html_mods_td buf ([
-                     ("", "sr", i.client_software);
+                     (client_software i.client_software i.client_os, "sr", 
client_software_short i.client_software i.client_os);
                      ("", "sr", i.client_release);
                      ] @
                      (if !!emule_mods_count then [("", "sr", 
i.client_emulemod)] else []));
@@ -2400,7 +2400,7 @@
                             ("", "sr", ips);
                             ] @ (if !Geoip.active then [(cn, "sr", cc)] else 
[]) @ [
                             ("", "sr", Printf.sprintf "%d" (((last_time ()) - 
i.client_connect_time) / 60));
-                            ("", "sr", i.client_software);
+                            (client_software i.client_software i.client_os, 
"sr", client_software_short i.client_software i.client_os);
                             ("", "sr", i.client_release);
                             ] @
                             (if !!emule_mods_count then [("", "sr", 
i.client_emulemod)] else [])
@@ -2472,7 +2472,7 @@
                         )); 
                         ("", "sr", ips);
                         ] @ (if !Geoip.active then [(cn, "sr", cc)] else []) @ 
[
-                        ("", "sr", i.client_software);
+                        (client_software i.client_software i.client_os, "sr", 
client_software_short i.client_software i.client_os);
                         ("", "sr", i.client_release);
                         ] @
                         (if !!emule_mods_count then [("", "sr", 
i.client_emulemod )] else [])

Index: src/gtk/newgui/gui_friends.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/newgui/gui_friends.ml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/gtk/newgui/gui_friends.ml       25 Oct 2006 11:34:46 -0000      1.18
+++ src/gtk/newgui/gui_friends.ml       31 Oct 2006 15:40:05 -0000      1.19
@@ -430,6 +430,7 @@
         client_chat_port = 0;
         client_connect_time = c.gclient_connect_time;
         client_software = c.gclient_software;
+        client_os = None;
         client_release = c.gclient_release;
         client_emulemod = c.gclient_emulemod;
         client_downloaded = c.gclient_downloaded;
@@ -637,6 +638,7 @@
         client_chat_port = 0;
         client_connect_time = c.gclient_connect_time;
         client_software = c.gclient_software;
+        client_os = None;
         client_release = c.gclient_release;
         client_emulemod = c.gclient_emulemod;
         client_downloaded = c.gclient_downloaded;

Index: src/gtk/newgui/gui_main.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/gtk/newgui/gui_main.ml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- src/gtk/newgui/gui_main.ml  27 Jun 2006 10:38:35 -0000      1.18
+++ src/gtk/newgui/gui_main.ml  31 Oct 2006 15:40:05 -0000      1.19
@@ -460,6 +460,7 @@
     | GiftServerAttach _
     | GiftServerStats _ -> assert false
     | Version _
+    | Stats (_, _)
     | Search _ -> ()
         
   with e ->

Index: src/networks/donkey/donkeyClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyClient.ml,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- src/networks/donkey/donkeyClient.ml 25 Oct 2006 11:12:38 -0000      1.104
+++ src/networks/donkey/donkeyClient.ml 31 Oct 2006 15:40:05 -0000      1.105
@@ -677,6 +677,11 @@
             DonkeyProtoClient.update_emule_proto_from_miscoptions1
             c.client_emule_proto i
           )
+      | Field_UNKNOWN "emule_compatoptions" ->
+          for_int_tag tag (fun i ->
+            DonkeyProtoClient.update_emule_proto_from_compatoptions
+            c.client_emule_proto i
+          );
       | Field_UNKNOWN "emule_version" ->
           for_int_tag tag (fun i ->
             c.client_emule_proto.emule_version <- i;
@@ -731,6 +736,12 @@
       | Field_UNKNOWN "mod_version" ->
           let s = to_lowercase (string_of_tag_value tag.tag_value) in 
           parse_mod_version s c;
+
+      | Field_UNKNOWN "os_info" ->
+          let s = to_lowercase (string_of_tag_value tag.tag_value) in 
+         (match c.client_osinfo with
+           Some _ -> ()
+         | _ ->  if s <> "" then c.client_osinfo <- Some s)
       | _ -> 
           if !verbose_msg_clients then
             lprintf_nl "Unknown Emule tag: [%s]" (escaped_string_of_field tag)
@@ -747,6 +758,19 @@
    if c.client_brand = Brand_emuleplus && c.client_brand_mod = Brand_mod_plus 
then
       c.client_brand_mod <- Brand_mod_unknown
 
+let request_osinfo c =
+  if c.client_emule_proto.emule_osinfosupport = 1 && not c.client_osinfo_sent 
then
+    begin
+      let emule_osinfo = {
+       emule_info with
+       DonkeyProtoClient.EmuleClientInfo.protversion = 255;
+       DonkeyProtoClient.EmuleClientInfo.tags = [
+         string_tag (Field_UNKNOWN "os_info") (String2.upp_initial 
Autoconf.system);
+       ]} in
+      client_send c (DonkeyProtoClient.EmuleClientInfoReq emule_osinfo);
+      c.client_osinfo_sent <- true
+    end
+
 let rec query_id ip port id =
   let client_ip = client_ip None in
 
@@ -1053,14 +1077,14 @@
 let process_mule_info c t =
   update_emule_proto_from_tags c t;
   update_emule_release c;
+  client_must_update c;
   if !!enable_sui
       && (c.client_md4 <> Md4.null) 
       && (c.client_sent_challenge == Int64.zero) 
       && (c.client_emule_proto.emule_secident > 0) 
   then begin
-    if !verbose_msg_clients then begin
+    if !verbose_msg_clients then
       lprintf_nl "%s [process_mule_info] [verify_ident]" 
(full_client_identifier c);
-    end;
     verify_ident c
   end
 
@@ -1182,14 +1206,10 @@
       if !!emule_mods_count then
         identify_client_brand_mod c t.CI.tags;
       
-      (* TODO : remove this comment 
-          ERR! i think the peer support eep if it send an emule client info
-          PLUS this message is sent _before_ we received an md4 so 
-          client_brand is unknown here.
-      if supports_eep c.client_brand then  begin
-      *)
           let module E = M.EmuleClientInfo in
-          client_send c (M.EmuleClientInfoReplyReq emule_info)
+      client_send c (M.EmuleClientInfoReplyReq emule_info);
+      request_osinfo c;
+
   
   | M.EmuleClientInfoReplyReq t -> 
       
@@ -2251,6 +2271,7 @@
           client_send c (M.EmuleClientInfoReq emule_info)
         end;
       
+      request_osinfo c;
       client_send c (
         let module M = DonkeyProtoClient in
         let module C = M.Connect in

Index: src/networks/donkey/donkeyGlobals.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- src/networks/donkey/donkeyGlobals.ml        8 Oct 2006 14:20:22 -0000       
1.101
+++ src/networks/donkey/donkeyGlobals.ml        31 Oct 2006 15:40:06 -0000      
1.102
@@ -566,6 +566,7 @@
       client_rating = 0;
       client_brand = Brand_unknown;
       client_brand_mod = Brand_mod_unknown;
+      client_osinfo = None;
       client_checked = false;
       client_connected = false;
       client_downloaded = Int64.zero;
@@ -589,6 +590,7 @@
       client_public_key = None;
       client_sui_verified = None;
       client_last_file_req_md4 = None;
+      client_osinfo_sent = false;
       } and
     client_impl = {
       dummy_client_impl with
@@ -619,6 +621,7 @@
       client_rating = 0;
       client_brand = Brand_unknown;
       client_brand_mod = Brand_mod_unknown;
+      client_osinfo = None;
       client_checked = false;
       client_connected = false;
       client_downloaded = Int64.zero;
@@ -642,6 +645,7 @@
       client_public_key = None;
       client_sui_verified = None;
       client_last_file_req_md4 = None;
+      client_osinfo_sent = false;
       } and    client_impl = {
       dummy_client_impl with
       impl_client_val = c;

Index: src/networks/donkey/donkeyInteractive.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -b -r1.132 -r1.133
--- src/networks/donkey/donkeyInteractive.ml    25 Oct 2006 18:16:56 -0000      
1.132
+++ src/networks/donkey/donkeyInteractive.ml    31 Oct 2006 15:40:06 -0000      
1.133
@@ -1139,6 +1139,7 @@
         P.client_rating = c.client_rating;
         P.client_connect_time = c.client_connect_time;
         P.client_software = brand_to_string_short c.client_brand;
+        P.client_os = c.client_osinfo;
         P.client_release = c.client_emule_proto.emule_release;
         P.client_emulemod = brand_mod_to_string_short c.client_brand_mod;
         P.client_downloaded = c.client_downloaded;
@@ -1401,7 +1402,8 @@
             ((string_of_connection_state (client_state c)), "sr",
               (short_string_of_connection_state (client_state c)) );
             (String.escaped c.client_name, "sr", client_short_name 
c.client_name);
-            (brand_to_string c.client_brand, "sr", brand_to_string_short 
c.client_brand);
+            (client_software (brand_to_string c.client_brand) c.client_osinfo, 
"sr",
+            client_software_short (brand_to_string_short c.client_brand) 
c.client_osinfo);
             ("", "sr", c.client_emule_proto.emule_release);
 
             ] @

Index: src/networks/donkey/donkeyMain.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyMain.ml,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- src/networks/donkey/donkeyMain.ml   8 Oct 2006 14:20:22 -0000       1.59
+++ src/networks/donkey/donkeyMain.ml   31 Oct 2006 15:40:06 -0000      1.60
@@ -133,6 +133,7 @@
     m.emule_features <- secident;
 
   let emule_miscoptions1 = D.emule_miscoptions1 m in
+  let emule_compatoptions = D.emule_compatoptions m in
   client_to_client_tags :=
   [
     string_tag (Field_UNKNOWN "name") (local_login ());
@@ -141,6 +142,7 @@
     int_tag (Field_UNKNOWN "emule_udpports") (!!donkey_port+4);
     int_tag (Field_UNKNOWN "emule_version") m.emule_version;
     int64_tag (Field_UNKNOWN "emule_miscoptions1") emule_miscoptions1;
+    int_tag (Field_UNKNOWN "emule_compatoptions") emule_compatoptions;
   ];
 
   let extended = ref 0x04 in (* support of auxport *)

Index: src/networks/donkey/donkeyProtoClient.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyProtoClient.ml,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- src/networks/donkey/donkeyProtoClient.ml    1 Oct 2006 17:54:00 -0000       
1.38
+++ src/networks/donkey/donkeyProtoClient.ml    31 Oct 2006 15:40:06 -0000      
1.39
@@ -51,6 +51,7 @@
     emule_secident = 3; (* Emule uses v1 if advertising both, v2 if only 
advertising 2 *)
     emule_noviewshared = 0;
     emule_supportpreview = 0;
+    emule_osinfosupport = 1;
     emule_compression = 1; (* 1 *)
     emule_sourceexchange = 2; (* 2 : +client_md4 3 : +IdHybrid (emule 
Kademlia?)*)
     emule_multipacket = 0; (* 1 *)
@@ -85,6 +86,12 @@
   m.emule_multipacket <- (o lsr 1) land 0x1;
   m.emule_supportpreview <- (o lsr 0) land 0x1
 
+let emule_compatoptions m =
+  (m.emule_osinfosupport lsl 0)
+
+let update_emule_proto_from_compatoptions m o =
+  m.emule_osinfosupport <- (o lsr 0) land 0x1
+
 let extendedrequest e =
   min e.emule_extendedrequest mldonkey_emule_proto.emule_extendedrequest
 
@@ -133,6 +140,7 @@
         "\060", Field_UNKNOWN "downloadtime";
         "\061", Field_UNKNOWN "incompleteparts";
         "\085", Field_UNKNOWN "mod_version";
+        "\239", Field_UNKNOWN "emule_compatoptions";
         "\249", Field_UNKNOWN "emule_udpports";
         "\250", Field_UNKNOWN "emule_miscoptions1";
         "\251", Field_UNKNOWN "emule_version";
@@ -799,7 +807,7 @@
         "\135", "mod_lsd";
         "\136", "mod_lsd_version";
         "\144", "mod_lovelace_version";
-        "\148", "mod_oxy";
+        "\148", "os_info"; (* reused by aMule to transfer client OS type *)
         "\153", "mod_plus";
         "\160", "mod_wombat";
         "\161", "dev_wombat";

Index: src/networks/donkey/donkeyTypes.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/donkey/donkeyTypes.ml,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- src/networks/donkey/donkeyTypes.ml  8 Oct 2006 14:20:22 -0000       1.49
+++ src/networks/donkey/donkeyTypes.ml  31 Oct 2006 15:40:06 -0000      1.50
@@ -39,6 +39,7 @@
     mutable emule_secident : int;
     mutable emule_noviewshared : int;
     mutable emule_supportpreview : int;
+    mutable emule_osinfosupport : int;
 
     mutable emule_compression : int;
     mutable emule_sourceexchange : int;
@@ -545,6 +546,8 @@
     mutable client_uploaded : Int64.t;
     mutable client_brand : brand;
     mutable client_brand_mod : brand_mod;
+    mutable client_osinfo_sent : bool;
+    mutable client_osinfo : string option;
     mutable client_banned : bool;
     mutable client_score : int;
     mutable client_next_queue : int;
@@ -676,6 +679,7 @@
     emule_secident = 0;
     emule_noviewshared = 0;
     emule_supportpreview = 0;
+    emule_osinfosupport = 0;
 
     emule_compression = 0; (* 1 *)
     emule_sourceexchange = 0; (* 3 *)

Index: src/utils/cdk/filename2.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/utils/cdk/filename2.ml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/utils/cdk/filename2.ml  20 Jul 2006 15:30:21 -0000      1.5
+++ src/utils/cdk/filename2.ml  31 Oct 2006 15:40:06 -0000      1.6
@@ -196,7 +196,7 @@
   let sys_checked_name =
     if Autoconf.windows then 
       windows_compliant name
-    else if Autoconf.system = "macosx" then 
+    else if Autoconf.system = "macos" then 
       macosx_compliant name
     else 
       posix_compliant name in




reply via email to

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