From 81c63b0eed39432878f78727f60a1e7499645199 Mon Sep 17 00:00:00 2001 From: Yves-Alexis Perez Date: Fri, 11 Jul 2014 07:23:31 +0200 Subject: Imported Upstream version 5.2.0 --- src/libstrongswan/plugins/sqlite/sqlite_database.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/libstrongswan/plugins/sqlite/sqlite_database.c') diff --git a/src/libstrongswan/plugins/sqlite/sqlite_database.c b/src/libstrongswan/plugins/sqlite/sqlite_database.c index 7b4767855..ec1ca1404 100644 --- a/src/libstrongswan/plugins/sqlite/sqlite_database.c +++ b/src/libstrongswan/plugins/sqlite/sqlite_database.c @@ -101,13 +101,15 @@ static sqlite3_stmt* run(private_sqlite_database_t *this, char *sql, case DB_TEXT: { const char *text = va_arg(*args, const char*); - res = sqlite3_bind_text(stmt, i, text, -1, SQLITE_STATIC); + res = sqlite3_bind_text(stmt, i, text, -1, + SQLITE_TRANSIENT); break; } case DB_BLOB: { chunk_t c = va_arg(*args, chunk_t); - res = sqlite3_bind_blob(stmt, i, c.ptr, c.len, SQLITE_STATIC); + res = sqlite3_bind_blob(stmt, i, c.ptr, c.len, + SQLITE_TRANSIENT); break; } case DB_DOUBLE: @@ -365,7 +367,7 @@ static bool finalize_transaction(private_sqlite_database_t *this, return TRUE; } -METHOD(database_t, commit, bool, +METHOD(database_t, commit_, bool, private_sqlite_database_t *this) { return finalize_transaction(this, FALSE); @@ -429,7 +431,7 @@ sqlite_database_t *sqlite_database_create(char *uri) .query = _query, .execute = _execute, .transaction = _transaction, - .commit = _commit, + .commit = _commit_, .rollback = _rollback, .get_driver = _get_driver, .destroy = _destroy, -- cgit v1.2.3