Fixed initialization of android plugin.
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Oct 2011 13:44:24 +0000 (15:44 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 11 Oct 2011 14:30:20 +0000 (16:30 +0200)
src/libcharon/plugins/android/android_plugin.c

index b23c943..091f34a 100644 (file)
@@ -95,13 +95,13 @@ plugin_t *android_plugin_create()
                .creds = android_creds_create(),
        );
 
+       this->service = android_service_create(this->creds);
+       this->handler = android_handler_create(this->service != NULL);
+
        charon->bus->add_listener(charon->bus, &this->logger->listener);
        lib->credmgr->add_set(lib->credmgr, &this->creds->set);
        hydra->attributes->add_handler(hydra->attributes, &this->handler->handler);
 
-       this->service = android_service_create(this->creds);
-       this->handler = android_handler_create(this->service != NULL);
-
        return &this->public.plugin;
 }