summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2014-01-26 11:33:54 +0100
committerEric Leblond <eric@regit.org>2014-01-26 11:33:54 +0100
commit5ebf1795c064cdde5ddaf66a263f532030317dd5 (patch)
tree83d6811ecbb11eb3dbc754766ec178dd777ee960
parent8a71482d3b0b5fc8954c1bbfac0cbd0e590efcfd (diff)
db: don't loose one packet on reconnect
This patch improves database reconnection handling in ring buffer mode. Ulogd now redo the failed query and do not loose anymore one packet.
-rw-r--r--util/db.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/db.c b/util/db.c
index 1f74712..24966a5 100644
--- a/util/db.c
+++ b/util/db.c
@@ -590,7 +590,8 @@ static void *__inject_thread(void *gdi)
"permanently disabling plugin\n");
di->interp = &disabled_interp_db;
return NULL;
- }
+ } else /* try to re run query */
+ continue;
}
*wr_place = RING_NO_QUERY;
di->ring.rd_item++;