summaryrefslogtreecommitdiffstats
path: root/ommysql.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-26 12:47:09 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-26 12:47:09 +0000
commit6e2c5057684a191c565220e6e41e561305b3a6ba (patch)
tree59ebc9ca6e9952db513c9f65bc39a2a4c5ff239e /ommysql.c
parent54669873b0469aa69a4c9f88bcf88470218082f8 (diff)
downloadrsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.tar.gz
rsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.tar.xz
rsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.zip
- changed doAction() interface to contain the full message string
- f_iov and its handling has been removed
Diffstat (limited to 'ommysql.c')
-rw-r--r--ommysql.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ommysql.c b/ommysql.c
index b23c4a39..67803b5c 100644
--- a/ommysql.c
+++ b/ommysql.c
@@ -286,16 +286,13 @@ static rsRetVal reInitMySQL(instanceData *pData)
* to an established MySQL session.
* Initially added 2004-10-28 mmeckelein
*/
-rsRetVal writeMySQL(register selector_t *f, instanceData *pData)
+rsRetVal writeMySQL(register selector_t *f, uchar *psz, instanceData *pData)
{
- char *psz;
int iCounter=0;
rsRetVal iRet = RS_RET_OK;
assert(f != NULL);
assert(pData != NULL);
- iovCreate(f);
- psz = iovAsString(f);
if((iRet = checkDBErrorState(pData)) != RS_RET_OK)
return iRet;
@@ -306,7 +303,7 @@ rsRetVal writeMySQL(register selector_t *f, instanceData *pData)
*/
do {
/* query */
- if(mysql_query(pData->f_hmysql, psz)) {
+ if(mysql_query(pData->f_hmysql, (char*)psz)) {
/* if the second attempt fails
we call the error handler */
if(iCounter)
@@ -324,7 +321,7 @@ rsRetVal writeMySQL(register selector_t *f, instanceData *pData)
BEGINdoAction
CODESTARTdoAction
dprintf("\n");
- iRet = writeMySQL(f, pData);
+ iRet = writeMySQL(f, pMsg, pData);
ENDdoAction