You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Fabien COELHO <co...@cri.ensmp.fr> on 1998/12/21 20:02:20 UTC

general/3573: [PATCH] a wrote a module to process macro which needs a fix in main/http_config.c

>Number:         3573
>Category:       general
>Synopsis:       [PATCH] a wrote a module to process macro which needs a fix in main/http_config.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Mon Dec 21 11:10:00 PST 1998
>Last-Modified:
>Originator:     coelho@cri.ensmp.fr
>Organization:
apache
>Release:        1.3.3
>Environment:
any.
>Description:
In src/main/http_config.c the following path would help me a lot
to make my error messages look right. 
 
The issue is the following: I'm implementing and testing a macro
processing module for apache. As I could not undertand all implicit
subtilities in cmd_parms, and in order to make macros as soft and general
as possible, I update gracefully the config_file of cmd_parms when 
macros are encountered and expanded. In order to have error message,
I kind of update the name field to "in macro this defined there and used
there else" but the new name is ignored on syntax error, and the message
is wrong. 
 
With the following patch it is not ignored anymore. It uses the new name
instead of the cached fname, and error messages are okay to me. It does
not change anything to apache since it is usually the same pointer.
 
>How-To-Repeat:

>Fix:
*** http_config-old.c   Mon Dec 21 14:34:28 1998
--- http_config.c       Mon Dec 21 14:34:52 1998
***************
*** 1188,1194 ****
  
      if (errmsg) {
        fprintf(stderr, "Syntax error on line %d of %s:\n",
!               parms.config_file->line_number, fname);
        fprintf(stderr, "%s\n", errmsg);
        exit(1);
      }
--- 1188,1194 ----
  
      if (errmsg) {
        fprintf(stderr, "Syntax error on line %d of %s:\n",
!               parms.config_file->line_number, parms.config_file->name);
        fprintf(stderr, "%s\n", errmsg);
        exit(1);
      }
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]