pt-tls-client: Abort if no tnccs-manager is available
authorTobias Brunner <tobias@strongswan.org>
Wed, 4 Sep 2013 12:31:46 +0000 (14:31 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 11 Sep 2013 23:44:49 +0000 (01:44 +0200)
src/pt-tls-client/pt-tls-client.c

index a3328b5..4e108ad 100644 (file)
@@ -161,12 +161,19 @@ static void cleanup()
  */
 static void init()
 {
+       plugin_feature_t features[] = {
+               PLUGIN_NOOP,
+                       PLUGIN_PROVIDE(CUSTOM, "pt-tls-client"),
+                               PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"),
+       };
        library_init(NULL);
        libtnccs_init();
 
        dbg = dbg_pt_tls;
        options = options_create();
 
+       lib->plugins->add_static_features(lib->plugins, "pt-tls-client", features,
+                                                                         countof(features), TRUE);
        if (!lib->plugins->load(lib->plugins,
                        lib->settings->get_str(lib->settings, "pt-tls-client.load", PLUGINS)))
        {