Module: sip-router
Branch: janakj/postgres
Commit: 9c0a9d956c49f1d2b09467833713b935ea15c909
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9c0a9d9…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Tue Apr 13 14:58:05 2004 +0000
- Broken headers fixed
- Missing prototypes added
(Reported by Maxim Sobolev)
---
modules/db_postgres/db_con.c | 2 +-
modules/db_postgres/db_mod.c | 2 +-
modules/db_postgres/db_val.c | 1 +
modules/db_postgres/dbase.h | 12 ++++++++++++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/db_postgres/db_con.c b/modules/db_postgres/db_con.c
index 52a4fe1..4f0e4ca 100644
--- a/modules/db_postgres/db_con.c
+++ b/modules/db_postgres/db_con.c
@@ -39,10 +39,10 @@
#include <string.h>
#include "../../dprint.h"
#include "../../mem/mem.h"
+#include "../../db/db_con.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
diff --git a/modules/db_postgres/db_mod.c b/modules/db_postgres/db_mod.c
index 8d7b124..bd0601c 100644
--- a/modules/db_postgres/db_mod.c
+++ b/modules/db_postgres/db_mod.c
@@ -35,7 +35,7 @@
#include <stdio.h>
#include "../../sr_module.h"
-#include "db_con.h"
+#include "../../db/db_con.h"
#include "dbase.h"
MODULE_VERSION
diff --git a/modules/db_postgres/db_val.c b/modules/db_postgres/db_val.c
index 9af7d9e..d80ec04 100644
--- a/modules/db_postgres/db_val.c
+++ b/modules/db_postgres/db_val.c
@@ -188,6 +188,7 @@ int str2valp(db_type_t _t, db_val_t* _v, const char* _s, int _l, void
*_p)
switch(_t) {
case DB_INT:
+ case DB_BITMAP:
sprintf(dbuf, "got int %s", _s);
DLOG("str2valp", dbuf);
if (str2int(_s, &VAL_INT(_v)) < 0) {
diff --git a/modules/db_postgres/dbase.h b/modules/db_postgres/dbase.h
index b10dadf..9406896 100644
--- a/modules/db_postgres/dbase.h
+++ b/modules/db_postgres/dbase.h
@@ -106,4 +106,16 @@ int db_update(db_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
db_key_t* _uk, db_val_t* _uv, int _n, int _un);
+/*
+ * Store name of table that will be used by
+ * subsequent database functions
+ */
+int use_table(db_con_t* _h, const char* _t);
+
+int val2str(db_val_t* _v, char* _s, int* _len);
+
+int free_result(db_res_t* _r);
+
+int convert_result(db_con_t* _h, db_res_t* _r);
+
#endif /* DBASE_H */