2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

1202. [func] New functions: cfg_obj_line() and cfg_obj_file().

This should allow duplicate reports to identify the location of both objects.
This commit is contained in:
Mark Andrews
2002-02-13 03:32:56 +00:00
parent 4014b6a8ae
commit de36c606c5
3 changed files with 27 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
1202. [func] New functions: cfg_obj_line() and cfg_obj_file().
1201. [bug] Require that if 'callbacks' is passed to
dns_rdata_fromtext(), callbacks->error and
callbacks->warn are initalised.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cfg.h,v 1.31 2002/01/04 02:32:14 gson Exp $ */
/* $Id: cfg.h,v 1.32 2002/02/13 03:32:56 marka Exp $ */
#ifndef ISCCFG_CFG_H
#define ISCCFG_CFG_H 1
@@ -397,6 +397,19 @@ cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
* with the file name(s) and line number where 'obj' was defined.
*/
const char *
cfg_obj_file(cfg_obj_t *obj);
/*
* Return the file that defined this object.
*/
unsigned int
cfg_obj_line(cfg_obj_t *obj);
/*
* Return the line in file where this object was defined.
*/
ISC_LANG_ENDDECLS
#endif /* ISCCFG_CFG_H */

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.100 2002/02/01 02:33:26 gson Exp $ */
/* $Id: parser.c,v 1.101 2002/02/13 03:32:53 marka Exp $ */
#include <config.h>
@@ -2139,6 +2139,16 @@ cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...) {
va_end(ap);
}
const char *
cfg_obj_file(cfg_obj_t *obj) {
return (obj->file);
}
unsigned int
cfg_obj_line(cfg_obj_t *obj) {
return (obj->line);
}
isc_result_t
cfg_create_obj(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
cfg_obj_t *obj;