[dhcp-agent-commits] dhcp-agent/src dhcp-client-conf.c,1.11,1.12 dhcp-conf.c,1.5,1.6
Status: Alpha
Brought to you by:
actmodern
From: <act...@us...> - 2002-12-21 17:06:27
|
Update of /cvsroot/dhcp-agent/dhcp-agent/src In directory sc8-pr-cvs1:/tmp/cvs-serv1626 Modified Files: dhcp-client-conf.c dhcp-conf.c Log Message: more error messages at conf parser level Index: dhcp-client-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-conf.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dhcp-client-conf.c 21 Dec 2002 16:26:56 -0000 1.11 --- dhcp-client-conf.c 21 Dec 2002 17:06:20 -0000 1.12 *************** *** 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; --- 293,297 ---- if(conf_compile_directives(conf) == CONF_ERROR) { ! ERROR_MESSAGE("error reading conf file: %s at line %d", cc->conf_file, conf_get_line_no(conf)); conf_destroy(conf); return 1; Index: dhcp-conf.c =================================================================== RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-conf.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dhcp-conf.c 21 Dec 2002 16:26:56 -0000 1.5 --- dhcp-conf.c 21 Dec 2002 17:06:20 -0000 1.6 *************** *** 209,212 **** --- 209,215 ---- } + if(identifier_symbol == NULL) + ERROR_MESSAGE("unknown identifier: %s\n", string); + return identifier_symbol; } *************** *** 240,243 **** --- 243,247 ---- } else { + ERROR_MESSAGE("unable to parse: %s into address", string); return NULL; } *************** *** 289,292 **** --- 293,297 ---- } else { + ERROR_MESSAGE("%s is not a boolean value as expected. legal boolean values are \"yes\" and \"no\""); bool_val = NULL; } *************** *** 327,331 **** if(string == NULL) { ! purge_list(string_list, NULL); return NULL; --- 332,337 ---- if(string == NULL) { ! ! ERROR_MESSAGE("no string list found at %d\n", conf_get_line_no(conf)); purge_list(string_list, NULL); return NULL; *************** *** 371,374 **** --- 377,381 ---- command->argument_symbols[i]); if(args == NULL) { + ERROR_MESSAGE("unable to compile directive at line %d\n", conf_get_line_no(conf)); directive_destroy(directive); return NULL; *************** *** 384,387 **** --- 391,395 ---- atom = get_next_atom_ignore_newlines(conf->parser); if(atom != PARSER_ATOM_SEMICOLON) { + ERROR_MESSAGE("semi colon terminator not present where expected at line: %d\n", conf_get_line_no(conf)); directive_destroy(directive); return NULL; |