/[mldonkey]/mldonkey/src/networks/fasttrack/fasttrackProto.ml
ViewVC logotype

Diff of /mldonkey/src/networks/fasttrack/fasttrackProto.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by spiralvoice, Thu Aug 18 14:12:30 2005 UTC revision 1.12 by spiralvoice, Sun Oct 16 20:42:54 2005 UTC
# Line 45  open FasttrackGlobals Line 45  open FasttrackGlobals
45  (*                                                                       *)  (*                                                                       *)
46  (*************************************************************************)  (*************************************************************************)
47    
48  let int64_3 = Int64.of_int 3  let int64_3 = 3L
49  let int64_ffffffff = Int64.of_string "0xffffffff"  let int64_ffffffff = 0xffffffffL
50  let default_bandwidth = 0x68  let default_bandwidth = 0x68
51    
52  external fst_hash_checksum : string -> int = "fst_hash_checksum_ml"  external fst_hash_checksum : string -> int = "fst_hash_checksum_ml"
# Line 1005  dec: [(63)] Line 1005  dec: [(63)]
1005              let shared_size, pos = get_dynint m pos in              let shared_size, pos = get_dynint m pos in
1006              let shared_tags, pos = get_tags m pos in              let shared_tags, pos = get_tags m pos in
1007    
1008              let computed_checksum = Int64.of_int              let computed_checksum =
1009                  (fst_hash_checksum shared_hash) in                Int64.of_int (fst_hash_checksum shared_hash) in
1010              if computed_checksum <> shared_checksum then begin              if computed_checksum <> shared_checksum then begin
1011                  lprintf "Bad COMPUTED checksum for hash\n";                  lprintf "Bad COMPUTED checksum for hash\n";
1012                end;                end;
# Line 1073  dec: [(63)] Line 1073  dec: [(63)]
1073                  let result_checksum, pos = get_dynint m (pos+20) in                  let result_checksum, pos = get_dynint m (pos+20) in
1074                  let result_size, pos = get_dynint m pos in                  let result_size, pos = get_dynint m pos in
1075    
1076                  let computed_checksum = Int64.of_int                  let computed_checksum =
1077                      (fst_hash_checksum result_hash) in                    Int64.of_int (fst_hash_checksum result_hash) in
1078                  if computed_checksum <> result_checksum then begin                  if computed_checksum <> result_checksum then begin
1079                      lprintf "Bad COMPUTED checksum for hash\n";                      lprintf "Bad COMPUTED checksum for hash\n";
1080                    end;                    end;
# Line 1257  dec: [(63)] Line 1257  dec: [(63)]
1257              let shared_size, pos = get_dynint m pos in              let shared_size, pos = get_dynint m pos in
1258              let shared_tags, pos = get_tags m pos in              let shared_tags, pos = get_tags m pos in
1259    
1260              let computed_checksum = Int64.of_int              let computed_checksum =
1261                  (fst_hash_checksum shared_hash) in                Int64.of_int (fst_hash_checksum shared_hash) in
1262              if computed_checksum <> shared_checksum then begin              if computed_checksum <> shared_checksum then begin
1263                  lprintf "Bad COMPUTED checksum for hash\n";                  lprintf "Bad COMPUTED checksum for hash\n";
1264                end;                end;
# Line 1892  let resend_udp_packets _ = () Line 1892  let resend_udp_packets _ = ()
1892  let check_primitives () =  let check_primitives () =
1893    (try    (try
1894        let cipher = create_cipher () in        let cipher = create_cipher () in
1895        set_cipher cipher (Int32.of_int 123456789) 0x29;        set_cipher cipher 123456789l 0x29;
1896        init_cipher cipher;        init_cipher cipher;
1897        let s = String.create 12 in        let s = String.create 12 in
1898        cipher_packet_set cipher s 0;        cipher_packet_set cipher s 0;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26