Quellcode durchsuchen

Jan's changes, his comments:
Attached patch makes postgres module in the unstable branch compile and
load again (it didn't compile because of some changes I did a couple
days ago).

The changes are cosmetic only.
I did verify that the code compiled in the current branch. I did
not test this version.

Greg Fausak vor 21 Jahren
Ursprung
Commit
61ee30f2de

+ 2 - 0
modules/db_postgres/con_postgres.h

@@ -46,6 +46,7 @@
  * Postgres specific connection data
  */
 struct con_postgres {
+	int connected;
 	char *sqlurl;	/* the url we are connected to, all connection memory
 			   parents from this */
 	PGconn *con;	/* this is the postgres connection */
@@ -60,6 +61,7 @@ struct con_postgres {
 #define CON_CONNECTION(db_con) (((struct con_postgres*)((db_con)->tail))->con)
 #define CON_FP(db_con)        (((struct con_postgres*)((db_con)->tail))->fp)
 #define CON_PID(db_con)       (((struct con_postgres*)((db_con)->tail))->tpid)
+#define CON_CONNECTED(db_con) (((struct con_postgres*)((db_con)->tail))->connected)
 
 #define PLOG(f,s) LOG(L_ERR, "PG[%d] %s %s\n",__LINE__,f,s)
 #define DLOG(f,s) LOG(L_INFO, "PG[%d] %s %s\n",__LINE__,f,s)

+ 1 - 1
modules/db_postgres/db_con.c

@@ -37,12 +37,12 @@
  */
 
 #include <string.h>
-#include "../../db/db_con.h"
 #include "../../dprint.h"
 #include "../../mem/mem.h"
 #include "defs.h"
 #include "con_postgres.h"
 #include "aug_std.h"
+#include "db_con.h"
 
 /*
  * Store name of table that will be used by

+ 1 - 0
modules/db_postgres/db_mod.c

@@ -35,6 +35,7 @@
 
 #include <stdio.h>
 #include "../../sr_module.h"
+#include "db_con.h"
 #include "dbase.h"
 
 MODULE_VERSION

+ 1 - 0
modules/db_postgres/db_res.c

@@ -38,6 +38,7 @@
 
 #include <stdlib.h>
 #include "../../db/db_res.h"
+#include "../../db/db_con.h"
 #include "../../dprint.h"
 #include "../../mem/mem.h"
 #include "defs.h"