summaryrefslogtreecommitdiff
path: root/src/manager/manager.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-02-23 10:42:46 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-02-23 10:42:46 +0000
commitde6b12502cdf42d5d92118f1c0e38dc31becf7c5 (patch)
tree0edac9c79f5a43e01913dd7f71c7abc487e5727b /src/manager/manager.c
parent172642669d4a23e17f1ed411fbc8629dcaa5fb46 (diff)
downloadvyos-strongswan-de6b12502cdf42d5d92118f1c0e38dc31becf7c5.tar.gz
vyos-strongswan-de6b12502cdf42d5d92118f1c0e38dc31becf7c5.zip
Updated to new upstream release. interfaces Patch is not from upstream.
Diffstat (limited to 'src/manager/manager.c')
-rw-r--r--src/manager/manager.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/manager/manager.c b/src/manager/manager.c
index 72f402a48..fb89c6b72 100644
--- a/src/manager/manager.c
+++ b/src/manager/manager.c
@@ -30,23 +30,23 @@ struct private_manager_t {
* public functions
*/
manager_t public;
-
+
/**
* underlying storage database
*/
storage_t *store;
-
+
/**
* user id, if we are logged in
*/
int user;
-
+
/**
* selected gateway
*/
gateway_t *gateway;
-};
-
+};
+
/**
* Implementation of manager_t.create_gateway_enumerator.
*/
@@ -66,10 +66,10 @@ static gateway_t* select_gateway(private_manager_t *this, int select_id)
int id, port;
char *name, *address;
host_t *host;
-
+
if (this->gateway) this->gateway->destroy(this->gateway);
this->gateway = NULL;
-
+
enumerator = this->store->create_gateway_enumerator(this->store, this->user);
while (enumerator->enumerate(enumerator, &id, &name, &port, &address))
{
@@ -143,18 +143,18 @@ static void destroy(private_manager_t *this)
manager_t *manager_create(storage_t *storage)
{
private_manager_t *this = malloc_thing(private_manager_t);
-
+
this->public.login = (bool(*)(manager_t*, char *username, char *password))login;
this->public.logged_in = (bool(*)(manager_t*))logged_in;
this->public.logout = (void(*)(manager_t*))logout;
this->public.create_gateway_enumerator = (enumerator_t*(*)(manager_t*))create_gateway_enumerator;
this->public.select_gateway = (gateway_t*(*)(manager_t*, int id))select_gateway;
this->public.context.destroy = (void(*)(context_t*))destroy;
-
+
this->user = 0;
this->store = storage;
this->gateway = NULL;
-
+
return &this->public;
}