diff options
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)) { |