[SR-Dev] git:janakj/mysql: DB_* renamed to DB1_* in files originating from kamailio/ db_mysql.

Jan Janak jan at iptel.org
Tue Feb 17 00:05:42 CET 2009


Module: sip-router
Branch: janakj/mysql
Commit: b81f22eed0cb8297c81810ad46b9a6b82109464e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b81f22eed0cb8297c81810ad46b9a6b82109464e

Author: Jan Janak <jan at iptel.org>
Committer: Jan Janak <jan at iptel.org>
Date:   Mon Feb 16 23:17:48 2009 +0100

DB_* renamed to DB1_* in files originating from kamailio/db_mysql.

---

 modules/db_mysql/km_res.c |   32 ++++++++++++++++----------------
 modules/db_mysql/km_val.c |    6 +++---
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/modules/db_mysql/km_res.c b/modules/db_mysql/km_res.c
index fe71cec..10d3ce2 100644
--- a/modules/db_mysql/km_res.c
+++ b/modules/db_mysql/km_res.c
@@ -97,34 +97,34 @@ int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r)
 			case MYSQL_TYPE_LONG:
 			case MYSQL_TYPE_INT24:
 			case MYSQL_TYPE_TIMESTAMP:
-				LM_DBG("use DB_INT result type\n");
-				RES_TYPES(_r)[col] = DB_INT;
+				LM_DBG("use DB1_INT result type\n");
+				RES_TYPES(_r)[col] = DB1_INT;
 				break;
 
 			case MYSQL_TYPE_LONGLONG:
-				LM_DBG("use DB_BIGINT result type\n");
-				RES_TYPES(_r)[col] = DB_BIGINT;
+				LM_DBG("use DB1_BIGINT result type\n");
+				RES_TYPES(_r)[col] = DB1_BIGINT;
 				break;
 
 			case MYSQL_TYPE_FLOAT:
 			case MYSQL_TYPE_DOUBLE:
-				LM_DBG("use DB_DOUBLE result type\n");
-				RES_TYPES(_r)[col] = DB_DOUBLE;
+				LM_DBG("use DB1_DOUBLE result type\n");
+				RES_TYPES(_r)[col] = DB1_DOUBLE;
 				break;
 
 			case MYSQL_TYPE_DATETIME:
-				LM_DBG("use DB_DATETIME result type\n");
-				RES_TYPES(_r)[col] = DB_DATETIME;
+				LM_DBG("use DB1_DATETIME result type\n");
+				RES_TYPES(_r)[col] = DB1_DATETIME;
 				break;
 
 			case MYSQL_TYPE_BLOB:
-				LM_DBG("use DB_BLOB result type\n");
-				RES_TYPES(_r)[col] = DB_BLOB;
+				LM_DBG("use DB1_BLOB result type\n");
+				RES_TYPES(_r)[col] = DB1_BLOB;
 				break;
 
 			case FIELD_TYPE_SET:
-				LM_DBG("use DB_BITMAP result type\n");
-				RES_TYPES(_r)[col] = DB_BITMAP;
+				LM_DBG("use DB1_BITMAP result type\n");
+				RES_TYPES(_r)[col] = DB1_BITMAP;
 				break;
 
 			case MYSQL_TYPE_DECIMAL:
@@ -133,15 +133,15 @@ int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r)
 			#endif
 			case MYSQL_TYPE_STRING:
 			case MYSQL_TYPE_VAR_STRING:
-				LM_DBG("use DB_STRING result type\n");
-				RES_TYPES(_r)[col] = DB_STRING;
+				LM_DBG("use DB1_STRING result type\n");
+				RES_TYPES(_r)[col] = DB1_STRING;
 				break;
 
 			default:
 				LM_WARN("unhandled data type column (%.*s) type id (%d), "
-						"use DB_STRING as default\n", RES_NAMES(_r)[col]->len,
+						"use DB1_STRING as default\n", RES_NAMES(_r)[col]->len,
 						RES_NAMES(_r)[col]->s, fields[col].type);
-				RES_TYPES(_r)[col] = DB_STRING;
+				RES_TYPES(_r)[col] = DB1_STRING;
 				break;
 		}
 	}
diff --git a/modules/db_mysql/km_val.c b/modules/db_mysql/km_val.c
index f05747d..5896650 100644
--- a/modules/db_mysql/km_val.c
+++ b/modules/db_mysql/km_val.c
@@ -53,7 +53,7 @@ int db_mysql_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _le
 		return tmp;
 
 	switch(VAL_TYPE(_v)) {
-	case DB_STRING:
+	case DB1_STRING:
 		l = strlen(VAL_STRING(_v));
 		if (*_len < (l * 2 + 3)) {
 			LM_ERR("destination buffer too short\n");
@@ -69,7 +69,7 @@ int db_mysql_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _le
 		}
 		break;
 
-	case DB_STR:
+	case DB1_STR:
 		if (*_len < (VAL_STR(_v).len * 2 + 3)) {
 			LM_ERR("destination buffer too short\n");
 			return -7;
@@ -84,7 +84,7 @@ int db_mysql_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _le
 		}
 		break;
 
-	case DB_BLOB:
+	case DB1_BLOB:
 		l = VAL_BLOB(_v).len;
 		if (*_len < (l * 2 + 3)) {
 			LM_ERR("destination buffer too short\n");




More information about the sr-dev mailing list