summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-05-03 13:48:46 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-05-03 13:48:46 +0200
commitbec43b53804ab420ba3f3652849114e42f40e16a (patch)
tree7fd05507034139cfa890e449f96d8f252e117cc0 /plugins
parenta34e46801b52b2614f9f3f16eb23e6fd14de6288 (diff)
downloadrsyslog-bec43b53804ab420ba3f3652849114e42f40e16a.tar.gz
rsyslog-bec43b53804ab420ba3f3652849114e42f40e16a.tar.xz
rsyslog-bec43b53804ab420ba3f3652849114e42f40e16a.zip
ommysql: added support for new mysql_library_[init/exit]
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ommysql/ommysql.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index 01f6a844..7ff89f5a 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -318,7 +318,11 @@ ENDparseSelectorAct
BEGINmodExit
CODESTARTmodExit
+# ifdef HAVE_MYSQL_LIBRARY_INIT
+ mysql_library_end();
+# else
mysql_server_end();
+# endif
ENDmodExit
@@ -348,7 +352,13 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(errmsg, CORE_COMPONENT));
/* we need to init the MySQL library. If that fails, we cannot run */
- if(mysql_server_init(0, NULL, NULL)) {
+ if(
+# ifdef HAVE_MYSQL_LIBRARY_INIT
+ mysql_library_init(0, NULL, NULL)
+# else
+ mysql_server_init(0, NULL, NULL)
+# endif
+ ) {
errmsg.LogError(0, NO_ERRCODE, "ommysql: mysql_server_init() failed, plugin "
"can not run");
ABORT_FINALIZE(RS_RET_ERR);