/[mldonkey]/mldonkey/src/networks/donkey/donkeyClient.ml
ViewVC logotype

Diff of /mldonkey/src/networks/donkey/donkeyClient.ml

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

revision 1.60 by spiralvoice, Thu Aug 18 12:58:14 2005 UTC revision 1.61 by spiralvoice, Sat Sep 17 17:59:46 2005 UTC
# Line 94  let add_source file ip port serverIP ser Line 94  let add_source file ip port serverIP ser
94                    end                    end
95                  else                  else
96                    (* direct adsdess *)                    (* direct adsdess *)
97                    if Ip.valid ip && ip_reachable ip then                    if Ip.usable ip then
98                      if not ( is_black_address ip port ) then                      if not ( is_black_address ip port ) then
99                          if not ( Hashtbl.mem banned_ips ip) then                          if not ( Hashtbl.mem banned_ips ip) then
100                              Direct_address ( ip, port )                              Direct_address ( ip, port )
# Line 764  let rec query_id ip port id = Line 764  let rec query_id ip port id =
764    
765  (* TODO: check if we are connected to this server. If yes, issue a  (* TODO: check if we are connected to this server. If yes, issue a
766    query_id instead of a UDP packet *)    query_id instead of a UDP packet *)
767    if ip_reachable client_ip then    if Ip.reachable client_ip then
768      let module Q = DonkeyProtoUdp.QueryCallUdp in      let module Q = DonkeyProtoUdp.QueryCallUdp in
769  (*    lprintf "Ask connection from indirect client\n"; *)  (*    lprintf "Ask connection from indirect client\n"; *)
770    
# Line 1932  let read_first_message overnet m sock = Line 1932  let read_first_message overnet m sock =
1932              | None ->              | None ->
1933                  Invalid_address (!name, Md4.to_string t.CR.md4)                  Invalid_address (!name, Md4.to_string t.CR.md4)
1934              | Some (ip,port) ->              | Some (ip,port) ->
1935                  if Ip.valid ip && Ip.reachable ip then                  if Ip.usable ip then
1936                      Indirect_address (ip, port, id_of_ip t.CR.ip)                      Indirect_address (ip, port, id_of_ip t.CR.ip)
1937                  else                  else
1938                      Invalid_address (!name, Md4.to_string t.CR.md4)                      Invalid_address (!name, Md4.to_string t.CR.md4)
1939          else          else
1940          if Ip.valid t.CR.ip && Ip.reachable t.CR.ip then          if Ip.usable t.CR.ip then
1941              Direct_address (t.CR.ip, t.CR.port)              Direct_address (t.CR.ip, t.CR.port)
1942          else          else
1943              Invalid_address  (!name, Md4.to_string t.CR.md4)              Invalid_address  (!name, Md4.to_string t.CR.md4)
# Line 2334  let _ = Line 2334  let _ =
2334          | Invalid_address _ -> ()          | Invalid_address _ -> ()
2335          | Indirect_address (ip, port, id) ->          | Indirect_address (ip, port, id) ->
2336    
2337         if low_id ip && ip_reachable ip then         if low_id ip && Ip.reachable ip then
2338                query_id ip port id;                query_id ip port id;
2339    
2340                                        

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

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