summaryrefslogtreecommitdiffstats
path: root/output
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2016-01-13 15:37:58 -0500
committerEric Leblond <eric@regit.org>2016-01-19 22:37:59 +0100
commit6fd7dbc8bae410afabe0c1490c62301faca1531d (patch)
treedb4582e58aaf4ddbc353cf95384bf5ee0f05442c /output
parentb09205b017cef10467e04b3c7ade31cc34577505 (diff)
sqlite3: Remove unused "buffer" option.
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>
Diffstat (limited to 'output')
-rw-r--r--output/sqlite3/ulogd_output_SQLITE3.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/output/sqlite3/ulogd_output_SQLITE3.c b/output/sqlite3/ulogd_output_SQLITE3.c
index 5c49055..20ceb3b 100644
--- a/output/sqlite3/ulogd_output_SQLITE3.c
+++ b/output/sqlite3/ulogd_output_SQLITE3.c
@@ -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);