diff options
author | Joe Orton <jorton@apache.org> | 2005-08-05 14:27:57 +0200 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2005-08-05 14:27:57 +0200 |
commit | 8b926122786b9bb44c7623434b20d6d106ad256e (patch) | |
tree | 726f610acc6636febbdbd93e9b2f2e027215524b /server/vhost.c | |
parent | * modules/ldap/util_ldap.c (util_ldap_post_config): Pass NULL to (diff) | |
download | apache2-8b926122786b9bb44c7623434b20d6d106ad256e.tar.xz apache2-8b926122786b9bb44c7623434b20d6d106ad256e.zip |
* server/vhost.c (get_addresses): Fail with an error message rather
than an assert() for errors which plague users on Solaris boxes which
don't have a properly configured resolver.
PR: 27525
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@230453 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r-- | server/vhost.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/vhost.c b/server/vhost.c index 6bb27bd80a..4e9162dbf0 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -182,12 +182,18 @@ static const char *get_addresses(apr_pool_t *p, const char *w_, if (strcmp(host, "*") == 0) { rv = apr_sockaddr_info_get(&my_addr, "0.0.0.0", APR_INET, port, 0, p); - ap_assert(rv == APR_SUCCESS); /* must be bug or out of storage */ + if (rv) { + return "Cannot not resolve address '0.0.0.0' -- " + "check resolver configuration."; + } } else if (strcasecmp(host, "_default_") == 0 || strcmp(host, "255.255.255.255") == 0) { rv = apr_sockaddr_info_get(&my_addr, "255.255.255.255", APR_INET, port, 0, p); - ap_assert(rv == APR_SUCCESS); /* must be bug or out of storage */ + if (rv) { + return "Cannot resolve address '255.255.255.255' -- " + "check resolver configuration."; + } } else { rv = apr_sockaddr_info_get(&my_addr, host, APR_UNSPEC, port, 0, p); |