Skip to content
Snippets Groups Projects
Commit 55dc0189 authored by Danny Auble's avatar Danny Auble
Browse files

moved definitions for connections to here instead of in the accounting plugin for use elsewhere

parent c9ea9101
No related branches found
No related tags found
No related merge requests found
......@@ -36,4 +36,3 @@ libslurm_pgsql_la_LDFLAGS = $(LIB_LDFLAGS)
libslurm_mysql_la_CFLAGS = $(MYSQL_CFLAGS)
libslurm_pgsql_la_CFLAGS = $(PGSQL_CFLAGS)
......@@ -56,10 +56,19 @@
#include "src/common/list.h"
#include "src/common/xstring.h"
#ifdef HAVE_MYSQL
#ifndef HAVE_MYSQL
typedef void mysql_conn_t;
#else
#include <mysql.h>
#include <mysqld_error.h>
typedef struct {
MYSQL *db_conn;
bool rollback;
List update_list;
int conn;
} mysql_conn_t;
typedef struct {
uint32_t port;
char *host;
......
......@@ -56,9 +56,18 @@
#include "src/slurmctld/slurmctld.h"
#include "src/common/xstring.h"
#ifdef HAVE_PGSQL
#ifndef HAVE_PGSQL
typedef void pgsql_conn_t;
#else
#include <libpq-fe.h>
typedef struct {
PGconn *db_conn;
bool rollback;
List update_list;
int conn;
} pgsql_conn_t;
typedef struct {
uint32_t port;
char *host;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment