summaryrefslogtreecommitdiffstats
path: root/plugins/ommysql
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ommysql')
-rw-r--r--plugins/ommysql/.cvsignore6
-rw-r--r--plugins/ommysql/Makefile.am2
-rw-r--r--plugins/ommysql/ommysql.c10
3 files changed, 6 insertions, 12 deletions
diff --git a/plugins/ommysql/.cvsignore b/plugins/ommysql/.cvsignore
deleted file mode 100644
index 9730646f..00000000
--- a/plugins/ommysql/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
diff --git a/plugins/ommysql/Makefile.am b/plugins/ommysql/Makefile.am
index 3b4e6d75..d5433a40 100644
--- a/plugins/ommysql/Makefile.am
+++ b/plugins/ommysql/Makefile.am
@@ -1,7 +1,7 @@
pkglib_LTLIBRARIES = ommysql.la
ommysql_la_SOURCES = ommysql.c ommysql.h
-ommysql_la_CPPFLAGS = -I$(top_srcdir) $(mysql_cflags) $(pthreads_cflags)
+ommysql_la_CPPFLAGS = $(rsrt_cflags) $(mysql_cflags) $(pthreads_cflags)
ommysql_la_LDFLAGS = -module -avoid-version
ommysql_la_LIBADD = $(mysql_libs)
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index 807351d2..22abb1d2 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -37,7 +37,7 @@
#include <time.h>
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
-#include "syslogd.h"
+#include "dirty.h"
#include "syslogd-types.h"
#include "srUtils.h"
#include "template.h"
@@ -120,7 +120,7 @@ static void reportDBError(instanceData *pData, int bSilent)
/* output log message */
errno = 0;
if(pData->f_hmysql == NULL) {
- errmsg.LogError(NO_ERRCODE, "unknown DB error occured - could not obtain MySQL handle");
+ errmsg.LogError(0, NO_ERRCODE, "unknown DB error occured - could not obtain MySQL handle");
} else { /* we can ask mysql for the error description... */
uMySQLErrno = mysql_errno(pData->f_hmysql);
snprintf(errMsg, sizeof(errMsg)/sizeof(char), "db error (%d): %s\n", uMySQLErrno,
@@ -129,7 +129,7 @@ static void reportDBError(instanceData *pData, int bSilent)
dbgprintf("mysql, DBError(silent): %s\n", errMsg);
else {
pData->uLastMySQLErrno = uMySQLErrno;
- errmsg.LogError(NO_ERRCODE, "%s", errMsg);
+ errmsg.LogError(0, NO_ERRCODE, "%s", errMsg);
}
}
@@ -150,7 +150,7 @@ static rsRetVal initMySQL(instanceData *pData, int bSilent)
pData->f_hmysql = mysql_init(NULL);
if(pData->f_hmysql == NULL) {
- errmsg.LogError(NO_ERRCODE, "can not initialize MySQL handle");
+ errmsg.LogError(0, RS_RET_SUSPENDED, "can not initialize MySQL handle");
iRet = RS_RET_SUSPENDED;
} else { /* we could get the handle, now on with work... */
/* Connect to database */
@@ -275,7 +275,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
* Retries make no sense.
*/
if (iMySQLPropErr) {
- errmsg.LogError(NO_ERRCODE, "Trouble with MySQL connection properties. -MySQL logging disabled");
+ errmsg.LogError(0, RS_RET_INVALID_PARAMS, "Trouble with MySQL connection properties. -MySQL logging disabled");
ABORT_FINALIZE(RS_RET_INVALID_PARAMS);
} else {
pData->f_dbsrvPort = (unsigned) iSrvPort; /* set configured port */