summaryrefslogtreecommitdiffstats
path: root/ulogd/mysql/ulogd_MYSQL.c
diff options
context:
space:
mode:
authorlaforge <laforge>2003-09-28 15:19:25 +0000
committerlaforge <laforge>2003-09-28 15:19:25 +0000
commitda6345f7ce7090e24f2ba54a733245e138895878 (patch)
tree63f75e4f9dbd4fdbb518abdc8d9a25313658e081 /ulogd/mysql/ulogd_MYSQL.c
parent9dfdf242dcaad16a5069ac95834eff8d60324058 (diff)
new configuration file syntax (Magnus Boden)
Diffstat (limited to 'ulogd/mysql/ulogd_MYSQL.c')
-rw-r--r--ulogd/mysql/ulogd_MYSQL.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/ulogd/mysql/ulogd_MYSQL.c b/ulogd/mysql/ulogd_MYSQL.c
index 48bb8d6..118fe81 100644
--- a/ulogd/mysql/ulogd_MYSQL.c
+++ b/ulogd/mysql/ulogd_MYSQL.c
@@ -1,4 +1,4 @@
-/* ulogd_MYSQL.c, Version $Revision: 1.12 $
+/* ulogd_MYSQL.c, Version $Revision: 1.13 $
*
* ulogd output plugin for logging to a MySQL database
*
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_MYSQL.c,v 1.12 2003/08/23 11:47:32 laforge Exp $
+ * $Id: ulogd_MYSQL.c,v 1.13 2003/08/23 17:37:53 laforge Exp $
*
* 15 May 2001, Alex Janssen <alex@ynfonatic.de>:
* Added a compability option for older MySQL-servers, which
@@ -65,23 +65,23 @@ static char *stmt_val;
static char *stmt_ins;
/* our configuration directives */
-static config_entry_t db_ce = { NULL, "mysqldb", CONFIG_TYPE_STRING,
+static config_entry_t db_ce = { NULL, "db", CONFIG_TYPE_STRING,
CONFIG_OPT_MANDATORY, 0,
{ } };
-static config_entry_t host_ce = { &db_ce, "mysqlhost", CONFIG_TYPE_STRING,
+static config_entry_t host_ce = { &db_ce, "host", CONFIG_TYPE_STRING,
CONFIG_OPT_MANDATORY, 0,
{ } };
-static config_entry_t user_ce = { &host_ce, "mysqluser", CONFIG_TYPE_STRING,
+static config_entry_t user_ce = { &host_ce, "user", CONFIG_TYPE_STRING,
CONFIG_OPT_MANDATORY, 0,
{ } };
-static config_entry_t pass_ce = { &user_ce, "mysqlpass", CONFIG_TYPE_STRING,
+static config_entry_t pass_ce = { &user_ce, "pass", CONFIG_TYPE_STRING,
CONFIG_OPT_MANDATORY, 0,
{ } };
-static config_entry_t table_ce = { &pass_ce, "mysqltable", CONFIG_TYPE_STRING,
+static config_entry_t table_ce = { &pass_ce, "table", CONFIG_TYPE_STRING,
CONFIG_OPT_MANDATORY, 0,
{ } };
@@ -310,11 +310,8 @@ static ulog_output_t _mysql_plugin = { NULL, "mysql", &_mysql_output, NULL };
void _init(void)
{
- /* register our configfile options here */
- config_register_key(&table_ce);
-
/* have the opts parsed */
- config_parse_file(0);
+ config_parse_file("MYSQL", &table_ce);
if (_mysql_open_db(host_ce.u.string, user_ce.u.string,
pass_ce.u.string, db_ce.u.string)) {