summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libmsc')
-rw-r--r--openbsc/src/libmsc/db.c1
-rw-r--r--openbsc/src/libmsc/gsm_04_11.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index 631e05f5d..4ba12ca69 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -1641,6 +1641,7 @@ 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->created = dbi_result_get_datetime(result, "created");
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->is_report = dbi_result_get_ulonglong(result, "is_report");
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index 5e736b3d5..ddef444c5 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -310,11 +310,11 @@ static int gsm340_gen_sms_status_report_tpdu(struct msgb *msg,
/* generate TP-SCTS (Service centre timestamp) */
smsp = msgb_put(msg, 7);
- gsm340_gen_scts(smsp, time(NULL));
+ gsm340_gen_scts(smsp, sms->created);
/* generate TP-DT (Discharge time, in TP-SCTS format). */
smsp = msgb_put(msg, 7);
- gsm340_gen_scts(smsp, time(NULL));
+ gsm340_gen_scts(smsp, sms->created);
/* TP-ST (status) */
smsp = msgb_put(msg, 1);