httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@hyperreal.org
Subject cvs commit: apachen/src/main http_config.c
Date Thu, 06 Nov 1997 20:40:43 GMT
coar        97/11/06 12:40:43

  Modified:    src/main http_config.c
  Log:
  	Set errno to something reasonable when reporting an invalid
  	directive.
  
  Reviewed by:	Dean Gaudet, Jim Jagielski, Martin Kraemer
  
  Revision  Changes    Path
  1.85      +8 -4      apachen/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_config.c,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- http_config.c	1997/10/26 20:19:37	1.84
  +++ http_config.c	1997/11/06 20:40:42	1.85
  @@ -803,7 +803,9 @@
   
       do {
   	if (!(cmd = find_command_in_modules(cmd_name, &mod))) {
  -	    return pstrcat(parms->pool, "Invalid command ", cmd_name, NULL);
  +            errno = EINVAL;
  +            return pstrcat(parms->pool, "Invalid command '", cmd_name, "'",
  +                           NULL);
   	}
   	else {
   	    void *mconfig = get_module_config(config, mod);
  @@ -835,9 +837,10 @@
   
       while (!(cfg_getline(l, MAX_STRING_LEN, parms->config_file))) {
   	const char *errmsg = handle_command(parms, config, l);
  -	if (errmsg)
  +        if (errmsg) {
   	    return errmsg;
       }
  +    }
   
       return NULL;
   }
  @@ -980,8 +983,9 @@
   	cfg_closefile(f);
   
   	if (errmsg) {
  -	    aplog_error(APLOG_MARK, APLOG_ALERT, r->server, "%s: %s", filename, errmsg);
  -	    return SERVER_ERROR;
  +            aplog_error(APLOG_MARK, APLOG_ALERT, r->server, "%s: %s",
  +                        filename, errmsg);
  +            return HTTP_INTERNAL_SERVER_ERROR;
   	}
   
   	*result = dc;
  
  
  

Mime
View raw message