summaryrefslogtreecommitdiffstats
path: root/plugins/ommysql/ommysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ommysql/ommysql.c')
-rw-r--r--plugins/ommysql/ommysql.c10
1 files changed, 5 insertions, 5 deletions
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 */