瀏覽代碼

- disable big integer (DB_BIGINT) support for non SQL DB modules for now
- if such a value is used, an error will be returned and also logged


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4986 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 17 年之前
父節點
當前提交
ea6985f7cf
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 6 0
      modules/db_berkeley/km_bdb_res.c
  2. 4 0
      modules/db_berkeley/km_bdb_val.c

+ 6 - 0
modules/db_berkeley/km_bdb_res.c

@@ -424,6 +424,9 @@ int bdb_is_neq_type(db_type_t _t0, db_type_t _t1)
 		case DB_INT:
 			if(_t0==DB_DATETIME || _t0==DB_BITMAP)
 				return 0;
+		case DB_BIGINT:
+				LM_ERR("BIGINT not supported");
+				return 0;
 		case DB_DATETIME:
 			if(_t0==DB_INT)
 				return 0;
@@ -514,6 +517,9 @@ int bdb_cmp_val(db_val_t* _vp, db_val_t* _v)
 		case DB_INT:
 			return (_vp->val.int_val<_v->val.int_val)?-1:
 					(_vp->val.int_val>_v->val.int_val)?1:0;
+		case DB_BIGINT:
+			LM_ERR("BIGINT not supported");
+			return -1;
 		case DB_DOUBLE:
 			return (_vp->val.double_val<_v->val.double_val)?-1:
 					(_vp->val.double_val>_v->val.double_val)?1:0;

+ 4 - 0
modules/db_berkeley/km_bdb_val.c

@@ -112,6 +112,10 @@ int bdb_str2val(db_type_t _t, db_val_t* _v, char* _s, int _l)
 		}
 		break;
 
+	case DB_BIGINT:
+			LM_ERR("BIGINT not supported");
+			return -1;
+
 	case DB_BITMAP:
 		if (db_str2int(_s, &VAL_INT(_v)) < 0) {
 			LM_ERR("Error while converting BITMAP value from string\n");