camel_store_get_inbox_folder_sync: Remove lock.
authorMatthew Barnes <mbarnes@redhat.com>
Sun, 1 Dec 2013 14:43:25 +0000 (09:43 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Sun, 1 Dec 2013 16:00:31 +0000 (11:00 -0500)
Don't see any reason to lock here.  Providers ought to be able to handle
this concurrently with other methods.  Let any side-effects reveal them-
selves so we can fix them or document them.

camel/camel-store.c

index 5cfff6c..53d883b 100644 (file)
@@ -1788,20 +1788,10 @@ camel_store_get_inbox_folder_sync (CamelStore *store,
        class = CAMEL_STORE_GET_CLASS (store);
        g_return_val_if_fail (class->get_inbox_folder_sync != NULL, NULL);
 
-       camel_store_lock (store);
-
-       /* Check for cancellation after locking. */
-       if (g_cancellable_set_error_if_cancelled (cancellable, error)) {
-               camel_store_unlock (store);
-               return NULL;
-       }
-
        folder = class->get_inbox_folder_sync (store, cancellable, error);
        CAMEL_CHECK_GERROR (
                store, get_inbox_folder_sync, folder != NULL, error);
 
-       camel_store_unlock (store);
-
        return folder;
 }