Commit 476d5218 authored by Chris T's avatar Chris T

Fix DBUS bug.

When a message was changed from "Draft" to "sent", the struct was not updated. This commit fixes that, so you can reliably depend on "get_messages" to have the most up to date info on a sent message.
parent bbfda207
......@@ -206,6 +206,7 @@ static void emit_msg_status_changed(const char *path, const char *new_status)
signal = dbus_message_new_signal(path, MMS_MESSAGE_INTERFACE,
"PropertyChanged");
if (signal == NULL)
return;
......@@ -695,8 +696,8 @@ static gboolean result_request_send_conf(struct mms_request *request)
g_key_file_set_string(meta, "info", "state", "sent");
g_key_file_set_string(meta, "info", "id", msg->sc.msgid);
msg->sr.status = MMS_MESSAGE_STATUS_SENT;
//TODO: You need to change the status of the dbus!
request->msg->sr.status = MMS_MESSAGE_STATUS_SENT;
mms_message_free(msg);
mms_store_meta_close(service->identity, uuid, meta, TRUE);
......@@ -1872,6 +1873,9 @@ static void append_sr_msg_properties(DBusMessageIter *dict,
{
const char *status = mms_message_status_get_string(msg->sr.status);
mms_error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
mms_error("Status: %s", status);
mms_error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
mms_dbus_dict_append_basic(dict, "Status",
DBUS_TYPE_STRING, &status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment