summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2015-04-29 16:52:50 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2015-04-29 16:52:50 +0300
commit574fb021c6601089417d252656b92e3c3035f30a (patch)
tree8a5db74e6420c0629c63f347de095e147f67eee6
parent4fe6d4aaae31056846e1511e43af3cdd9955af5f (diff)
dbi: Replace dbi_result_get_uint to dbi_result_get_ulonglong to avoid libdbi errorsfairwaves/master_old
DBI: -7: The requested variable type does not match what libdbi thinks it should be
-rw-r--r--openbsc/src/libmsc/db.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index 90c66c88f..7e2309d74 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -239,11 +239,11 @@ static struct gsm_sms *sms_from_result_v3(dbi_result result)
subscr_direct_free(sender);
sender = NULL;
- sms->reply_path_req = dbi_result_get_uint(result, "reply_path_req");
- sms->status_rep_req = dbi_result_get_uint(result, "status_rep_req");
- sms->ud_hdr_ind = dbi_result_get_uint(result, "ud_hdr_ind");
- sms->protocol_id = dbi_result_get_uint(result, "protocol_id");
- sms->data_coding_scheme = dbi_result_get_uint(result,
+ sms->reply_path_req = dbi_result_get_ulonglong(result, "reply_path_req");
+ sms->status_rep_req = dbi_result_get_ulonglong(result, "status_rep_req");
+ sms->ud_hdr_ind = dbi_result_get_ulonglong(result, "ud_hdr_ind");
+ sms->protocol_id = dbi_result_get_ulonglong(result, "protocol_id");
+ sms->data_coding_scheme = dbi_result_get_ulonglong(result,
"data_coding_scheme");
daddr = dbi_result_get_string(result, "dest_addr");
@@ -1454,16 +1454,16 @@ static struct gsm_sms *sms_from_result(struct gsm_network *net, dbi_result resul
/* FIXME: validity */
/* FIXME: those should all be get_uchar, but sqlite3 is braindead */
- sms->reply_path_req = dbi_result_get_uint(result, "reply_path_req");
- sms->status_rep_req = dbi_result_get_uint(result, "status_rep_req");
- sms->ud_hdr_ind = dbi_result_get_uint(result, "ud_hdr_ind");
- sms->protocol_id = dbi_result_get_uint(result, "protocol_id");
- sms->data_coding_scheme = dbi_result_get_uint(result,
+ sms->reply_path_req = dbi_result_get_ulonglong(result, "reply_path_req");
+ sms->status_rep_req = dbi_result_get_ulonglong(result, "status_rep_req");
+ sms->ud_hdr_ind = dbi_result_get_ulonglong(result, "ud_hdr_ind");
+ sms->protocol_id = dbi_result_get_ulonglong(result, "protocol_id");
+ sms->data_coding_scheme = dbi_result_get_ulonglong(result,
"data_coding_scheme");
/* sms->msg_ref is temporary and not stored in DB */
- sms->dst.npi = dbi_result_get_uint(result, "dest_npi");
- sms->dst.ton = dbi_result_get_uint(result, "dest_ton");
+ sms->dst.npi = dbi_result_get_ulonglong(result, "dest_npi");
+ sms->dst.ton = dbi_result_get_ulonglong(result, "dest_ton");
daddr = dbi_result_get_string(result, "dest_addr");
if (daddr) {
strncpy(sms->dst.addr, daddr, sizeof(sms->dst.addr));
@@ -1471,8 +1471,8 @@ static struct gsm_sms *sms_from_result(struct gsm_network *net, dbi_result resul
}
sms->receiver = subscr_get_by_extension(net, sms->dst.addr);
- sms->src.npi = dbi_result_get_uint(result, "src_npi");
- sms->src.ton = dbi_result_get_uint(result, "src_ton");
+ sms->src.npi = dbi_result_get_ulonglong(result, "src_npi");
+ sms->src.ton = dbi_result_get_ulonglong(result, "src_ton");
saddr = dbi_result_get_string(result, "src_addr");
if (saddr) {
strncpy(sms->src.addr, saddr, sizeof(sms->src.addr));