diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2013-11-26 15:04:48 -0600 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2014-03-12 21:21:32 +0400 |
commit | c70e1282d692e376542b3f789e5340d02af78f17 (patch) | |
tree | b7a5820411d9ae58e4b7591a64f376cc7665a59e /openbsc/tests/db/db_test.c | |
parent | 9d911d59a022f8f109849cc1abdf1a2adb9c4e7f (diff) |
libmsc,sms: Properly calculate and store validity and received timestamps for incoming SMS.achemeris/sms-validity-fix
Diffstat (limited to 'openbsc/tests/db/db_test.c')
-rw-r--r-- | openbsc/tests/db/db_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index ef2e538d1..8c002545e 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -73,6 +73,9 @@ static void test_sms(void) sms = sms_alloc(); sms->receiver = subscr_get(subscr); + sms->received_time = 12345; + sms->valid_until = 67890; + sms->src.ton = 0x23; sms->src.npi = 0x24; memcpy(sms->src.addr, "1234", strlen("1234") + 1); @@ -100,6 +103,8 @@ static void test_sms(void) sms = db_sms_get_unsent_for_subscr(subscr); OSMO_ASSERT(sms); OSMO_ASSERT(sms->receiver == subscr); + OSMO_ASSERT(sms->received_time == 12345); + OSMO_ASSERT(sms->valid_until == 67890); OSMO_ASSERT(sms->reply_path_req == 1); OSMO_ASSERT(sms->status_rep_req == 2); OSMO_ASSERT(sms->ud_hdr_ind == 3); |