summaryrefslogtreecommitdiff
path: root/src/libstrongswan/database/database_factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/database/database_factory.c')
-rw-r--r--src/libstrongswan/database/database_factory.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstrongswan/database/database_factory.c b/src/libstrongswan/database/database_factory.c
index ef6927874..3936565a1 100644
--- a/src/libstrongswan/database/database_factory.c
+++ b/src/libstrongswan/database/database_factory.c
@@ -16,7 +16,7 @@
#include "database_factory.h"
#include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading/mutex.h>
typedef struct private_database_factory_t private_database_factory_t;
@@ -29,12 +29,12 @@ struct private_database_factory_t {
* public functions
*/
database_factory_t public;
-
+
/**
* list of registered database_t implementations
*/
linked_list_t *databases;
-
+
/**
* mutex to lock access to databases
*/
@@ -49,7 +49,7 @@ static database_t* create(private_database_factory_t *this, char *uri)
enumerator_t *enumerator;
database_t *database = NULL;
database_constructor_t create;
-
+
this->mutex->lock(this->mutex);
enumerator = this->databases->create_enumerator(this->databases);
while (enumerator->enumerate(enumerator, &create))
@@ -103,15 +103,15 @@ static void destroy(private_database_factory_t *this)
database_factory_t *database_factory_create()
{
private_database_factory_t *this = malloc_thing(private_database_factory_t);
-
+
this->public.create = (database_t*(*)(database_factory_t*, char *url))create;
this->public.add_database = (void(*)(database_factory_t*, database_constructor_t))add_database;
this->public.remove_database = (void(*)(database_factory_t*, database_constructor_t))remove_database;
this->public.destroy = (void(*)(database_factory_t*))destroy;
-
+
this->databases = linked_list_create();
this->mutex = mutex_create(MUTEX_TYPE_DEFAULT);
-
+
return &this->public;
}