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/
_______________________________________________
Mldonkey-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/mldonkey-users