| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Include some more basic system headers in utils.h, so we can use that common
header on the different platforms.
|
|
|
|
|
| |
With the strongTNC REST API some errors will actually be accompanied by
a response we want to receive completely.
|
|
|
|
|
| |
Without synchronization threads could get canceled before they could
disable their cancelability.
|
| |
|
|
|
|
|
|
| |
Because CURLOPT_FAILONERROR is enabled in the curl plugin an error code
will often (not always) cause the client to close the TCP connection
before the server has written the complete response.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases the main thread is not ready to immediately call siglongjmp(),
e.g. if it currently holds a mutex that is later required during
shutdown.
Therefore, we delay handling errors in worker threads until the main
thread performs the next check itself (or the test function ends).
The same issue remains with SIGALRM.
|
|
|
|
|
|
| |
When running the tests in GDB the working directory apparently is
different. With the relative path used previously the plugins would not
be found and those installed on the system would get used.
|
|
|
|
| |
The file can still be read by root even if nobody has read privileges.
|
|
|
|
|
|
|
|
|
|
|
| |
Handling the result for enum_from_name() is difficult, as checking for
negative return values requires a cast if the enum type is unsigned. The new
signature clearly differentiates lookup result from lookup value.
Further, this actually allows to convert real -1 enum values, which could not
be distinguished from "not-found" and the -1 return value.
This also fixes several clang warnings where enums are unsigned.
|
|
|
|
|
| |
To allow enum.h to depend on utils.h definitions, avoid its direct inclusion.
Instead include utils.h, which includes enum.h as well.
|
|
|
|
| |
Fixes a clang warning.
|
|
|
|
|
|
| |
These definitions are directly derived from the RFC, so it should be safe
to cast them. clang complains about the different types, so cast them
explicitly.
|
| |
|
|
|
|
|
|
| |
The AES code historically has different build options for various size/speed
trade-offs. We never made use of them, so just drop the obsolete code. The code
now has four hard-coded fixed tables, both inverse and original.
|
|
|
|
|
|
| |
Found due to %option nodefault. A match for } was actually missing
and # was not properly matched if it was part of an include statement
on the last line of a file that did not end with a newline.
|
|
|
|
|
| |
This was useful during development, but we accept that matching \n together
with %option yylineno impacts performance.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
With Bison 3.x support for YYLEX_PARAM has been removed and %lex-param
should be used. Unfortunately, that option does not take expressions.
Instead we use a wrapper function that calls the lexer with the proper
scanner object, which should also be backward compatible to older Bison
versions.
|
|
|
|
|
| |
Newer Bison versions declare the parser function in the header, which
requires custom types.
|
|
|
|
| |
Basically reintroducing 2a38b4556e9fd8102bd6c6c61f2893599a5e8e51.
|
| |
|
|
|
|
|
| |
Instead of removing and caching all values of a previous config, we only
do this for actually removed sections/settings.
|
| |
|
|
|
|
|
|
|
| |
This is not thread safe. If threads are reading from pointers to existing
values they could get a partially updated invalid value.
Refactored assignment to a separate function.
|
| |
|
|
|
|
|
| |
Empty settings are now ignored, strings are supported, newlines are
handled properly (e.g. at the end of files) etc.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This parser features several improvements over the existing one.
For instance, quoted strings (with escape sequences), unlimited includes,
relaxed newline handling (e.g. at the end of files or before/after { and }),
and the difference between empty and unset values (key = vs. key = "").
It also complains a lot more about invalid syntax. The current one accepts
pretty odd stuff (like settings or sections without name) without any
errors or warnings.
|
|
|
|
| |
This allows us to use them in the upcoming parser.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enumerator is a wrapper around glob(3). If that function is not
supported NULL is returned. If no files match or an error occurs during
the pattern expansion an error is logged and the enumerator simply returns
no items.
RFC: if GLOB_ERR is not supplied glob returns GLOB_NOMATCH if e.g. the
base directory of the pattern does not exist, which would otherwise
result in an error. This way there is at least a clear error message in
case of a typo.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
During shutdown, waiting for callbacks might never complete, as queued
callbacks might not get executed under certain conditions. Not the clean fix,
but works good enough for now.
Seen on Windows in vici tests.
|
|
|
|
|
|
|
|
|
| |
While we don't add FDs with an active callback to the watched FDSET, we still
can get notifications for callbacks active due the asynchronous processing
of the same.
To avoid queue multiple callbacks, we check for queued callbacks before
activating new ones.
|
|
|
|
|
| |
During shutdown, cancel queued jobs earlier to avoid having cleanup functions
accessing infrastructure not available anymore, for example watcher.
|
|
|
|
|
|
| |
Using the same mechanism as the METHOD macro, the CALLBACK macro defines
a hybrid function signature. It strictly uses a weak void* for the first
function parameter, in contrast to the dynamic METHOD object "this" type.
|
|
|
|
|
|
|
|
|
|
|
| |
This solves a problem with GNAT when compiling charon-tkm as __atomic*
built-ins are only provided in GCC 4.7 and newer.
Currently GNAT 4.6 and GCC 4.7.2 is shipped with Debian wheezy (stable),
as used in the testing environment. So while the configure script correctly
detected the __atomic* built-ins, and defined HAVE_GCC_ATOMIC_OPERATIONS,
this define turned out to be incorrect when charon-tkm was later built
with GNAT.
|