summaryrefslogtreecommitdiffstats
path: root/plugins/ommysql/ommysql.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-10-31 18:36:03 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-10-31 18:36:03 +0100
commit70b8ba19a314a1ce9fdb01062fcd7dd470882a8a (patch)
treeea6f4e67ff94f6e62b2f63aa45f7f8c547ff7207 /plugins/ommysql/ommysql.c
parente1883e148e4006e3679156f78adc39b2f6dfe573 (diff)
downloadrsyslog-70b8ba19a314a1ce9fdb01062fcd7dd470882a8a.tar.gz
rsyslog-70b8ba19a314a1ce9fdb01062fcd7dd470882a8a.tar.bz2
rsyslog-70b8ba19a314a1ce9fdb01062fcd7dd470882a8a.zip
ommysql cosmetic: change some historic names
Diffstat (limited to 'plugins/ommysql/ommysql.c')
-rw-r--r--plugins/ommysql/ommysql.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index fb4f1e27..49079ab1 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -56,11 +56,11 @@ DEFobjCurrIf(errmsg)
typedef struct _instanceData {
MYSQL *f_hmysql; /* handle to MySQL */
- char f_dbsrv[MAXHOSTNAMELEN+1]; /* IP or hostname of DB server*/
- unsigned int f_dbsrvPort; /* port of MySQL server */
- char f_dbname[_DB_MAXDBLEN+1]; /* DB name */
- char f_dbuid[_DB_MAXUNAMELEN+1]; /* DB user */
- char f_dbpwd[_DB_MAXPWDLEN+1]; /* DB user's password */
+ char dbsrv[MAXHOSTNAMELEN+1]; /* IP or hostname of DB server*/
+ unsigned int dbsrvPort; /* port of MySQL server */
+ char dbname[_DB_MAXDBLEN+1]; /* DB name */
+ char dbuid[_DB_MAXUNAMELEN+1]; /* DB user */
+ char dbpwd[_DB_MAXPWDLEN+1]; /* DB user's password */
unsigned uLastMySQLErrno; /* last errno returned by MySQL or 0 if all is well */
uchar * f_configfile; /* MySQL Client Configuration File */
uchar * f_configsection; /* MySQL Client Configuration Section */
@@ -206,8 +206,8 @@ static rsRetVal initMySQL(instanceData *pData, int bSilent)
}
}
/* Connect to database */
- if(mysql_real_connect(pData->f_hmysql, pData->f_dbsrv, pData->f_dbuid,
- pData->f_dbpwd, pData->f_dbname, pData->f_dbsrvPort, NULL, 0) == NULL) {
+ if(mysql_real_connect(pData->f_hmysql, pData->dbsrv, pData->dbuid,
+ pData->dbpwd, pData->dbname, pData->dbsrvPort, NULL, 0) == NULL) {
reportDBError(pData, bSilent);
closeMySQL(pData); /* ignore any error we may get */
ABORT_FINALIZE(RS_RET_SUSPENDED);
@@ -292,7 +292,7 @@ ENDendTransaction
static inline void
setInstParamDefaults(instanceData *pData)
{
- pData->f_dbsrvPort = 0;
+ pData->dbsrvPort = 0;
pData->f_configfile = NULL;
pData->f_configsection = NULL;
pData->tplName = NULL;
@@ -321,21 +321,21 @@ CODESTARTnewActInst
continue;
if(!strcmp(actpblk.descr[i].name, "server")) {
cstr = es_str2cstr(pvals[i].val.d.estr, NULL);
- strncpy(pData->f_dbsrv, cstr, sizeof(pData->f_dbsrv));
+ strncpy(pData->dbsrv, cstr, sizeof(pData->dbsrv));
free(cstr);
} else if(!strcmp(actpblk.descr[i].name, "serverport")) {
- pData->f_dbsrvPort = (int) pvals[i].val.d.n, NULL;
+ pData->dbsrvPort = (int) pvals[i].val.d.n, NULL;
} else if(!strcmp(actpblk.descr[i].name, "db")) {
cstr = es_str2cstr(pvals[i].val.d.estr, NULL);
- strncpy(pData->f_dbname, cstr, sizeof(pData->f_dbname));
+ strncpy(pData->dbname, cstr, sizeof(pData->dbname));
free(cstr);
} else if(!strcmp(actpblk.descr[i].name, "uid")) {
cstr = es_str2cstr(pvals[i].val.d.estr, NULL);
- strncpy(pData->f_dbuid, cstr, sizeof(pData->f_dbuid));
+ strncpy(pData->dbuid, cstr, sizeof(pData->dbuid));
free(cstr);
} else if(!strcmp(actpblk.descr[i].name, "pwd")) {
cstr = es_str2cstr(pvals[i].val.d.estr, NULL);
- strncpy(pData->f_dbpwd, cstr, sizeof(pData->f_dbpwd));
+ strncpy(pData->dbpwd, cstr, sizeof(pData->dbpwd));
free(cstr);
} else if(!strcmp(actpblk.descr[i].name, "mysqlconfig.file")) {
pData->f_configfile = (uchar*)es_str2cstr(pvals[i].val.d.estr, NULL);
@@ -391,19 +391,19 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
* Now we read the MySQL connection properties
* and verify that the properties are valid.
*/
- if(getSubString(&p, pData->f_dbsrv, MAXHOSTNAMELEN+1, ','))
+ if(getSubString(&p, pData->dbsrv, MAXHOSTNAMELEN+1, ','))
iMySQLPropErr++;
- if(*pData->f_dbsrv == '\0')
+ if(*pData->dbsrv == '\0')
iMySQLPropErr++;
- if(getSubString(&p, pData->f_dbname, _DB_MAXDBLEN+1, ','))
+ if(getSubString(&p, pData->dbname, _DB_MAXDBLEN+1, ','))
iMySQLPropErr++;
- if(*pData->f_dbname == '\0')
+ if(*pData->dbname == '\0')
iMySQLPropErr++;
- if(getSubString(&p, pData->f_dbuid, _DB_MAXUNAMELEN+1, ','))
+ if(getSubString(&p, pData->dbuid, _DB_MAXUNAMELEN+1, ','))
iMySQLPropErr++;
- if(*pData->f_dbuid == '\0')
+ if(*pData->dbuid == '\0')
iMySQLPropErr++;
- if(getSubString(&p, pData->f_dbpwd, _DB_MAXPWDLEN+1, ';'))
+ if(getSubString(&p, pData->dbpwd, _DB_MAXPWDLEN+1, ';'))
iMySQLPropErr++;
/* now check for template
* We specify that the SQL option must be present in the template.
@@ -423,7 +423,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
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) cs.iSrvPort; /* set configured port */
+ pData->dbsrvPort = (unsigned) cs.iSrvPort; /* set configured port */
pData->f_configfile = cs.pszMySQLConfigFile;
pData->f_configsection = cs.pszMySQLConfigSection;
pData->f_hmysql = NULL; /* initialize, but connect only on first message (important for queued mode!) */