summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Redon <kevredon@mail.tsaitgaist.info>2013-11-04 22:43:15 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-26 16:02:03 +0100
commitc9763a3de45fc70a889298494a68bd5526d0ee82 (patch)
treeae5a8bd3bf3c6faf8b956d6d6ececa6f8470ab5d
parent4bbddc6de986991acb4810e3120596a4c043f142 (diff)
db: Fetch the authorized key using ulonglong
Location Update Requests time out and get rejected because the subscriber is not authorized. Authorizing the subscriber through openBSC or sqlite3 doesn't help the subscriber is still seen and shown as not authorized The value is read as uint, this is the wrong type it's a (u)longlong in libdbi 0.9.0 and later.
-rw-r--r--openbsc/src/libmsc/db.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index d179c4e23..a842353e0 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -633,14 +633,15 @@ static void db_set_from_query(struct gsm_subscriber *subscr, dbi_conn result)
if (string)
strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH);
- subscr->lac = dbi_result_get_uint(result, "lac");
+ subscr->lac = dbi_result_get_ulonglong(result, "lac");
if (!dbi_result_field_is_null(result, "expire_lu"))
subscr->expire_lu = dbi_result_get_datetime(result, "expire_lu");
else
subscr->expire_lu = GSM_SUBSCRIBER_NO_EXPIRATION;
- subscr->authorized = dbi_result_get_uint(result, "authorized");
+ subscr->authorized = dbi_result_get_ulonglong(result, "authorized");
+
}
#define BASE_QUERY "SELECT * FROM Subscriber "