- this will initialize the sql buffer at module load time, avoiding crash at startup if a module using the DB driver is loaded before the db driver itself - reported by Timo Teras
@@ -73,7 +73,7 @@ struct kam_module_exports kam_exports = {
int km_postgres_mod_init(void)
{
- return db_query_init();
+ return 0;
}
int db_postgres_bind_api(db_func_t *dbb)
@@ -530,6 +530,13 @@ int pg_test(void)
#endif /* PG_TEST */
+int mod_register(char *path, int *dlflags, void *p1, void *p2)
+{
+ if(db_query_init()<0)
+ return -1;
+}
+
static int pg_mod_init(void)
#ifdef PG_TEST