move SQL-based pool functionality to new attr-sql libstrongswan plugin

This commit is contained in:
Andreas Steffen
2009-10-13 17:02:29 +02:00
parent 4c8bb47abd
commit 247794827e
20 changed files with 245 additions and 45 deletions
-10
View File
@@ -18,7 +18,6 @@
#include <daemon.h>
#include "sql_config.h"
#include "sql_cred.h"
#include "sql_attribute.h"
#include "sql_logger.h"
typedef struct private_sql_plugin_t private_sql_plugin_t;
@@ -48,11 +47,6 @@ struct private_sql_plugin_t {
*/
sql_cred_t *cred;
/**
* CFG attributes
*/
sql_attribute_t *attribute;
/**
* bus listener/logger
*/
@@ -67,10 +61,8 @@ static void destroy(private_sql_plugin_t *this)
charon->backends->remove_backend(charon->backends, &this->config->backend);
charon->credentials->remove_set(charon->credentials, &this->cred->set);
charon->bus->remove_listener(charon->bus, &this->logger->listener);
lib->attributes->remove_provider(lib->attributes, &this->attribute->provider);
this->config->destroy(this->config);
this->cred->destroy(this->cred);
this->attribute->destroy(this->attribute);
this->logger->destroy(this->logger);
this->db->destroy(this->db);
free(this);
@@ -104,10 +96,8 @@ plugin_t *plugin_create()
}
this->config = sql_config_create(this->db);
this->cred = sql_cred_create(this->db);
this->attribute = sql_attribute_create(this->db);
this->logger = sql_logger_create(this->db);
lib->attributes->add_provider(lib->attributes, &this->attribute->provider);
charon->backends->add_backend(charon->backends, &this->config->backend);
charon->credentials->add_set(charon->credentials, &this->cred->set);
charon->bus->add_listener(charon->bus, &this->logger->listener);