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.
This commit is contained in:
Kevin Redon 2013-11-04 22:43:15 +01:00 committed by Holger Hans Peter Freyther
parent 4bbddc6de9
commit c9763a3de4
1 changed files with 3 additions and 2 deletions

View File

@ -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 "