diff options
author | Tobias Brunner <tobias@strongswan.org> | 2010-05-04 18:13:27 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2010-06-15 19:58:58 +0200 |
commit | 51a00fb275d846c63402f84ffd47d899a59deaef (patch) | |
tree | 165640edd08a4da178cc62aa7e1e4b7ec2b4cd3b /src/libcharon/plugins/android/android_plugin.c | |
parent | 946be4d357e29494987687d093297e9fcc68b0ed (diff) | |
download | strongswan-51a00fb275d846c63402f84ffd47d899a59deaef.tar.bz2 strongswan-51a00fb275d846c63402f84ffd47d899a59deaef.tar.xz |
Adding an Android specific logger.
Diffstat (limited to 'src/libcharon/plugins/android/android_plugin.c')
-rw-r--r-- | src/libcharon/plugins/android/android_plugin.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/libcharon/plugins/android/android_plugin.c b/src/libcharon/plugins/android/android_plugin.c index 9a558f53b..7f6c20fa2 100644 --- a/src/libcharon/plugins/android/android_plugin.c +++ b/src/libcharon/plugins/android/android_plugin.c @@ -14,6 +14,7 @@ */ #include "android_plugin.h" +#include "android_logger.h" #include "android_handler.h" #include <hydra.h> @@ -32,16 +33,24 @@ struct private_android_plugin_t { android_plugin_t public; /** + * Android specific logger + */ + android_logger_t *logger; + + /** * Android specific DNS handler */ android_handler_t *handler; }; METHOD(plugin_t, destroy, void, - private_android_plugin_t *this) + private_android_plugin_t *this) { - hydra->attributes->remove_handler(hydra->attributes, &this->handler->handler); + hydra->attributes->remove_handler(hydra->attributes, + &this->handler->handler); + charon->bus->remove_listener(charon->bus, &this->logger->listener); this->handler->destroy(this->handler); + this->logger->destroy(this->logger); free(this); } @@ -56,9 +65,11 @@ plugin_t *android_plugin_create() .public.plugin = { .destroy = _destroy, }, + .logger = android_logger_create(), .handler = android_handler_create(), ); + charon->bus->add_listener(charon->bus, &this->logger->listener); hydra->attributes->add_handler(hydra->attributes, &this->handler->handler); return &this->public.plugin; |