[SR-Dev] [PATCH 02/10] Various db api changes needed after migration to libsrdb1

Jan Janak jan at iptel.org
Tue Mar 3 01:16:14 CET 2009


Database fixes done by kam_to_sr.sh script

This patch makes the module compatible with the changes done in the
database library of kamailio/ser when it was converted to shared library
libsrdb1. These changes are mostly needed to avoid conflicts with the
symbols defined in the newer version of the library libsrdb2.

List of changes:
 * Rename db_con_t to db1_con_t
 * Rename database field type names from DB_* to DB1_*
---
 modules/acc/acc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/acc/acc.c b/modules/acc/acc.c
index 3f43685..49afdf0 100644
--- a/modules/acc/acc.c
+++ b/modules/acc/acc.c
@@ -88,7 +88,7 @@ extern struct acc_extra *dia_extra;
 
 #ifdef SQL_ACC
 static db_func_t acc_dbf;
-static db_con_t* db_handle=0;
+static db1_con_t* db_handle=0;
 extern struct acc_extra *db_extra;
 #endif
 
@@ -318,10 +318,10 @@ static void acc_db_init_keys(void)
 
 	/* init the values */
 	for(i=0; i<n; i++) {
-		VAL_TYPE(db_vals+i)=DB_STR;
+		VAL_TYPE(db_vals+i)=DB1_STR;
 		VAL_NULL(db_vals+i)=0;
 	}
-	VAL_TYPE(db_vals+time_idx)=DB_DATETIME;
+	VAL_TYPE(db_vals+time_idx)=DB1_DATETIME;
 }
 
 
-- 
1.5.6.5




More information about the sr-dev mailing list