guint nth, guint total, gpointer userdata)
{
SendMsgInfo *info = (SendMsgInfo *) userdata;
+ TnyHeader *hdr1, *hdr2;
+ hdr1 = tny_msg_get_header(msg);
+ hdr2 = tny_msg_get_header(info->msg);
- if (!strcmp (tny_msg_get_url_string (msg),
- tny_msg_get_url_string (info->msg))) {
+ if (!strcmp (tny_header_get_message_id(hdr1),
+ tny_header_get_message_id(hdr2))) {
ModestMailOperationPrivate *priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
common_send_mail_operation_end (queue, msg, info);
}
+ g_object_unref(G_OBJECT(hdr1));
+ g_object_unref(G_OBJECT(hdr2));
}
static void
GError *error, gpointer userdata)
{
SendMsgInfo *info = (SendMsgInfo *) userdata;
+ TnyHeader *hdr1, *hdr2;
+ hdr1 = tny_msg_get_header(msg);
+ hdr2 = tny_msg_get_header(info->msg);
- if (!strcmp (tny_msg_get_url_string (msg),
- tny_msg_get_url_string (info->msg))) {
+ if (!strcmp (tny_header_get_message_id(hdr1),
+ tny_header_get_message_id(hdr2))) {
ModestMailOperationPrivate *priv = MODEST_MAIL_OPERATION_GET_PRIVATE (info->mail_op);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
common_send_mail_operation_end (queue, msg, info);
}
+ g_object_unref(G_OBJECT(hdr1));
+ g_object_unref(G_OBJECT(hdr2));
}