[dhcp-agent-commits] dhcp-agent/src dhcp-conf.c,1.4,1.5 dhcp-libutil.h,1.13,1.14 dhcp-client-conf.c,
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2002-12-21 16:26:58
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv22285 Modified Files: dhcp-conf.c dhcp-libutil.h dhcp-client-conf.c Log Message: added ded more error messages Index: dhcp-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-conf.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dhcp-conf.c 18 Dec 2002 05:40:38 -0000 1.4 --- dhcp-conf.c 21 Dec 2002 16:26:56 -0000 1.5 *************** *** 526,527 **** --- 526,532 ---- return conf->directives; } + + int conf_get_line_no(conf_t *conf) + { + return parser_get_line_no(conf->parser); + } Index: dhcp-libutil.h =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-libutil.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** dhcp-libutil.h 19 Dec 2002 17:20:36 -0000 1.13 --- dhcp-libutil.h 21 Dec 2002 16:26:56 -0000 1.14 *************** *** 272,275 **** --- 272,276 ---- extern int conf_compile_directives(conf_t *conf); extern list_t *conf_get_directives(conf_t *conf); + extern int conf_get_line_no(conf_t *conf); /* constants. */ Index: dhcp-client-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-conf.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dhcp-client-conf.c 19 Dec 2002 06:50:59 -0000 1.10 --- dhcp-client-conf.c 21 Dec 2002 16:26:56 -0000 1.11 *************** *** 224,229 **** } ! if(i > MAX_OPTIONS_HANDLED) return 1; } --- 224,231 ---- } ! if(i > MAX_OPTIONS_HANDLED) { ! ERROR_MESSAGE("specified unknown option: %s", option_string); return 1; + } } *************** *** 291,294 **** --- 293,297 ---- if(conf_compile_directives(conf) == CONF_ERROR) { + ERROR_MESSAGE("error reading conf file: %s at line %s", cc->conf_file, conf_get_line_no(conf)); conf_destroy(conf); return 1; *************** *** 364,367 **** --- 367,371 ---- if(client_conf_set_variable(params, *var_symbol, var_value)) { + ERROR_MESSAGE("configuration: error unable to set variable %s to %s", var_strings[*var_symbol], var_value); return 1; } |