diff options
author | Dan Winship <danw@src.gnome.org> | 2001-05-02 03:16:14 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-05-02 03:16:14 +0800 |
commit | 6a5e6fbbeaa4e32cd2058019ae87132beba79429 (patch) | |
tree | 1a99e8c747947e8fe3e65d3a94aa36aeda91cf61 /camel/providers/imap/camel-imap-search.c | |
parent | 4ce894e3ab34ee81967f1d69dfba71eb9f3c0944 (diff) | |
download | gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.gz gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.bz2 gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.lz gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.xz gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.tar.zst gsoc2013-evolution-6a5e6fbbeaa4e32cd2058019ae87132beba79429.zip |
Redo command locking. Since command_lock is recursive, we can just get a
* providers/imap/camel-imap-command.c (camel_imap_command): Redo
command locking. Since command_lock is recursive, we can just get
a lock here, and release it either on error, or when the caller
frees the response data. (This simplifies a lot of stuff, and
fixes some problems with camel_imap_folder_changed being called
without the command_lock locked because of the 2001-03-22 change.)
(camel_imap_response_free):
(camel_imap_response_free_without_processing):
(camel_imap_response_extract):
(camel_imap_response_extract_continuation): These all take a
CamelImapStore now as well, to deal with locking.
* providers/imap/camel-imap-private.h: Add
CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
be made to call e_mutex_assert_locked.
* providers/imap/camel-imap-folder.c, camel-imap-search.c,
camel-imap-store.c: Simplify using new locking stuff. Add a few
CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
svn path=/trunk/; revision=9639
Diffstat (limited to 'camel/providers/imap/camel-imap-search.c')
-rw-r--r-- | camel/providers/imap/camel-imap-search.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c index 4b913b10c2..be8ed85eca 100644 --- a/camel/providers/imap/camel-imap-search.c +++ b/camel/providers/imap/camel-imap-search.c @@ -3,9 +3,9 @@ /* * Authors: - * Dan Winship <danw@helixcode.com> + * Dan Winship <danw@ximian.com> * - * Copyright 2000 Helix Code, Inc. (www.helixcode.com) + * Copyright 2000, 2001 Ximian, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -80,8 +80,6 @@ imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, CamelMessageInfo *info; GHashTable *uid_hash = NULL; - CAMEL_IMAP_STORE_LOCK(store, command_lock); - if (s->current) { uid = camel_message_info_uid (s->current); r = e_sexp_result_new(f, ESEXP_RES_BOOL); @@ -97,11 +95,9 @@ imap_body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, value); } - CAMEL_IMAP_STORE_UNLOCK(store, command_lock); - if (!response) return r; - result = camel_imap_response_extract (response, "SEARCH", NULL); + result = camel_imap_response_extract (store, response, "SEARCH", NULL); if (!result) return r; |