You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2005/08/05 14:28:00 UTC

svn commit: r230453 - /httpd/httpd/trunk/server/vhost.c

Author: jorton
Date: Fri Aug  5 05:27:57 2005
New Revision: 230453

URL: http://svn.apache.org/viewcvs?rev=230453&view=rev
Log:
* 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

Modified:
    httpd/httpd/trunk/server/vhost.c

Modified: httpd/httpd/trunk/server/vhost.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/vhost.c?rev=230453&r1=230452&r2=230453&view=diff
==============================================================================
--- httpd/httpd/trunk/server/vhost.c (original)
+++ httpd/httpd/trunk/server/vhost.c Fri Aug  5 05:27:57 2005
@@ -182,12 +182,18 @@
 
     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);



Re: svn commit: r230453 - /httpd/httpd/trunk/server/vhost.c

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Aug 05, 2005 at 09:40:23AM -0400, Joshua Slive wrote:
> 
> 
> jorton@apache.org wrote:
> 
> >+            return "Cannot not resolve address '0.0.0.0' -- "
> 
> double negative

Ha, I started off with "Could not"... but then changed it when I saw it 
was inconsistent with the other error :) Thanks, fixed.

joe

Re: svn commit: r230453 - /httpd/httpd/trunk/server/vhost.c

Posted by Joshua Slive <jo...@slive.ca>.

jorton@apache.org wrote:

> +            return "Cannot not resolve address '0.0.0.0' -- "

double negative

Joshua.