diff --git a/src/ChangeLog b/src/ChangeLog index cdbc66f9..a5f15ff9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-11-18 Hrvoje Niksic + + * host.c (address_list_contains): Renamed address_list_find to + address_list_contains because its result is boolean. + 2003-11-18 Hrvoje Niksic * connect.c (select_fd): Return 1 if select is not available. diff --git a/src/host.c b/src/host.c index 008c02a2..bbf90ff8 100644 --- a/src/host.c +++ b/src/host.c @@ -113,10 +113,10 @@ address_list_address_at (const struct address_list *al, int pos) return al->addresses + pos; } -/* Return 1 if IP is one of the addresses in AL. */ +/* Return non-zero if AL contains IP, zero otherwise. */ int -address_list_find (const struct address_list *al, const ip_address *ip) +address_list_contains (const struct address_list *al, const ip_address *ip) { int i; switch (ip->type) @@ -149,7 +149,7 @@ address_list_find (const struct address_list *al, const ip_address *ip) #endif /* ENABLE_IPV6 */ default: abort (); - return 1; + return 0; } } diff --git a/src/host.h b/src/host.h index 4f37d2fe..abe086b9 100644 --- a/src/host.h +++ b/src/host.h @@ -101,7 +101,7 @@ void address_list_get_bounds PARAMS ((const struct address_list *, int *, int *)); const ip_address *address_list_address_at PARAMS ((const struct address_list *, int)); -int address_list_find PARAMS ((const struct address_list *, const ip_address *)); +int address_list_contains PARAMS ((const struct address_list *, const ip_address *)); void address_list_set_faulty PARAMS ((struct address_list *, int)); void address_list_set_connected PARAMS ((struct address_list *)); int address_list_connected_p PARAMS ((const struct address_list *)); diff --git a/src/http.c b/src/http.c index d594e850..908e4aeb 100644 --- a/src/http.c +++ b/src/http.c @@ -474,7 +474,7 @@ persistent_available_p (const char *host, int port, int ssl, return 0; } - found = address_list_find (al, &ip); + found = address_list_contains (al, &ip); address_list_release (al); if (!found) @@ -586,9 +586,7 @@ time_t http_atotm PARAMS ((const char *)); will print it if there is enough information to do so (almost always), returning the error to the caller (i.e. http_loop). - Various HTTP parameters are stored to hs. Although it parses the - response code correctly, it is not used in a sane way. The caller - can do that, though. + Various HTTP parameters are stored to hs. If PROXY is non-NULL, the connection will be made to the proxy server, and u->url will be requested. */