X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-mail-operation-queue.c;h=7bf680bc813f3c1e41382f292e73b66025cf39f3;hp=53cd086a4a37ade99dad9d0a46ceb084dc262df1;hb=26a294f695ecdce260e36a11434ddcf2c7f43b9c;hpb=2c8b7b34080030155f11eed76948e9ae97387e32 diff --git a/src/modest-mail-operation-queue.c b/src/modest-mail-operation-queue.c index 53cd086..7bf680b 100644 --- a/src/modest-mail-operation-queue.c +++ b/src/modest-mail-operation-queue.c @@ -257,9 +257,9 @@ modest_mail_operation_queue_remove (ModestMailOperationQueue *self, prevent possible application crashes. It's useful also for detecting mail operations with invalid status and error handling */ - if (modest_mail_operation_get_error (mail_op) != NULL) + if (modest_mail_operation_get_error (mail_op) != NULL) { modest_mail_operation_execute_error_handler (mail_op); - else { + } else { if (status == MODEST_MAIL_OPERATION_STATUS_CANCELED) g_warning ("%s: operation canceled \n", __FUNCTION__); else @@ -316,8 +316,10 @@ modest_mail_operation_queue_cancel (ModestMailOperationQueue *self, static void on_cancel_all_foreach (gpointer op, gpointer list) { - g_return_if_fail (list); - *((GSList**)list) = g_slist_prepend (*((GSList**)list), MODEST_MAIL_OPERATION (op)); + GSList **new_list; + + new_list = (GSList**) list; + *new_list = g_slist_prepend (*new_list, MODEST_MAIL_OPERATION (op)); } void @@ -343,8 +345,6 @@ modest_mail_operation_queue_cancel_all (ModestMailOperationQueue *self) /* TODO: Reverse the list, to remove operations in order? */ for(cur = operations_to_cancel; cur != NULL; cur = cur->next) { - /* This triggers a progress_changed signal in which we remove - * the operation from the queue. */ if (!MODEST_IS_MAIL_OPERATION(cur->data)) g_printerr ("modest: cur->data is not a valid mail operation\n"); else