Commit Graph

1369 Commits

Author SHA1 Message Date
e86a28e484 Numerous fixes to get it to compile.
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c: Numerous fixes to get it to compile.

svn path=/trunk/; revision=10073
2001-05-31 22:30:06 +00:00
b0d14b7864 Added camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* camel.h: Added camel-cipher-context.h, camel-cms-context.h,
	camel-smime-context.h, and camel-smime-utils.h

svn path=/trunk/; revision=10067
2001-05-31 20:41:00 +00:00
fb099f5619 New virtual class for manipulating cryptographic message syntax messages
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-cms-context.[c,h]: New virtual class for manipulating
	cryptographic message syntax messages (like S/MIME).

	* camel-smime-context.[c,h]: Modified to inherit from the
	CamelCMSContext class rather than the CamelCipherContext class.

	* camel-smime.[c,h]: Removed - just use camel-smime-context
	directly.

	* camel-smime-utils.[c,h]: New source files. Moved the 2 useful
	functions from camel-smime.[c,h] into here.

svn path=/trunk/; revision=10065
2001-05-31 20:15:35 +00:00
092b7e4449 Redo the BUILD_MAP code to not depend on libunicode. Now it only generates
* camel-charset-map.c: Redo the BUILD_MAP code to not depend on
	libunicode. Now it only generates a map of "popular" 8bit
	encodings. (It's not worthwhile to support obscure encodings,
	because any mailer that supports them will support UTF8 too. And
	Chinese and Japanese use mostly the same UTF8 characters so you
	need to decide between those encodings based on the locale or
	the charset of the message you're replying to or the input
	method you used. So this is sufficient for camel_charset_best's
	use.)

	* camel-charset-map-private.h: Regenerated.

	* camel.c (camel_shutdown): Move #ifdefs around to prevent a
	warning.

svn path=/trunk/; revision=10055
2001-05-30 21:32:18 +00:00
28f5b75c16 Fix an obvious typo
svn path=/trunk/; revision=10045
2001-05-29 21:07:11 +00:00
3089422b9e Remove this evolutionary dead end
svn path=/trunk/; revision=10042
2001-05-29 17:10:11 +00:00
43795a43b5 Create a CamelDiscoDiary. (imap_disconnect_offline): And free it.
* providers/imap/camel-imap-store.c (imap_connect_online,
	imap_connect_offline): Create a CamelDiscoDiary.
	(imap_disconnect_offline): And free it.

	* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
	If RESYNCING, don't do any sort of checking that the remote folder
	matches the summary, beyond making sure that the UIDVALIDITY is
	correct.
	(imap_rescan): Add a missing camel_folder_summary_info_free when
	removing a UID from the summary.
	(imap_expunge_uids_offline): Implement. Fairly simple.
	(imap_expunge_uids_resyncing): Implement. If the store supports
	UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
	to temporarily undelete any messages marked deleted on the server
	that aren't supposed to get expunged.
	(imap_append_offline): Implement, using cache and summary
	operations, and triggering the folder_changed event by hand.
	(imap_append_resyncing): Implement. Redo imap_append_online a bit
	in the process to make them able to share more code.
	(imap_copy_offline): Implement.
	(imap_copy_online): Move parts of this out into a helper.
	(imap_copy_resyncing): Implement. In most cases this is just like
	imap_copy_online, but if you are copying a message that was itself
	copied or appended into the folder, and the server doesn't do
	UIDPLUS, it will be necessary to replace at least part of the copy
	operation with one or more appends.

	* providers/imap/camel-imap-command.c (imap_read_response): Don't
	record the current folder in the response when in RESYNCING mode.
	(This means that EXISTS and EXPUNGE responses won't be processed,
	which is needed because the summary may not match the folder at
	this point.)
	(imap_read_response): On error, call
	camel_imap_response_free_without_processing, not
	camel_imap_response_free.

	* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
	this work better when operating on UIDs that aren't in the summary.

	* providers/imap/camel-imap-summary.c
	(camel_imap_summary_add_offline): New routine used by
	imap_append_offline and imap_copy_offline to create new summary
	entries.

svn path=/trunk/; revision=10041
2001-05-29 17:09:12 +00:00
11ea26d0e3 Code for logging and replaying offline operations.
* camel-disco-diary.c: Code for logging and replaying offline
	operations.

	* camel-disco-store.c (disco_construct): Set disco->status here
	(where we can base it on the session's offline status) rather than
	at init time.
	(disco_connect): If we connect online and have a non-empty diary,
	switch to RESYNCING mode and replay the diary to the server.
	(disco_get_folder, disco_get_folder_info): Add _resyncing
	variants.

	* camel-disco-folder.c (disco_sync, disco_expunge_uids,
	disco_append_message, disco_copy_messages_to,
	disco_move_messages_to): Add _resyncing variants to switches.
	(disco_expunge_uids, disco_append_message, disco_copy_messages_to,
	disco_move_messages_to): Remove #ifdef'ed out diary code: let the
	provider do it.
	(disco_append_message): Redo the append methods to no longer
	return the UID, since we're no longer doing the logging from here.

svn path=/trunk/; revision=10040
2001-05-29 17:08:53 +00:00
e085e7e666 Use g_strcasecmp() because some systems don't have strcasecmp(). Also,
2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_set_param): Use g_strcasecmp()
	because some systems don't have strcasecmp(). Also, when removing
	a param, make sure to free the param->name too.

svn path=/trunk/; revision=10030
2001-05-28 18:47:24 +00:00
8fddf45b58 changelog entries for tests/ fixes committed yesterday
svn path=/trunk/; revision=10029
2001-05-28 18:30:23 +00:00
618ce2988e Fix an fd leak
* tests/lib/messages.c (test_message_read_file): Fix an fd leak

	* tests/lib/session.c, tests/lib/session.h: a CamelSession
	subclass for the test programs.

	* tests/lib/Makefile.am: include session.[ch]

	* tests/folder/test*.c: Use a CamelTestSession from libcameltest
	instead of cut+pasting everywhere.

	* tests/misc/url.c (main): Update for a camel_url_new change at
	some point.

	* tests/*/.cvsignore: Add stuff.

	* camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
	mixup.

svn path=/trunk/; revision=10023
2001-05-27 19:52:07 +00:00
364cdf26e7 Add a "need_rescan" flag saying if we want to rescan the entire folder for
* providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
	saying if we want to rescan the entire folder for flag changes
	next time it's selected.
	(camel_imap_folder_init): Set need_rescan TRUE.
	(camel_imap_folder_selected): If need_rescan is TRUE, call
	imap_rescan.
	(imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
	Otherwise just do a NOOP, making this a MUCH more lightweight
	operation. Also, don't call imap_rescan directly if the folder
	isn't selected, since that could end up causing the folder to be
	scanned *twice* (imap_rescan -> camel_imap_command ->
	camel_imap_folder_selected -> imap_rescan).
	(imap_rescan): Set need_rescan FALSE.
	(imap_sync_online): Don't NOOP if no changes were pushed: the
	caller will call refresh_info if it wants to poll for changes.
	Fixes evolution-mail doing lots of unnecessary extra work at
	quit time.

svn path=/trunk/; revision=10010
2001-05-26 17:17:10 +00:00
bc117a4331 Oops. Use a strNcmp to make sure the response begins with a 334 code, not
2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
	strNcmp to make sure the response begins with a 334 code, not a
	strcmp. Duh.

svn path=/trunk/; revision=10004
2001-05-25 22:15:01 +00:00
6815fa8a39 remove the summary info so we are not out-of-sync with the maildir folder.
2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-maildir-folder.c (maildir_append_message):
	remove the summary info so we are not out-of-sync with the maildir
	folder.

	* providers/local/camel-mh-folder.c (mh_append_message): remove
	the summary info so we are not out-of-sync with the mh folder.

	* providers/local/camel-mbox-folder.c (mbox_append_message):
	remove the summary info so we are not out-of-sync with the mbox.

svn path=/trunk/; revision=9996
2001-05-25 19:58:37 +00:00
c43cf87a0e Oops, I spelled the get-default-db function name wrong.
2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c (camel_smime_context_new): Oops, I spelled
	the get-default-db function name wrong.

svn path=/trunk/; revision=9980
2001-05-25 01:12:26 +00:00
671a256001 s/folder_deleted/folder_created - result of a bad copy/paste.
2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-local-folder.c
	(camel_local_folder_construct): s/folder_deleted/folder_created -
	result of a bad copy/paste.

svn path=/trunk/; revision=9957
2001-05-24 02:08:59 +00:00
57bdb1acbf Optimize the match "" case.
2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-search.c (imap_body_contains):
	Optimize the match "" case.

svn path=/trunk/; revision=9955
2001-05-24 01:04:38 +00:00
cb92bb76a6 Store the CamelFolderInfo tree that was returned from
2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-store.c (get_folder_info_online):
	Store the CamelFolderInfo tree that was returned from
	camel_folder_info_build() in a new variable, 'tree', rather than
	'fi' since we later use 'fi' when syncing folders. Not only does
	this fix a memory leak, but it also fixes the bug where the user
	would only see the last folder in the folder list and/or it's
	subfolders.

svn path=/trunk/; revision=9911
2001-05-21 22:53:15 +00:00
7c76386907 The service can be NULL here too, thanks to Wayne Davis for pointing this
2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-session.c (camel_session_forget_password): The service can
	be NULL here too, thanks to Wayne Davis for pointing this out.

svn path=/trunk/; revision=9863
2001-05-17 00:34:02 +00:00
ae9d99bda3 We don't need to be passed the certdb path anymore.
2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c (camel_smime_context_new): We don't need
	to be passed the certdb path anymore.

svn path=/trunk/; revision=9855
2001-05-16 21:23:20 +00:00
71002d1544 New function to return an array of all headers.
* camel-medium.c (camel_medium_get_headers): New function to
	return an array of all headers.
	(camel_medium_free_headers): And free them.

	* camel-mime-part.c (get_headers, free_headers): Implement this
	for CamelMimePart. (Works for CamelMimeMessage too.)

svn path=/trunk/; revision=9849
2001-05-16 18:23:15 +00:00
4e4a41d8ae Don't close or free (it wasn't allocated) the certdb.
2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c (camel_smime_context_finalise): Don't
	close or free (it wasn't allocated) the certdb.
	(camel_smime_context_new): If we get a NULL certdb handle, then
	don't bother trying to create a new certdb handle since NSS_Init*
	should have done that.

svn path=/trunk/; revision=9830
2001-05-15 20:14:00 +00:00
c2940feaaa Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in
2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
	variables so we don't link in tons of extra cruft that we don't
	need.

svn path=/trunk/; revision=9821
2001-05-15 19:09:03 +00:00
d1fe1c2d89 Added t the test suite - tests the S/MIME pkcs7 functions.
2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME
	pkcs7 functions.

svn path=/trunk/; revision=9818
2001-05-15 18:37:37 +00:00
4f93316f79 Lots of fixes to get this to compile.
2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c: Lots of fixes to get this to compile.

svn path=/trunk/; revision=9806
2001-05-14 22:38:28 +00:00
aa61c3f98b bah, just mod the pgp-context macro for camel_pgp_verify so that we don't have to pass in a useless value.
svn path=/trunk/; revision=9805
2001-05-14 22:27:29 +00:00
2798919c3c Lots of fixes to get this to almost compile. Still struggling with the
2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c: Lots of fixes to get this to almost
	compile. Still struggling with the fact that CERTCertDBHandle is
	an "incomplete type". *sigh*.

	* camel-smime.c (camel_smime_part_verify): Updated to pass in a
	hash argument to camel_smime_verify().

	* camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
	to the changes in the context API.

	* camel-pgp-context.c (pgp_verify): Updated to take a
	CamelCipherHash argument.

	* camel-cipher-context.c (camel_cipher_verify): Now takes a hash
	argument since the S/MIME code needs this.

svn path=/trunk/; revision=9804
2001-05-14 22:25:02 +00:00
9d1641a573 Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build.
2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
	to the build.

	* camel-smime.[c,h]: New source files for manipulating S/MIME
	message parts.

svn path=/trunk/; revision=9799
2001-05-14 21:14:34 +00:00
05817ac122 Replicate the semantics of the libunicode utf8 functions by returning NULL
2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * camel-search-private.c (utf8_get): Replicate the semantics of
        the libunicode utf8 functions by returning NULL in the arg
        on invalid utf8.

        * camel-pgp-context.c (pgp_verify): Check for valid utf8,
        terminate loop if something looks wrong.

        * camel-mime-utils.c (header_encode_phrase_get_words): Properly
        check for invalid utf8.
        (header_encode_string): Properly check for invalid utf8.

        * camel-charset-map.c (camel_charset_step): Properly check for
        invalid utf8.

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (is_citation): Check for bad utf8.

svn path=/trunk/; revision=9798
2001-05-14 21:04:35 +00:00
d538a34c4b Subclass CamelSession since we can no longer specify the passwd callback
2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/folder/test9.c:
	* tests/folder/test8.c:
	* tests/folder/test7.c:
	* tests/folder/test6.c:
	* tests/folder/test5.c:
	* tests/folder/test4.c:
	* tests/folder/test3.c:
	* tests/folder/test2.c:
	* tests/folder/test1.c:
	* tests/smime/pgp-mime.c:
	* tests/smime/pgp.c: Subclass CamelSession since we can no longer
	specify the passwd callback any other way and update code
	accordingly.

svn path=/trunk/; revision=9796
2001-05-14 20:08:25 +00:00
7a8894af60 er, OptionSet
svn path=/trunk/; revision=9785
2001-05-13 01:44:16 +00:00
40e30e58b8 s/SSL_Enable/SSL_SetOption
svn path=/trunk/; revision=9784
2001-05-13 01:42:48 +00:00
ba099582f3 Decode Content-Location, either correctly or Netscape-generated-brokenly.
* camel-mime-utils.c (header_location_decode): Decode
	Content-Location, either correctly or Netscape-generated-brokenly.

	* camel-mime-part.c (camel_mime_part_set_content_location,
	camel_mime_part_get_content_location, etc): Deal with
	Content-Location header.

svn path=/trunk/; revision=9772
2001-05-11 20:57:26 +00:00
96dab8cb19 Don't check the initial auth response until we get into the while-loop
2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
	the initial auth response until we get into the while-loop
	otherwise we have problems if the SASL mechanism supported a
	client initiated challenge (like PLAIN and LOGIN do).

svn path=/trunk/; revision=9771
2001-05-11 20:34:10 +00:00
b1c432f406 Make this return CamelStream * (like the other stream new functions)
* camel-stream-null.c (camel_stream_null_new): Make this return
	CamelStream * (like the other stream new functions) instead of
	CamelStreamNull *

svn path=/trunk/; revision=9760
2001-05-11 17:32:02 +00:00
b3424b533c call SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,
2001-05-10  Chris Toshok  <toshok@ximian.com>

	* camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
	the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
	during the connect.

svn path=/trunk/; revision=9751
2001-05-10 22:03:08 +00:00
42f9d72254 Don't abort if the Service is NULL, this is perfectly valid for cipher
2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-session.c (camel_session_get_password): Don't abort if the
	Service is NULL, this is perfectly valid for cipher contexts.

svn path=/trunk/; revision=9748
2001-05-10 20:42:22 +00:00
5f3f0da8b1 Pass appropriate parameters to CF_CLASS and add comment explaining why my
2001-05-09  Peter Williams  <peterw@ximian.com>

       * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
       appropriate parameters to CF_CLASS and add comment explaining why
       my initial attempt at a solution didn't work.

svn path=/trunk/; revision=9742
2001-05-10 02:51:20 +00:00
630241d74b Set the disconnected status. (camel_disco_store_can_work_offline): Return
* camel-disco-store.c (camel_disco_set_status): Set the
	disconnected status.
	(camel_disco_store_can_work_offline): Return whether or not a
	given CamelDiscoStore can work offline or not.

	* camel-disco-folder.c (camel_disco_folder_cache_message):
	Explicitly tell a folder to cache a message. (Better than using
	get_message, because for IMAP that doesn't guarantee you'll get
	all the message parts.)
	(camel_disco_folder_prepare_for_offline): Prepare a folder for
	offline use by caching all messages meeting given search criteria
	(and doing anything else the particular folder implementation
	needs).

	* camel-session.c (camel_session_set_online,
	camel_session_is_online): A session-wide online/offline toggle.
	(camel_session_init): Set online to TRUE.

	* providers/imap/camel-imap-store.c (can_work_offline):
	Implementation of CamelDiscoStore::can_work_offline. (Checks that
	the store has been used online at least once.)
	(imap_get_folder_online, imap_get_folder_offline): Deal with
	request for "inbox" properly. ("Don't you mean... 'INBOX'?").

	* providers/imap/camel-imap-folder.c (imap_cache_message):
	Implementation of CamelDiscoFolder::cache_message.

	* camel.h: Add camel-disco-store.h and camel-disco-folder.h

svn path=/trunk/; revision=9738
2001-05-09 21:57:32 +00:00
c76080568d remove something jeff didn't mean to commit
svn path=/trunk/; revision=9737
2001-05-09 21:55:57 +00:00
3f207278fb Wrap the content-id with <>'s.
2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
	content-id with <>'s.

svn path=/trunk/; revision=9734
2001-05-09 20:17:12 +00:00
416d8fa6cd Add support for using OpenSSL.
2001-05-04  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (connect_to_server): Add
	support for using OpenSSL.

	* camel-remote-store.c (remote_connect): Add support for using the
	OpenSSL implementation.

	* camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
	NULL as the last argument to alert_user - prototype doesn't take
	that argument anymore?

	* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
	(ssl_verify): Use a global hash table to try and lookup the
	CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
	doesn't think one needs to pass data around, we should all be
	living in a world of global variables, duh!

svn path=/trunk/; revision=9697
2001-05-07 20:33:25 +00:00
612ada489c Fix another build problem. (Um, anyone else could have done this...)
* Makefile.am (libcamelinclude_HEADERS): Fix another build
	problem. (Um, anyone else could have done this...)

svn path=/trunk/; revision=9687
2001-05-06 15:33:36 +00:00
39319663e8 Fix up refcounting on current_folder.
* providers/imap/camel-imap-store.c (get_folder_online): Fix up
	refcounting on current_folder.

	* camel-disco-folder.c, camel-disco-store.h: Remove
	CamelDiscoDiary refs that weren't supposed to escape yet.

svn path=/trunk/; revision=9667
2001-05-04 15:26:13 +00:00
7c553e6e5b new abstract class for disconnectable remote stores
* camel-disco-store.c: new abstract class for disconnectable
	remote stores

	* camel-disco-folder.c: new abstract class for folders on
	disconnectable stores.

	* Makefile.am: Add camel-disco-folder.[ch] and
	camel-disco-store.[ch].

	* providers/imap/camel-imap-store.c: Make this a subclass of
	CamelDiscoStore, and fix up the offline interfaces for the changes
	since they were first written (particularly the fact that some
	IMAP stores don't just use subscribed folders).

	* providers/imap/camel-imap-folder.c: Make this a subclass of
	CamelDiscoFolder, although most ops still fail in disconnected
	mode.

	* camel-store.c (camel_store_get_folder_info): Change gboolean,
	gboolean, gboolean to guint32 in the prototype for this function.

	* providers/local/camel-local-store.c (get_folder_info): Update
	for prototype change.

svn path=/trunk/; revision=9659
2001-05-03 20:52:59 +00:00
d0edb93139 Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" into
* providers/imap/camel-imap-store.h: Clean this up a bit. Add a
	"tag_prefix" member. Move "useful_lsub" into capabilities.

	* providers/imap/camel-imap-store.c (camel_imap_store_init):
	Initialize the tag_prefix, based on a static variable.

	* providers/imap/camel-imap-command.c (camel_imap_command): Use
	the store's tag_prefix character rather than "A" at the start of
	the tag. Makes the verbose debug output easier to parse when
	connected to multiple IMAP servers. (Well, unless you're connected
	to more than 26 servers...)

svn path=/trunk/; revision=9649
2001-05-02 19:53:53 +00:00
d01a793455 Fix this up... it was losing count in some cases and giving a more verbose
* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
	this up... it was losing count in some cases and giving a more
	verbose answer than it needed to.

svn path=/trunk/; revision=9644
2001-05-02 16:50:43 +00:00
42233e110a Rescue the KPOP code from bit rot.
* providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
	rot.

svn path=/trunk/; revision=9643
2001-05-02 13:53:21 +00:00
d3bcd3e9d6 Remove the last argument from camel_session_alert_user.
2001-05-01  Anders Carlsson  <andersca@codefactory.se>

	* camel-tcp-stream-ssl.c (ssl_bad_cert): Remove the last argument from
	camel_session_alert_user.

svn path=/trunk/; revision=9640
2001-05-01 19:44:45 +00:00
6a5e6fbbea 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
2001-05-01 19:16:14 +00:00