From: Pasi Miettinen <[email protected]>

---
 src/sms.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/sms.c b/src/sms.c
index 63e0190..b4a5364 100644
--- a/src/sms.c
+++ b/src/sms.c
@@ -579,8 +579,7 @@ static void dispatch_sms_delivery_report(struct ofono_sms 
*sms,
                                        OFONO_PROPERTIES_ARRAY_SIGNATURE,
                                                &dict);
 
-       /*This is the time when sender sent the message,
-         should be delivery time?*/
+       /*This is the time when sender sent the message*/
        ts = sms_scts_to_time(scts, &remote);
        localtime_r(&ts, &local);
 
@@ -592,6 +591,14 @@ static void dispatch_sms_delivery_report(struct ofono_sms 
*sms,
        buf[127] = '\0';
        ofono_dbus_dict_append(&dict, "SentTime", DBUS_TYPE_STRING, &str);
 
+       /*This is the time when the message was delivered to the recipient*/
+       ts = sms_scts_to_time(dt, &remote);
+       localtime_r(&ts, &local);
+
+       strftime(buf, 127, "%Y-%m-%dT%H:%M:%S%z", &local);
+       buf[127] = '\0';
+       ofono_dbus_dict_append(&dict, "LocalDeliverTime", DBUS_TYPE_STRING, 
&str);
+
        /*Status*/
        if(*st==0x00){
                str = sms_address_to_string(raddr);
-- 
1.6.0.4

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to