httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apache-1.3/src/main http_core.c
Date Sun, 17 Nov 2002 22:29:15 GMT
jerenkrantz    2002/11/17 14:29:15

  Modified:    src      CHANGES
               src/main http_core.c
  Log:
  If Listen directive is not a port, but just an IP, emit an error condition as
  this case is ambiguous.  ('Listen 127.0.0.1' doesn't make any sense.)
  
  (Rich came up with the problem.  Cliff came up with the error text.  Justin
   did the ap_strtol call.)
  
  Reviewed by:	Cliff Woolley, Rich Bowen
  
  Revision  Changes    Path
  1.1862    +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1861
  retrieving revision 1.1862
  diff -u -u -r1.1861 -r1.1862
  --- CHANGES	12 Nov 2002 22:44:05 -0000	1.1861
  +++ CHANGES	17 Nov 2002 22:29:14 -0000	1.1862
  @@ -1,4 +1,9 @@
   Changes with Apache 1.3.28
  +
  +  *) If Listen directive is not a port, but just an IP, emit an
  +     error condition as this case is ambiguous.
  +     [Rich Bowen, Justin Erenkrantz, Cliff Woolley]
  +
     *) Update timeout algorithm in free_proc_chain. If a subprocess
        did not exit immediately, the thread would sleep for 3 seconds
        before checking the subprocess exit status again. In a very
  
  
  
  1.319     +4 -4      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.318
  retrieving revision 1.319
  diff -u -u -r1.318 -r1.319
  --- http_core.c	30 Sep 2002 16:35:21 -0000	1.318
  +++ http_core.c	17 Nov 2002 22:29:14 -0000	1.319
  @@ -2596,7 +2596,7 @@
   static const char *set_listener(cmd_parms *cmd, void *dummy, char *ips)
   {
       listen_rec *new;
  -    char *ports;
  +    char *ports, *endptr;
       unsigned short port;
       
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  @@ -2626,9 +2626,9 @@
       else {
   	new->local_addr.sin_addr.s_addr = ap_get_virthost_addr(ips, NULL);
       }
  -    port = atoi(ports);
  -    if (!port) {
  -	return "Port must be numeric";
  +    port = ap_strtol(ports, &endptr, 10);
  +    if (errno || (endptr && *endptr) || !port) {
  +	return "Missing or non-numeric port";
       }
       new->local_addr.sin_port = htons(port);
       new->fd = -1;
  
  
  

Mime
View raw message