Clean up properly when we can't find a radius $INCLUDE regardless of the
state of errno. Don't treat it as a fatal parse error because it isn't, so we keep parsing the rest of the dictionaries even if one is missing. svn path=/trunk/; revision=45361
This commit is contained in:
parent
0c966e603e
commit
29fa1e7835
|
@ -265,12 +265,18 @@
|
||||||
|
|
||||||
if (!yyin) {
|
if (!yyin) {
|
||||||
if (errno) {
|
if (errno) {
|
||||||
g_string_append_printf(error, "Could not open file: '%s', error: %s\n", fullpaths[include_stack_ptr], g_strerror(errno) );
|
g_string_append_printf(error,
|
||||||
g_free(fullpaths[include_stack_ptr]);
|
"Could not open file: '%s', error: %s\n",
|
||||||
fullpaths[include_stack_ptr] = NULL;
|
fullpaths[include_stack_ptr],
|
||||||
include_stack_ptr--;
|
g_strerror(errno) );
|
||||||
yyterminate();
|
} else {
|
||||||
|
g_string_append_printf(error,
|
||||||
|
"Could not open file: '%s', no errno\n",
|
||||||
|
fullpaths[include_stack_ptr]);
|
||||||
}
|
}
|
||||||
|
g_free(fullpaths[include_stack_ptr]);
|
||||||
|
fullpaths[include_stack_ptr] = NULL;
|
||||||
|
include_stack_ptr--;
|
||||||
} else {
|
} else {
|
||||||
linenums[include_stack_ptr] = 1;
|
linenums[include_stack_ptr] = 1;
|
||||||
yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE ) );
|
yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE ) );
|
||||||
|
|
Loading…
Reference in New Issue