[PATCH 05/11] Added message delivery time to dbus message.
pasi.miettinen at ixonos.com
pasi.miettinen at ixonos.com
Thu May 27 03:54:44 PDT 2010
From: Pasi Miettinen <pasi.miettinen at ixonos.com>
---
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
More information about the ofono
mailing list