mldonkey-users
[Top][All Lists]
Advanced

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

[Mldonkey-users] [patch #4776] EDK: Avoid LowID if max_indirect_connecti


From: z
Subject: [Mldonkey-users] [patch #4776] EDK: Avoid LowID if max_indirect_connections is reached
Date: Mon, 9 Jan 2006 02:24:18 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Follow-up Comment #3, patch #4776 (project mldonkey):

If servers are always in the "Connecting" state when performing
callbacks you can add to/remove from a new 
"connecting_server_ips" list in "set_server_state".  
I believe that checking this small list would be quick.

ie:

let connecting_servers = ref []

let set_server_state s state =
...
  if state = Connecting then (AddIpToList) else (removeIpFromList)
...

let rec matches_3 l (a,b,c,d) =
    match l with
      [] -> false
      | (x,y,z,_) :: _ when x=a && y=b && c=z -> true
      | _ :: t -> f t (a,b,c,d)

if matches_3 !connecting_server_ips ip ...

Or whatever you think is best.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?func=detailitem&item_id=4776>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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