fixed whitelist enabling
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 14 May 2011 15:09:45 +0000 (17:09 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 14 May 2011 15:09:45 +0000 (17:09 +0200)
src/libcharon/plugins/whitelist/whitelist_listener.c

index 6b9a574..5634e3e 100644 (file)
@@ -161,7 +161,8 @@ METHOD(whitelist_listener_t, flush, void,
 METHOD(whitelist_listener_t, set_active, void,
        private_whitelist_listener_t *this, bool enable)
 {
-       DBG1(DBG_CFG, "whitelist functionality %sabled", enable ? "en" : "dis");
+       DBG1(DBG_CFG, "whitelist functionality %s%sabled",
+               (this->enabled == enable) ? "was already " : "", enable ? "en" : "dis");
        this->enabled = enable;
 }
 
@@ -205,7 +206,7 @@ whitelist_listener_t *whitelist_listener_create()
                .ids = hashtable_create((hashtable_hash_t)hash,
                                                                (hashtable_equals_t)equals, 32),
                .enabled = lib->settings->get_bool(lib->settings,
-                                                               "charon.plugins.whitelist.enabled", FALSE),
+                                                               "charon.plugins.whitelist.enable", FALSE),
        );
 
        return &this->public;