/[mldonkey]/mldonkey/src/networks/bittorrent/bTGlobals.ml
ViewVC logotype

Diff of /mldonkey/src/networks/bittorrent/bTGlobals.ml

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

revision 1.44 by spiralvoice, Tue Nov 22 17:57:56 2005 UTC revision 1.45 by spiralvoice, Tue Dec 6 19:04:29 2005 UTC
# Line 468  let decode_opera s = Line 468  let decode_opera s =
468    else None    else None
469    
470  let decode_bow s =  let decode_bow s =
471    if "BOW" = String.sub s 0 3 then    if "BOW" = String.sub s 0 3 ||
472      (check_all s 45 [0;7] && "BOW" = String.sub s 1 4) then
473      Some (Brand_bitsonwheels, (String.sub s 4 3))      Some (Brand_bitsonwheels, (String.sub s 4 3))
474    else None    else None
475    
# Line 527  let decode_old_bitcomet s = Line 528  let decode_old_bitcomet s =
528      let brand = if "LORD" = String.sub s 6 4 then      let brand = if "LORD" = String.sub s 6 4 then
529        Brand_bitlord else Brand_bitcomet        Brand_bitlord else Brand_bitcomet
530      in      in
531      let version = Printf.sprintf "%d.%d%d"      let versionMajorNumber = int_of_char s.[4] in
532        (int_of_char s.[4])      let versionMinorNubmer =
533        ((int_of_char s.[5]) / 10)        match versionMajorNumber with
534        ((int_of_char s.[5]) mod 10)           0 -> (int_of_char s.[5])
535          |  _ -> ((int_of_char s.[5]) mod 10)
536      in      in
537        let version = Printf.sprintf "%d.%d"
538          versionMajorNumber versionMinorNubmer in
539      Some (brand, version)      Some (brand, version)
540    else None    else None
541    

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

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