aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/db.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-25 09:59:30 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-25 09:59:30 +0100
commitb464fb4a8958848273da05505b64f3074430b80f (patch)
treee12db9b2651bcdf4e4680d5b9a5ceb1de3b27f1a /openbsc/src/db.c
parent3f96458d73f9e7bece46a2753a1d99cd280a37a5 (diff)
db: Fix a bug where no pending SMS were found
The "sms send pending" VTY command did not work due a mismatch of types. We are specifying a unsigned long long in the query and provided DBI with a signed integer type. The result was a failure do find any information. Change the API to operate on unsigned long long that is matching the id of the SMS and the Subscriber and the mismatch with the query string is gone and pending SMS are sent.
Diffstat (limited to 'openbsc/src/db.c')
-rw-r--r--openbsc/src/db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/db.c b/openbsc/src/db.c
index 10c1d6d4c..9409ba5d6 100644
--- a/openbsc/src/db.c
+++ b/openbsc/src/db.c
@@ -1014,7 +1014,7 @@ static struct gsm_sms *sms_from_result(struct gsm_network *net, dbi_result resul
}
/* retrieve the next unsent SMS with ID >= min_id */
-struct gsm_sms *db_sms_get_unsent(struct gsm_network *net, int min_id)
+struct gsm_sms *db_sms_get_unsent(struct gsm_network *net, unsigned long long min_id)
{
dbi_result result;
struct gsm_sms *sms;
@@ -1041,7 +1041,7 @@ struct gsm_sms *db_sms_get_unsent(struct gsm_network *net, int min_id)
return sms;
}
-struct gsm_sms *db_sms_get_unsent_by_subscr(struct gsm_network *net, int min_subscr_id)
+struct gsm_sms *db_sms_get_unsent_by_subscr(struct gsm_network *net, unsigned long long min_subscr_id)
{
dbi_result result;
struct gsm_sms *sms;