summaryrefslogtreecommitdiff
path: root/src/manager/manager.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-07-09 21:02:41 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-07-09 21:02:41 +0000
commitdb67c87db3c9089ea8d2e14f617bf3d9e2af261f (patch)
tree665c0caea83d34c11c1517c4c57137bb58cba6fb /src/manager/manager.c
parent1c088a8b6237ec67f63c23f97a0f2dc4e99af869 (diff)
downloadvyos-strongswan-db67c87db3c9089ea8d2e14f617bf3d9e2af261f.tar.gz
vyos-strongswan-db67c87db3c9089ea8d2e14f617bf3d9e2af261f.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.4)
Diffstat (limited to 'src/manager/manager.c')
-rw-r--r--src/manager/manager.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/manager/manager.c b/src/manager/manager.c
index 39c8d995a..7d1b2adba 100644
--- a/src/manager/manager.c
+++ b/src/manager/manager.c
@@ -1,10 +1,3 @@
-/**
- * @file manager.c
- *
- * @brief Implementation of manager_t.
- *
- */
-
/*
* Copyright (C) 2007 Martin Willi
* Hochschule fuer Technik Rapperswil
@@ -18,6 +11,8 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
+ *
+ * $Id: manager.c 3589 2008-03-13 14:14:44Z martin $
*/
#include "manager.h"
@@ -39,9 +34,9 @@ struct private_manager_t {
manager_t public;
/**
- * underlying database
+ * underlying storage database
*/
- database_t *db;
+ storage_t *store;
/**
* user id, if we are logged in
@@ -59,7 +54,7 @@ struct private_manager_t {
*/
static enumerator_t* create_gateway_enumerator(private_manager_t *this)
{
- return this->db->create_gateway_enumerator(this->db, this->user);
+ return this->store->create_gateway_enumerator(this->store, this->user);
}
/**
@@ -77,7 +72,7 @@ static gateway_t* select_gateway(private_manager_t *this, int select_id)
if (this->gateway) this->gateway->destroy(this->gateway);
this->gateway = NULL;
- enumerator = this->db->create_gateway_enumerator(this->db, this->user);
+ enumerator = this->store->create_gateway_enumerator(this->store, this->user);
while (enumerator->enumerate(enumerator, &id, &name, &port, &address))
{
if (select_id == id)
@@ -117,7 +112,7 @@ static bool login(private_manager_t *this, char *username, char *password)
{
if (!this->user)
{
- this->user = this->db->login(this->db, username, password);
+ this->user = this->store->login(this->store, username, password);
}
return this->user != 0;
}
@@ -147,7 +142,7 @@ static void destroy(private_manager_t *this)
/*
* see header file
*/
-manager_t *manager_create(database_t *database)
+manager_t *manager_create(storage_t *storage)
{
private_manager_t *this = malloc_thing(private_manager_t);
@@ -159,7 +154,7 @@ manager_t *manager_create(database_t *database)
this->public.context.destroy = (void(*)(context_t*))destroy;
this->user = 0;
- this->db = database;
+ this->store = storage;
this->gateway = NULL;
return &this->public;