]> git.ipfire.org Git - thirdparty/strongswan.git/commit
unit-tests: Provide a wrapper around bus_t::add_listener and unregister them during...
authorTobias Brunner <tobias@strongswan.org>
Thu, 26 May 2016 14:57:31 +0000 (16:57 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 17 Jun 2016 16:48:04 +0000 (18:48 +0200)
commit5d10ef316da480a71720c5abe006f1c7066cd67f
tree80f213eba98f61f448b0eb000ffd49ad96c9a3f6
parentb7fac1d96ec266a6ebc99b8d4fb4cf9ee5b2e9e5
unit-tests: Provide a wrapper around bus_t::add_listener and unregister them during cleanup

In case listeners on the stack are triggered while cleaning up after a
test failed (e.g. via ike_sa_manager_t::flush) remaining listeners defined on
the stack would cause a segmentation fault.
src/libcharon/tests/utils/exchange_test_helper.c
src/libcharon/tests/utils/exchange_test_helper.h