summaryrefslogtreecommitdiffstats
path: root/ommysql.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-14 07:57:15 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-14 07:57:15 +0000
commit4884ef844c8f5c4c6e61fca17a3edeca95cdb03c (patch)
treeef78b2ea8e93ee4022377c0871d7108d414d30dc /ommysql.c
parent602ef197d3f54f360cf44fb7b95e2d45f42606b1 (diff)
downloadrsyslog-4884ef844c8f5c4c6e61fca17a3edeca95cdb03c.tar.gz
rsyslog-4884ef844c8f5c4c6e61fca17a3edeca95cdb03c.tar.xz
rsyslog-4884ef844c8f5c4c6e61fca17a3edeca95cdb03c.zip
- integrated patch from varmojfekoj to make the mysql module a loadable one
many thanks for the patch, MUCH appreciated
Diffstat (limited to 'ommysql.c')
-rw-r--r--ommysql.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/ommysql.c b/ommysql.c
index fac4c182..19e980a0 100644
--- a/ommysql.c
+++ b/ommysql.c
@@ -235,21 +235,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
/* rger 2004-10-28: added support for MySQL
* >server,dbname,userid,password
- * rgerhards 2005-08-12: changed rsyslogd so that
- * if no DB is selected and > is used, an error
- * message is logged.
- */
- if(bModMySQLLoaded == 0)
- logerror("To enable MySQL logging, a \"$ModLoad MySQL\" must be done - accepted for "
- "the time being, but will fail in future releases.");
-#ifndef WITH_DB
- iRet = RS_RET_ERROR; /* this goes away anyhow, so it's not worth putting much effort in the return code */
- errno = 0;
- logerror("write to database action in config file, but rsyslogd compiled without "
- "database functionality - ignored");
-#else /* WITH_DB defined! */
-
- /* Now we read the MySQL connection properties
+ * Now we read the MySQL connection properties
* and verify that the properties are valid.
*/
if(getSubString(&p, pData->f_dbsrv, MAXHOSTNAMELEN+1, ','))
@@ -286,7 +272,6 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
} else {
CHKiRet(initMySQL(pData, 0));
}
-#endif /* #ifdef WITH_DB */
CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
@@ -298,7 +283,7 @@ CODEqueryEtryPt_STD_OMOD_QUERIES
ENDqueryEtryPt
-BEGINmodInit(MySQL)
+BEGINmodInit()
CODESTARTmodInit
*ipIFVersProvided = 1; /* so far, we only support the initial definition */
CODEmodInit_QueryRegCFSLineHdlr