aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-09-05 17:03:11 +0200
committerTobias Brunner <tobias@strongswan.org>2013-10-11 15:16:05 +0200
commit4b8b1354cea559844d7cbf2e460e90dab3655fad (patch)
tree90500c9e1b9dedf43b990710d8629be7a37b08f8
parentfad11d602dc6f969b9d2207a3d3c736fad418812 (diff)
downloadstrongswan-4b8b1354cea559844d7cbf2e460e90dab3655fad.tar.bz2
strongswan-4b8b1354cea559844d7cbf2e460e90dab3655fad.tar.xz
attr-sql: Don't use database transactions in create_attribute_enumerator
There could, of course, be race conditions when enumerating the attributes, but those probably don't matter (e.g. missing an attribute that was concurrently added). Transactions are more intended to revert multiple changes if anything fails in the process.
-rw-r--r--src/libhydra/plugins/attr_sql/sql_attribute.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/libhydra/plugins/attr_sql/sql_attribute.c b/src/libhydra/plugins/attr_sql/sql_attribute.c
index e91e1ed15..cad5bfae3 100644
--- a/src/libhydra/plugins/attr_sql/sql_attribute.c
+++ b/src/libhydra/plugins/attr_sql/sql_attribute.c
@@ -346,8 +346,6 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
u_int count;
char *name;
- this->db->execute(this->db, NULL, "BEGIN EXCLUSIVE TRANSACTION");
-
/* in a first step check for attributes that match name and id */
if (id)
{
@@ -418,8 +416,6 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
pool_enumerator->destroy(pool_enumerator);
}
- this->db->execute(this->db, NULL, "END TRANSACTION");
-
/* lastly try to find global attributes */
if (!attr_enumerator)
{
@@ -474,4 +470,3 @@ sql_attribute_t *sql_attribute_create(database_t *db)
DB_UINT, now);
return &this->public;
}
-