aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-12-26 18:56:00 +0100
committerHarald Welte <laforge@gnumonks.org>2009-12-26 22:47:43 +0100
commit1f3ecd4050b1aadd7e88ca02519438791a36bd64 (patch)
tree5e5bc9fe20eedbe14c9b74752b0251f9ca9cf062 /openbsc
parent6589858167ee953be1c639f170902be6bca53878 (diff)
'classmark1' is not an integer field in the database
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/db.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/db.c b/openbsc/src/db.c
index 57f86d6ea..7dfc86801 100644
--- a/openbsc/src/db.c
+++ b/openbsc/src/db.c
@@ -312,7 +312,9 @@ static int get_equipment_by_subscr(struct gsm_subscriber *subscr)
if (string)
strncpy(equip->imei, string, sizeof(equip->imei));
- cm1 = dbi_result_get_uint(result, "classmark1") & 0xff;
+ string = dbi_result_get_string(result, "classmark1");
+ if (string)
+ cm1 = atoi(string) & 0xff;
equip->classmark1 = *((struct gsm48_classmark1 *) &cm1);
equip->classmark2_len = dbi_result_get_field_length(result, "classmark2");