Received: (qmail 11251 invoked by uid 2012); 21 Dec 1998 19:02:20 -0000 Message-Id: <19981221190220.11250.qmail@hyperreal.org> Date: 21 Dec 1998 19:02:20 -0000 From: Fabien COELHO Reply-To: coelho@cri.ensmp.fr To: apbugs@hyperreal.org Subject: [PATCH] a wrote a module to process macro which needs a fix in main/http_config.c X-Send-Pr-Version: 3.2 >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: closed >Class: change-request >Submitter-Id: apache >Arrival-Date: Mon Dec 21 11:10:00 PST 1998 >Last-Modified: Mon Dec 28 04:32:30 PST 1998 >Originator: coelho@cri.ensmp.fr >Organization: >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: State-Changed-From-To: open-closed State-Changed-By: martin State-Changed-When: Mon Dec 28 04:32:30 PST 1998 State-Changed-Why: Your proposal was taken into http_config.c as of rev. 1.138; I see no ill side effects, and I think modules can take advantage of the added flexibility of modifying the file name. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include 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! ]