Module: sip-router
Branch: janakj/bdb
Commit: e4a39affff2140f41c031c94610236718efb7e03
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e4a39af…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Wed Sep 24 11:02:42 2008 +0000
- 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
---
modules/db_berkeley/bdb_res.c | 6 ++++++
modules/db_berkeley/bdb_val.c | 4 ++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/modules/db_berkeley/bdb_res.c b/modules/db_berkeley/bdb_res.c
index c165122..93a408b 100644
--- a/modules/db_berkeley/bdb_res.c
+++ b/modules/db_berkeley/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;
diff --git a/modules/db_berkeley/bdb_val.c b/modules/db_berkeley/bdb_val.c
index 1e239ed..1f20c9c 100644
--- a/modules/db_berkeley/bdb_val.c
+++ b/modules/db_berkeley/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");