summaryrefslogtreecommitdiff
path: root/src/manager/controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager/controller')
-rw-r--r--src/manager/controller/auth_controller.c12
-rw-r--r--src/manager/controller/config_controller.c10
-rw-r--r--src/manager/controller/control_controller.c12
-rw-r--r--src/manager/controller/gateway_controller.c14
-rw-r--r--src/manager/controller/ikesa_controller.c10
5 files changed, 29 insertions, 29 deletions
diff --git a/src/manager/controller/auth_controller.c b/src/manager/controller/auth_controller.c
index 5f9c3b623..dd469cee4 100644
--- a/src/manager/controller/auth_controller.c
+++ b/src/manager/controller/auth_controller.c
@@ -30,7 +30,7 @@ struct private_auth_controller_t {
* public functions
*/
auth_controller_t public;
-
+
/**
* manager instance
*/
@@ -47,7 +47,7 @@ static void login(private_auth_controller_t *this, request_t *request)
static void check(private_auth_controller_t *this, request_t *request)
{
char *username, *password;
-
+
username = request->get_query_data(request, "username");
password = request->get_query_data(request, "password");
if (username && password &&
@@ -87,11 +87,11 @@ static void handle(private_auth_controller_t *this,
{
return login(this, request);
}
- else if (streq(action, "check"))
+ else if (streq(action, "check"))
{
return check(this, request);
}
- else if (streq(action, "logout"))
+ else if (streq(action, "logout"))
{
return logout(this, request);
}
@@ -117,9 +117,9 @@ controller_t *auth_controller_create(context_t *context, void *param)
this->public.controller.get_name = (char*(*)(controller_t*))get_name;
this->public.controller.handle = (void(*)(controller_t*,request_t*,char*,char*,char*,char*,char*))handle;
this->public.controller.destroy = (void(*)(controller_t*))destroy;
-
+
this->manager = (manager_t*)context;
-
+
return &this->public.controller;
}
diff --git a/src/manager/controller/config_controller.c b/src/manager/controller/config_controller.c
index dda2938a1..828a4ac97 100644
--- a/src/manager/controller/config_controller.c
+++ b/src/manager/controller/config_controller.c
@@ -33,7 +33,7 @@ struct private_config_controller_t {
* public functions
*/
config_controller_t public;
-
+
/**
* manager instance
*/
@@ -54,7 +54,7 @@ static void process_peerconfig(private_config_controller_t *this,
{
if (streq(name, "name"))
{
- config = value;
+ config = value;
}
else if (streq(name, "ikeconfig"))
{
@@ -80,7 +80,7 @@ static void process_peerconfig(private_config_controller_t *this,
if (streq(name, "childconfig"))
{
int num = 0;
-
+
e2 = xml->children(xml);
while (e2->enumerate(e2, &xml, &name, &value))
{
@@ -199,9 +199,9 @@ controller_t *config_controller_create(context_t *context, void *param)
this->public.controller.get_name = (char*(*)(controller_t*))get_name;
this->public.controller.handle = (void(*)(controller_t*,request_t*,char*,char*,char*,char*,char*))handle;
this->public.controller.destroy = (void(*)(controller_t*))destroy;
-
+
this->manager = (manager_t*)context;
-
+
return &this->public.controller;
}
diff --git a/src/manager/controller/control_controller.c b/src/manager/controller/control_controller.c
index c22591182..fdf66bf14 100644
--- a/src/manager/controller/control_controller.c
+++ b/src/manager/controller/control_controller.c
@@ -33,7 +33,7 @@ struct private_control_controller_t {
* public functions
*/
control_controller_t public;
-
+
/**
* manager instance
*/
@@ -50,7 +50,7 @@ static void handle_result(private_control_controller_t *this, request_t *r,
xml_t *xml;
char *name, *value;
int num = 0;
-
+
if (e)
{
while (e->enumerate(e, &xml, &name, &value))
@@ -113,7 +113,7 @@ static void terminate(private_control_controller_t *this, request_t *r,
{
gateway_t *gateway;
enumerator_t *e;
-
+
r->setf(r, "title=Terminate %s SA %d", ike ? "IKE" : "CHILD", id);
gateway = this->manager->select_gateway(this->manager, 0);
e = gateway->terminate(gateway, ike, id);
@@ -145,7 +145,7 @@ static void handle(private_control_controller_t *this,
if (action)
{
u_int32_t id;
-
+
if (streq(action, "terminateike"))
{
if (str && (id = atoi(str)))
@@ -196,9 +196,9 @@ controller_t *control_controller_create(context_t *context, void *param)
this->public.controller.get_name = (char*(*)(controller_t*))get_name;
this->public.controller.handle = (void(*)(controller_t*,request_t*,char*,char*,char*,char*,char*))handle;
this->public.controller.destroy = (void(*)(controller_t*))destroy;
-
+
this->manager = (manager_t*)context;
-
+
return &this->public.controller;
}
diff --git a/src/manager/controller/gateway_controller.c b/src/manager/controller/gateway_controller.c
index 164bf5921..9fca220e9 100644
--- a/src/manager/controller/gateway_controller.c
+++ b/src/manager/controller/gateway_controller.c
@@ -31,12 +31,12 @@ struct private_gateway_controller_t {
* public functions
*/
gateway_controller_t public;
-
+
/**
* manager instance
*/
manager_t *manager;
-
+
};
static void list(private_gateway_controller_t *this, request_t *request)
@@ -44,7 +44,7 @@ static void list(private_gateway_controller_t *this, request_t *request)
enumerator_t *enumerator;
char *name, *address;
int id, port;
-
+
enumerator = this->manager->create_gateway_enumerator(this->manager);
while (enumerator->enumerate(enumerator, &id, &name, &port, &address))
{
@@ -69,7 +69,7 @@ static void list(private_gateway_controller_t *this, request_t *request)
static void _select(private_gateway_controller_t *this, request_t *request)
{
char *id;
-
+
id = request->get_query_data(request, "gateway");
if (id)
{
@@ -106,7 +106,7 @@ static void handle(private_gateway_controller_t *this,
{
return list(this, request);
}
- else if (streq(action, "select"))
+ else if (streq(action, "select"))
{
return _select(this, request);
}
@@ -133,9 +133,9 @@ controller_t *gateway_controller_create(context_t *context, void *param)
this->public.controller.get_name = (char*(*)(controller_t*))get_name;
this->public.controller.handle = (void(*)(controller_t*,request_t*,char*,char*,char*,char*,char*))handle;
this->public.controller.destroy = (void(*)(controller_t*))destroy;
-
+
this->manager = (manager_t*)context;
-
+
return &this->public.controller;
}
diff --git a/src/manager/controller/ikesa_controller.c b/src/manager/controller/ikesa_controller.c
index c35ff42e6..afa4a67f8 100644
--- a/src/manager/controller/ikesa_controller.c
+++ b/src/manager/controller/ikesa_controller.c
@@ -33,7 +33,7 @@ struct private_ikesa_controller_t {
* public functions
*/
ikesa_controller_t public;
-
+
/**
* manager instance
*/
@@ -50,7 +50,7 @@ static void process_childsa(private_ikesa_controller_t *this, char *id,
enumerator_t *e1, *e2;
char *name, *value, *reqid = "", *section = "";
int num = 0;
-
+
while (e->enumerate(e, &xml, &name, &value))
{
if (streq(name, "reqid"))
@@ -106,7 +106,7 @@ static void process_ikesa(private_ikesa_controller_t *this,
{
if (streq(name, "id"))
{
- id = value;
+ id = value;
}
else if (streq(name, "local") || streq(name, "remote"))
{
@@ -223,9 +223,9 @@ controller_t *ikesa_controller_create(context_t *context, void *param)
this->public.controller.get_name = (char*(*)(controller_t*))get_name;
this->public.controller.handle = (void(*)(controller_t*,request_t*,char*,char*,char*,char*,char*))handle;
this->public.controller.destroy = (void(*)(controller_t*))destroy;
-
+
this->manager = (manager_t*)context;
-
+
return &this->public.controller;
}