g_mutex_lock (priv->queue_lock);
if (priv->op_queue) {
+ /* Cancel all */
if (!g_queue_is_empty (priv->op_queue))
- g_queue_foreach (priv->op_queue, (GFunc) g_object_unref, NULL);
+ modest_mail_operation_queue_cancel_all (MODEST_MAIL_OPERATION_QUEUE (obj));
g_queue_free (priv->op_queue);
}
g_signal_emit (self, signals[QUEUE_CHANGED_SIGNAL], 0,
mail_op, MODEST_MAIL_OPERATION_QUEUE_OPERATION_REMOVED);
- /* TODO: errors? */
- {
- const GError *err = modest_mail_operation_get_error (mail_op);
- if (err)
- g_warning (err->message);
- }
-
/* Free object */
+ modest_runtime_verify_object_last_ref (mail_op, "");
g_object_unref (G_OBJECT (mail_op));
- modest_runtime_verify_object_death (mail_op, "");
}