package ulogd-sqlite3
tags 312507 + confirmed pending
thanks
I applied your patch, and fixed another bug in the process.
Fields were not set as NULL when applicable, the col_counter was just
increased, so information from the previous packet was used.
Applied patch follows. I will upload a new package as soon as the libpq-dev vs
postgresql-dev change is intergated into unstable.
---------------------------------------------------------------
--- sqlite3/ulogd_SQLITE3.c.orig 2005-06-08 18:36:32.969017833 +0300
+++ sqlite3/ulogd_SQLITE3.c 2005-06-08 18:37:02.753950940 +0300
@@ -96,7 +96,7 @@
struct in_addr addr;
#endif
- col_counter = 0;
+ col_counter = 1;
for (f = fields; f; f = f->next) {
res = keyh_getres(f->id);
@@ -107,6 +107,7 @@
if (!res || !IS_VALID((*res))) {
/* no result, pass a null */
+ sqlite3_bind_null(p_stmt,col_counter);
col_counter++;
continue;
}
@@ -128,7 +129,7 @@
sqlite3_bind_int(p_stmt,col_counter,res->value.ui8);
break;
case ULOGD_RET_UINT16:
-
sqlite3_bind_int(p_stmt,col_counter,res->value.ui8);
+
sqlite3_bind_int(p_stmt,col_counter,res->value.ui16);
break;
case ULOGD_RET_IPADDR:
#ifdef IP_AS_STRING
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]