modest_mail_operation_execute_error_handler (mail_op);
} else {
if (status == MODEST_MAIL_OPERATION_STATUS_CANCELED)
modest_mail_operation_execute_error_handler (mail_op);
} else {
if (status == MODEST_MAIL_OPERATION_STATUS_CANCELED)
else
g_warning ("%s: possible error in a mail operation " \
"implementation. The status is not successful " \
else
g_warning ("%s: possible error in a mail operation " \
"implementation. The status is not successful " \
on_find_by_source_foreach (gpointer op, gpointer data)
{
FindBySourceInfo *info = (FindBySourceInfo*) data;
on_find_by_source_foreach (gpointer op, gpointer data)
{
FindBySourceInfo *info = (FindBySourceInfo*) data;
g_object_ref (G_OBJECT (op));
*(info->new_list) = g_slist_prepend (*(info->new_list), MODEST_MAIL_OPERATION (op));
}
g_object_ref (G_OBJECT (op));
*(info->new_list) = g_slist_prepend (*(info->new_list), MODEST_MAIL_OPERATION (op));
}
g_return_val_if_fail (MODEST_IS_MAIL_OPERATION_QUEUE (self), NULL);
g_return_val_if_fail (source != NULL, NULL);
priv = MODEST_MAIL_OPERATION_QUEUE_GET_PRIVATE(self);
g_return_val_if_fail (MODEST_IS_MAIL_OPERATION_QUEUE (self), NULL);
g_return_val_if_fail (source != NULL, NULL);
priv = MODEST_MAIL_OPERATION_QUEUE_GET_PRIVATE(self);
- *str = g_strdup_printf ("%s\n%s", *str, modest_mail_operation_to_string (op));
+ gchar *mail_op_to_str = modest_mail_operation_to_string (op);
+ *str = g_strdup_printf ("%s\n%s", *str, mail_op_to_str);
+ g_free (mail_op_to_str);
priv = MODEST_MAIL_OPERATION_QUEUE_GET_PRIVATE(self);
len = g_queue_get_length (priv->op_queue);
str = g_strdup_printf ("mail operation queue (%02d)\n-------------------------", len);
priv = MODEST_MAIL_OPERATION_QUEUE_GET_PRIVATE(self);
len = g_queue_get_length (priv->op_queue);
str = g_strdup_printf ("mail operation queue (%02d)\n-------------------------", len);
g_mutex_lock (priv->queue_lock);
g_queue_foreach (priv->op_queue, (GFunc)accumulate_mail_op_strings, &str);
g_mutex_unlock (priv->queue_lock);
g_mutex_lock (priv->queue_lock);
g_queue_foreach (priv->op_queue, (GFunc)accumulate_mail_op_strings, &str);
g_mutex_unlock (priv->queue_lock);