]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
sqlite3: Remove unused "buffer" option.
authorAlex Xu <alex_y_xu@yahoo.ca>
Wed, 13 Jan 2016 20:37:58 +0000 (15:37 -0500)
committerEric Leblond <eric@regit.org>
Tue, 19 Jan 2016 21:37:59 +0000 (22:37 +0100)
This option was left behind when the code was rewritten and is no longer
functional or useful. Remove it entirely.

Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
doc/ulogd.sgml
output/sqlite3/ulogd_output_SQLITE3.c
ulogd.conf.in

index 30bfecb4b2acba46c8e635c333e560c83061f332..65a63cf58802062f871cfa9b82ee50dfff4ee174 100644 (file)
@@ -603,8 +603,6 @@ The module defines the following configuration directives:
 Name of the table to which ulogd should log.
 <tag>db</tag>
 Name of the database.
-<tag>buffer</tag>
-Size of the sqlite buffer.
 </descrip>
 </sect2>
 
index 5c49055436dc4aec50d25e3f64203fe2ef5993c9..20ceb3b5d6e2e54b620e3f905170510205995883 100644 (file)
@@ -63,8 +63,6 @@ struct sqlite3_priv {
        struct field_lh fields;
        char *stmt;
        sqlite3_stmt *p_stmt;
-       int buffer_size;
-       int buffer_curr;
        struct {
                unsigned err_tbl_busy;  /* "Table busy" */
        } stats;
@@ -83,18 +81,11 @@ static struct config_keyset sqlite3_kset = {
                        .type = CONFIG_TYPE_STRING,
                        .options = CONFIG_OPT_MANDATORY,
                },
-               {
-                       .key = "buffer",
-                       .type = CONFIG_TYPE_INT,
-                       .options = CONFIG_OPT_NONE,
-                       .u.value = CFG_BUFFER_DEFAULT,
-               },
        },
 };
 
 #define db_ce(pi)              (pi)->config_kset->ces[0].u.string
 #define table_ce(pi)   (pi)->config_kset->ces[1].u.string
-#define buffer_ce(pi)  (pi)->config_kset->ces[2].u.value
 
 /* forward declarations */
 static int sqlite3_createstmt(struct ulogd_pluginstance *);
@@ -107,9 +98,7 @@ add_row(struct ulogd_pluginstance *pi)
        int ret;
 
        ret = sqlite3_step(priv->p_stmt);
-       if (ret == SQLITE_DONE)
-               priv->buffer_curr++;
-       else if (ret == SQLITE_BUSY)
+       if (ret == SQLITE_BUSY)
                priv->stats.err_tbl_busy++;
        else if (ret == SQLITE_ERROR) {
                ret = sqlite3_finalize(priv->p_stmt);
@@ -404,10 +393,6 @@ sqlite3_start(struct ulogd_pluginstance *pi)
                return -1;
        }
 
-       /* initialize our buffer size and counter */
-       priv->buffer_size = buffer_ce(pi);
-       priv->buffer_curr = 0;
-
        /* create and prepare the actual insert statement */
        sqlite3_createstmt(pi);
 
index 9624a4b6c38ea266f88eb4af4ddf7bcff1227960..2fcf39a23ffa50996e1009da5d05adbcd7a21b6c 100644 (file)
@@ -301,12 +301,10 @@ procedure="INSERT_PACKET_FULL"
 [sqlite3_ct]
 table="ulog_ct"
 db="/var/log/ulogd.sqlite3db"
-buffer=200
 
 [sqlite3_pkt]
 table="ulog_pkt"
 db="/var/log/ulogd.sqlite3db"
-buffer=200
 
 [sys2]
 facility=LOG_LOCAL2