diff options
author | René Mayrhofer <rene@mayrhofer.eu.org> | 2011-03-05 09:29:19 +0100 |
---|---|---|
committer | René Mayrhofer <rene@mayrhofer.eu.org> | 2011-03-05 09:29:19 +0100 |
commit | 365e71f706b40c32173fa06c6feaac48c1527520 (patch) | |
tree | 54fa72a914d18c9430eaa54f3de4a2d4419198af /src/libstrongswan/plugins/mysql/mysql_database.c | |
parent | 5d7669b7b3563c50b3c86903e0a49373d597b8a0 (diff) | |
parent | 568905f488e63e28778f87ac0e38d845f45bae79 (diff) | |
download | vyos-strongswan-365e71f706b40c32173fa06c6feaac48c1527520.tar.gz vyos-strongswan-365e71f706b40c32173fa06c6feaac48c1527520.zip |
Fixed merge, don't know why this didn't happen automatically - maybe a leftover from the svn->git conversion
Diffstat (limited to 'src/libstrongswan/plugins/mysql/mysql_database.c')
-rw-r--r-- | src/libstrongswan/plugins/mysql/mysql_database.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/mysql/mysql_database.c b/src/libstrongswan/plugins/mysql/mysql_database.c index 8005b9149..0b9f8285d 100644 --- a/src/libstrongswan/plugins/mysql/mysql_database.c +++ b/src/libstrongswan/plugins/mysql/mysql_database.c @@ -474,10 +474,15 @@ static bool mysql_enumerator_enumerate(mysql_enumerator_t *this, ...) return TRUE; } +<<<<<<< HEAD /** * Implementation of database_t.query. */ static enumerator_t* query(private_mysql_database_t *this, char *sql, ...) +======= +METHOD(database_t, query, enumerator_t*, + private_mysql_database_t *this, char *sql, ...) +>>>>>>> upstream/4.5.1 { MYSQL_STMT *stmt; va_list args; @@ -563,10 +568,15 @@ static enumerator_t* query(private_mysql_database_t *this, char *sql, ...) return (enumerator_t*)enumerator; } +<<<<<<< HEAD /** * Implementation of database_t.execute. */ static int execute(private_mysql_database_t *this, int *rowid, char *sql, ...) +======= +METHOD(database_t, execute, int, + private_mysql_database_t *this, int *rowid, char *sql, ...) +>>>>>>> upstream/4.5.1 { MYSQL_STMT *stmt; va_list args; @@ -594,18 +604,28 @@ static int execute(private_mysql_database_t *this, int *rowid, char *sql, ...) return affected; } +<<<<<<< HEAD /** * Implementation of database_t.get_driver */ static db_driver_t get_driver(private_mysql_database_t *this) +======= +METHOD(database_t, get_driver,db_driver_t, + private_mysql_database_t *this) +>>>>>>> upstream/4.5.1 { return DB_MYSQL; } +<<<<<<< HEAD /** * Implementation of database_t.destroy */ static void destroy(private_mysql_database_t *this) +======= +METHOD(database_t, destroy, void, + private_mysql_database_t *this) +>>>>>>> upstream/4.5.1 { this->pool->destroy_function(this->pool, (void*)conn_destroy); this->mutex->destroy(this->mutex); @@ -677,12 +697,25 @@ mysql_database_t *mysql_database_create(char *uri) return NULL; } +<<<<<<< HEAD this = malloc_thing(private_mysql_database_t); this->public.db.query = (enumerator_t* (*)(database_t *this, char *sql, ...))query; this->public.db.execute = (int (*)(database_t *this, int *rowid, char *sql, ...))execute; this->public.db.get_driver = (db_driver_t(*)(database_t*))get_driver; this->public.db.destroy = (void(*)(database_t*))destroy; +======= + INIT(this, + .public = { + .db = { + .query = _query, + .execute = _execute, + .get_driver = _get_driver, + .destroy = _destroy, + }, + }, + ); +>>>>>>> upstream/4.5.1 if (!parse_uri(this, uri)) { |