Commit bbfda207 authored by Chris T's avatar Chris T

Fix the other half of the date bug.

Both a recieved and sent message now store the date inside the status properties. This way if mmsd is shut of or if the system is restarted, mmsd has a memory of the date (and won't format it to the beginning of UNIX epoch)
parent df835b54
......@@ -1361,6 +1361,8 @@ static gboolean load_message_from_store(const char *service_id,
msg->uuid = g_strdup(uuid);
if (strcmp(state, "received") == 0 && msg->type == MMS_MESSAGE_TYPE_RETRIEVE_CONF) {
msg->rc.datestamp = g_strdup(datestr);
msg-> = mktime(&tm);
if (read_status == TRUE)
msg->rc.status = MMS_MESSAGE_STATUS_READ;
......@@ -2108,6 +2110,9 @@ static gboolean result_request_notify_resp(struct mms_request *request)
if (meta == NULL)
return FALSE;
const char *datestr = time_to_str(&msg->;
msg->rc.datestamp = g_strdup(datestr);
g_key_file_set_string(meta, "info", "date", msg->rc.datestamp);
g_key_file_set_string(meta, "info", "state", "received");
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment