From 51a00fb275d846c63402f84ffd47d899a59deaef Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 4 May 2010 18:13:27 +0200 Subject: Adding an Android specific logger. --- src/libcharon/plugins/android/android_plugin.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/libcharon/plugins/android/android_plugin.c') 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 @@ -31,6 +32,11 @@ struct private_android_plugin_t { */ android_plugin_t public; + /** + * Android specific logger + */ + android_logger_t *logger; + /** * Android specific DNS handler */ @@ -38,10 +44,13 @@ struct private_android_plugin_t { }; 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; -- cgit v1.2.3