mldonkey-commits
[Top][All Lists]
Advanced

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

[Mldonkey-commits] Changes to mldonkey/src/daemon/common/guiDecoding.ml


From: mldonkey-commits
Subject: [Mldonkey-commits] Changes to mldonkey/src/daemon/common/guiDecoding.ml
Date: Sun, 18 Sep 2005 15:00:59 -0400

Index: mldonkey/src/daemon/common/guiDecoding.ml
diff -u mldonkey/src/daemon/common/guiDecoding.ml:1.41 
mldonkey/src/daemon/common/guiDecoding.ml:1.42
--- mldonkey/src/daemon/common/guiDecoding.ml:1.41      Sun Aug 21 12:27:18 2005
+++ mldonkey/src/daemon/common/guiDecoding.ml   Sun Sep 18 19:00:51 2005
@@ -94,6 +94,9 @@
   Array.of_list list, pos
 
 let get_bool s pos = (get_uint8 s pos) = 1
+let get_bool_option s pos = 
+  let i = get_uint8 s pos in
+  if i = 2 then None else Some (i = 1)
 
 let get_float s pos = 
   let s, pos = get_string s pos in
@@ -698,6 +701,7 @@
       client_downloaded = zero;
       client_uploaded = zero;
       client_upload = None;
+      client_sui_verified = None;
 (*      client_sock_addr = ""; *)
     }, pos+8
   else
@@ -732,6 +736,11 @@
      if proto >= 33 then
        get_string s pos
        else "", pos
+   in 
+   let verified =
+     if proto >= 35 then
+       get_bool_option s pos
+       else None
    in  {
     client_num = num;
     client_network = net;
@@ -750,6 +759,7 @@
     client_downloaded = downloaded;
     client_uploaded = uploaded;
     client_upload = upload;
+    client_sui_verified = verified;
 (*    client_sock_addr = sock_addr; *)
   }, pos
 




reply via email to

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