mirror of
https://github.com/sonertari/SSLproxy
synced 2024-11-13 13:10:37 +00:00
Return 2 to indicate the end of structured proxyspec, not 1
Return value of 1 is for ending macro expansion. Otherwise, it coincided with closing brace retval, which was wrongly breaking out of the while loop in load_proxyspec_struct(). TODO: Use enums for return values.
This commit is contained in:
parent
41dccaff14
commit
e4d27bee99
@ -4516,8 +4516,8 @@ set_proxyspec_option(proxyspec_t *spec, const char *argv0,
|
|||||||
fprintf(stderr, "Incomplete ProxySpec on line %d\n", line_num);
|
fprintf(stderr, "Incomplete ProxySpec on line %d\n", line_num);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// Return 1 to indicate the end of structured proxyspec
|
// Return 2 to indicate the end of structured proxyspec
|
||||||
return 1;
|
return 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return set_option(spec->opts, argv0, name, value, natengine, line_num, NULL);
|
return set_option(spec->opts, argv0, name, value, natengine, line_num, NULL);
|
||||||
@ -4667,7 +4667,7 @@ load_proxyspec_struct(global_t *global, const char *argv0, char **natengine, int
|
|||||||
}
|
}
|
||||||
if (retval == -1) {
|
if (retval == -1) {
|
||||||
goto leave;
|
goto leave;
|
||||||
} else if (retval == 1) {
|
} else if (retval == 2) {
|
||||||
closing_brace = 1;
|
closing_brace = 1;
|
||||||
}
|
}
|
||||||
free(line);
|
free(line);
|
||||||
|
Loading…
Reference in New Issue
Block a user