Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 34500 invoked by uid 500); 1 Apr 2002 12:53:09 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 34489 invoked by uid 500); 1 Apr 2002 12:53:09 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 1 Apr 2002 12:53:09 -0000 Message-ID: <20020401125309.62584.qmail@icarus.apache.org> From: trawick@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server listen.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N trawick 02/04/01 04:53:09 Modified: . CHANGES server listen.c Log: Don't allow initialization to succeed if we can't get a socket corresponding to one of the Listen statements. Revision Changes Path 1.676 +5 -0 httpd-2.0/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.675 retrieving revision 1.676 diff -u -r1.675 -r1.676 --- CHANGES 1 Apr 2002 04:32:40 -0000 1.675 +++ CHANGES 1 Apr 2002 12:53:08 -0000 1.676 @@ -1,3 +1,8 @@ +Changes with Apache 2.0.35 + + *) Don't allow initialization to succeed if we can't get a socket + corresponding to one of the Listen statements. [Jeff Trawick] + Changes with Apache 2.0.34 *) Allow all Perchild directives to accept either numerical UID/GID 1.78 +6 -7 httpd-2.0/server/listen.c Index: listen.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/listen.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- listen.c 20 Mar 2002 07:03:07 -0000 1.77 +++ listen.c 1 Apr 2002 12:53:09 -0000 1.78 @@ -238,7 +238,7 @@ } -static void alloc_listener(process_rec *process, char *addr, apr_port_t port) +static const char *alloc_listener(process_rec *process, char *addr, apr_port_t port) { ap_listen_rec **walk; ap_listen_rec *new; @@ -278,7 +278,7 @@ *walk = new->next; new->next = ap_listeners; ap_listeners = new; - return; + return NULL; } } } @@ -292,7 +292,7 @@ ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool, "alloc_listener: failed to set up sockaddr for %s", addr); - return; + return "Listen setup failed"; } if ((status = apr_socket_create(&new->sd, new->bind_addr->family, @@ -300,11 +300,12 @@ != APR_SUCCESS) { ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool, "alloc_listener: failed to get a socket for %s", addr); - return; + return "Listen setup failed"; } new->next = ap_listeners; ap_listeners = new; + return NULL; } static int ap_listen_open(apr_pool_t *pool, apr_port_t port) @@ -401,9 +402,7 @@ return "Port must be specified"; } - alloc_listener(cmd->server->process, host, port); - - return NULL; + return alloc_listener(cmd->server->process, host, port); } const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg)